From c0200c4d60cf662f5e6aa422a810646ff02928b8 Mon Sep 17 00:00:00 2001 From: yueg Date: Mon, 7 May 2018 17:13:13 -0700 Subject: Do not show bubble for outgoing call if it's not a background call. Test: ReturnToCallControllerTest PiperOrigin-RevId: 195747611 Change-Id: Ibce7ef45af2f79cc5a35825a2bb38fe268a4681c --- java/com/android/incallui/ReturnToCallController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'java') diff --git a/java/com/android/incallui/ReturnToCallController.java b/java/com/android/incallui/ReturnToCallController.java index 96bdda1ba..7c4585ca1 100644 --- a/java/com/android/incallui/ReturnToCallController.java +++ b/java/com/android/incallui/ReturnToCallController.java @@ -196,12 +196,13 @@ public class ReturnToCallController implements InCallUiListener, Listener, Audio newInCallState != inCallState && newInCallState == InCallState.OUTGOING && shouldStartInBubbleMode; + boolean bubbleNeverVisible = (bubble == null || !(bubble.isVisible() || bubble.isDismissed())); if (bubble != null && isNewBackgroundCall) { // If new outgoing call is in bubble mode, update bubble info. // We don't update if new call is not in bubble mode even if the existing call is. bubble.setBubbleInfo(generateBubbleInfoForBackgroundCalling()); } - if ((bubble == null || !(bubble.isVisible() || bubble.isDismissed()) || isNewBackgroundCall) + if (((bubbleNeverVisible && newInCallState != InCallState.OUTGOING) || isNewBackgroundCall) && getCall() != null && !InCallPresenter.getInstance().isShowingInCallUi()) { LogUtil.i("ReturnToCallController.onCallListChange", "going to show bubble"); -- cgit v1.2.3