Hide bubble in (New)ReturnToCallController.tearDown().
There is the case that onDisconnect() is not called but InCallService is unbind. Currently we only hide bubble when call disconnected. We should also do it when InCallService is unbind.
Test: NewReturnToCallControllerTest, ReturnToCallControllerTest
PiperOrigin-RevId: 178029862
Change-Id: I6806c5c80adb06317f09019bdf3420b462225945
diff --git a/java/com/android/incallui/NewReturnToCallController.java b/java/com/android/incallui/NewReturnToCallController.java
index 7a1abee..abff000 100644
--- a/java/com/android/incallui/NewReturnToCallController.java
+++ b/java/com/android/incallui/NewReturnToCallController.java
@@ -98,6 +98,7 @@
}
public void tearDown() {
+ hide();
InCallPresenter.getInstance().removeInCallUiListener(this);
CallList.getInstance().removeListener(this);
AudioModeProvider.getInstance().removeListener(this);
diff --git a/java/com/android/incallui/ReturnToCallController.java b/java/com/android/incallui/ReturnToCallController.java
index 5f4cc5f..58d8688 100644
--- a/java/com/android/incallui/ReturnToCallController.java
+++ b/java/com/android/incallui/ReturnToCallController.java
@@ -84,6 +84,7 @@
}
public void tearDown() {
+ hide();
InCallPresenter.getInstance().removeInCallUiListener(this);
CallList.getInstance().removeListener(this);
AudioModeProvider.getInstance().removeListener(this);