summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryueg <yueg@google.com>2018-03-08 15:48:44 -0800
committerCopybara-Service <copybara-piper@google.com>2018-03-08 17:05:40 -0800
commit724cc8f065b9ea737a11504d3f3c3691451c7914 (patch)
tree5afeec11dbb9904b38dd2e9ffc71e63f5e0669b2
parent98ff44d0b311e4b659c61f7e78807c3f233fe1f9 (diff)
Show bubble when call connected and in-call UI not showing.
We used to only show bubble when leaving in-call UI, so answering from Bluetooth does not show bubble. Fix it by also showing bubble in onCallListChanged(). Test: NewReturnToCallControllerTest PiperOrigin-RevId: 188403460 Change-Id: I5e6a3c37b2773e426dcc73ae5661b9e145b20cb8
-rw-r--r--java/com/android/incallui/NewReturnToCallController.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/java/com/android/incallui/NewReturnToCallController.java b/java/com/android/incallui/NewReturnToCallController.java
index b83462e12..e77920524 100644
--- a/java/com/android/incallui/NewReturnToCallController.java
+++ b/java/com/android/incallui/NewReturnToCallController.java
@@ -51,7 +51,13 @@ import java.util.List;
/**
* Listens for events relevant to the return-to-call bubble and updates the bubble's state as
- * necessary
+ * necessary.
+ *
+ * <p>Bubble shows when one of following happens: 1. a new outgoing/ongoing call appears 2. leave
+ * in-call UI with an outgoing/ongoing call
+ *
+ * <p>Bubble hides when one of following happens: 1. a call disconnect and there is no more
+ * outgoing/ongoing call 2. show in-call UI
*/
public class NewReturnToCallController implements InCallUiListener, Listener, AudioModeListener {
@@ -171,7 +177,14 @@ public class NewReturnToCallController implements InCallUiListener, Listener, Au
public void onSessionModificationStateChange(DialerCall call) {}
@Override
- public void onCallListChange(CallList callList) {}
+ public void onCallListChange(CallList callList) {
+ if ((bubble == null || !bubble.isVisible())
+ && getCall() != null
+ && !InCallPresenter.getInstance().isShowingInCallUi()) {
+ LogUtil.i("NewReturnToCallController.onCallListChange", "going to show bubble");
+ show();
+ }
+ }
@Override
public void onDisconnect(DialerCall call) {