InCallActivity should not call onUiShowing(false) when recreating.
InCallActivity recreates when onNewIntent() and is not visible. Althought onPause() is called, we should not call onUiShowing(false) since the activity is going to be visible. The extra call confuses bubble animation.
Bug: 67605985,71746139
Test: InCallActivityTest
PiperOrigin-RevId: 181343690
Change-Id: I4d540be0e3e38400322f9b9c3e71e50b1f85977c
diff --git a/java/com/android/incallui/InCallActivity.java b/java/com/android/incallui/InCallActivity.java
index f09f0d9..0a56666 100644
--- a/java/com/android/incallui/InCallActivity.java
+++ b/java/com/android/incallui/InCallActivity.java
@@ -479,7 +479,9 @@
dialpadFragment.onDialerKeyUp(null);
}
- InCallPresenter.getInstance().onUiShowing(false);
+ if (!isRecreating) {
+ InCallPresenter.getInstance().onUiShowing(false);
+ }
if (isFinishing()) {
InCallPresenter.getInstance().unsetActivity(this);
}
@@ -590,7 +592,8 @@
}
}
- private void onNewIntent(Intent intent, boolean isRecreating) {
+ @VisibleForTesting
+ void onNewIntent(Intent intent, boolean isRecreating) {
this.isRecreating = isRecreating;
// We're being re-launched with a new Intent. Since it's possible for a single InCallActivity