summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--java/com/android/bubble/Bubble.java3
-rw-r--r--java/com/android/bubble/stub/BubbleStub.java5
-rw-r--r--java/com/android/incallui/ReturnToCallController.java6
3 files changed, 11 insertions, 3 deletions
diff --git a/java/com/android/bubble/Bubble.java b/java/com/android/bubble/Bubble.java
index e192e06f4..1b853cf49 100644
--- a/java/com/android/bubble/Bubble.java
+++ b/java/com/android/bubble/Bubble.java
@@ -39,6 +39,9 @@ public interface Bubble {
/** Returns whether the bubble is currently visible */
boolean isVisible();
+ /** Returns whether the bubble is currently dismissed */
+ boolean isDismissed();
+
/**
* Set the info for this Bubble to display
*
diff --git a/java/com/android/bubble/stub/BubbleStub.java b/java/com/android/bubble/stub/BubbleStub.java
index 267f33f31..2aa55a337 100644
--- a/java/com/android/bubble/stub/BubbleStub.java
+++ b/java/com/android/bubble/stub/BubbleStub.java
@@ -40,6 +40,11 @@ public class BubbleStub implements Bubble {
}
@Override
+ public boolean isDismissed() {
+ return false;
+ }
+
+ @Override
public void setBubbleInfo(@NonNull BubbleInfo bubbleInfo) {}
@Override
diff --git a/java/com/android/incallui/ReturnToCallController.java b/java/com/android/incallui/ReturnToCallController.java
index d5e6a1001..0850e913a 100644
--- a/java/com/android/incallui/ReturnToCallController.java
+++ b/java/com/android/incallui/ReturnToCallController.java
@@ -92,10 +92,10 @@ public class ReturnToCallController implements InCallUiListener, Listener, Audio
endCall = createActionIntent(ReturnToCallActionReceiver.ACTION_END_CALL);
fullScreen = createActionIntent(ReturnToCallActionReceiver.ACTION_RETURN_TO_CALL);
- InCallPresenter.getInstance().addInCallUiListener(this);
- CallList.getInstance().addListener(this);
AudioModeProvider.getInstance().addListener(this);
audioState = AudioModeProvider.getInstance().getAudioState();
+ InCallPresenter.getInstance().addInCallUiListener(this);
+ CallList.getInstance().addListener(this);
}
public void tearDown() {
@@ -186,7 +186,7 @@ public class ReturnToCallController implements InCallUiListener, Listener, Audio
return;
}
- if ((bubble == null || !bubble.isVisible())
+ if ((bubble == null || !(bubble.isVisible() || bubble.isDismissed()))
&& getCall() != null
&& !InCallPresenter.getInstance().isShowingInCallUi()) {
LogUtil.i("ReturnToCallController.onCallListChange", "going to show bubble");