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
diff --git a/java/com/android/incallui/NewReturnToCallController.java b/java/com/android/incallui/NewReturnToCallController.java
index b83462e..e779205 100644
--- a/java/com/android/incallui/NewReturnToCallController.java
+++ b/java/com/android/incallui/NewReturnToCallController.java
@@ -51,7 +51,13 @@
 
 /**
  * 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 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) {