summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authoryueg <yueg@google.com>2018-05-07 17:13:13 -0700
committerCopybara-Service <copybara-piper@google.com>2018-05-09 16:54:56 -0700
commitc0200c4d60cf662f5e6aa422a810646ff02928b8 (patch)
treee6a55ee7a9420f90dfbd32818b7e780b0dde1870 /java
parentf0a425e86fa8c234c962718b33682ecd8367ea25 (diff)
Do not show bubble for outgoing call if it's not a background call.
Test: ReturnToCallControllerTest PiperOrigin-RevId: 195747611 Change-Id: Ibce7ef45af2f79cc5a35825a2bb38fe268a4681c
Diffstat (limited to 'java')
-rw-r--r--java/com/android/incallui/ReturnToCallController.java3
1 files changed, 2 insertions, 1 deletions
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");