From 3b232751f69e028d7825efb7e6513045babd0ebb Mon Sep 17 00:00:00 2001 From: yueg Date: Mon, 17 Jul 2017 16:28:07 -0700 Subject: Fix bubble for video call upgrade and multiple voice call. To make sure bubble is dismissed on video call connected but isn't dismissed on non-last multiple voice call disconnected. Receive upgrade, declined and accepted: https://drive.google.com/a/google.com/file/d/0Bz1rQbdSCWSKMFc4aDRFdi1xYTQ Request upgrade, declined and accepted: https://drive.google.com/a/google.com/file/d/0Bz1rQbdSCWSKelZZSURwTjBiYnM Multiple voice call: https://drive.google.com/a/google.com/file/d/0Bz1rQbdSCWSKNEhNWGdzWFAtTlE Test: manual PiperOrigin-RevId: 162288587 Change-Id: Idfa8efa3eb96980ab17694b8fe4d31fa8eb3e18d --- java/com/android/incallui/ReturnToCallController.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'java/com/android') diff --git a/java/com/android/incallui/ReturnToCallController.java b/java/com/android/incallui/ReturnToCallController.java index 57d50adb2..978b14039 100644 --- a/java/com/android/incallui/ReturnToCallController.java +++ b/java/com/android/incallui/ReturnToCallController.java @@ -134,11 +134,15 @@ public class ReturnToCallController implements InCallUiListener, Listener, Audio @Override public void onDisconnect(DialerCall call) { - if (bubble != null && bubble.isVisible() && !TelecomUtil.isInCall(context)) { + boolean hasAnotherCall = CallList.getInstance().getActiveOrBackgroundCall() != null; + if (bubble != null + && bubble.isVisible() + && (!TelecomUtil.isInCall(context) || hasAnotherCall)) { bubble.showText(context.getText(R.string.incall_call_ended)); } - - hide(); + if (!hasAnotherCall) { + hide(); + } } @Override -- cgit v1.2.3