From fff6fcfc6887e113e25cfb7a8e07b8b73af0c62c Mon Sep 17 00:00:00 2001 From: wangqi Date: Thu, 31 Aug 2017 15:30:58 -0700 Subject: Use TelecomManager#isInManagedCall starting from O. The TelecomManager#isInCall method returns true anytime the user is in a call. Starting in O, the APIs include support for self-managed ConnectionServices so that other apps like Duo can tell Telecom about its calls. So, if the user is in a Duo call, isInCall would return true. Dialer uses this to determine whether to show the "return to call in progress" when Dialer is launched. Instead, Dialer should use TelecomManager#isInManagedCall, which only returns true if the device is in a managed call which Dialer would know about. Bug: 36991070 Test: none PiperOrigin-RevId: 167200903 Change-Id: I12ac7b893dcbfa2fc842ca5ab356fbbc490a098b --- java/com/android/incallui/ReturnToCallController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'java/com/android/incallui') diff --git a/java/com/android/incallui/ReturnToCallController.java b/java/com/android/incallui/ReturnToCallController.java index e5c761820..e54102ca8 100644 --- a/java/com/android/incallui/ReturnToCallController.java +++ b/java/com/android/incallui/ReturnToCallController.java @@ -94,7 +94,7 @@ public class ReturnToCallController implements InCallUiListener, Listener, Audio if (showing) { hide(); } else { - if (TelecomUtil.isInCall(context)) { + if (TelecomUtil.isInManagedCall(context)) { show(); } } @@ -175,7 +175,7 @@ public class ReturnToCallController implements InCallUiListener, Listener, Audio } if (bubble != null && bubble.isVisible() - && (!TelecomUtil.isInCall(context) + && (!TelecomUtil.isInManagedCall(context) || CallList.getInstance().getActiveOrBackgroundCall() != null)) { bubble.showText(context.getText(R.string.incall_call_ended)); } -- cgit v1.2.3