Remove CircularRevealActivity
Replace CircularRevealActivity with a fragment that is tied to
the lifecycle of InCallActivity so that InCallActivity is the
only activity that is involved in the outgoing call process.
Simplify some of the intent creation logic that is used to launch
InCallActivity since we no longer need some of the flags that were
currently provided via various method overloads in
InCallPresenter.getAnimationIntent and getInCallIntent.
To further simplify this CL, a very rudimentary approach is taken to
track the state where we are starting up the UI but haven't received
a call from Telecom yet. This is done by a boolean flag set on the
InCallPresenter: mBoundAndWaitingForOutgoingCall.
Further changes will build upon and improve this.
Also set most elements inside primary_call_info.xml to
visibility: GONE by default to fix some animation jank where a
empty but not GONE view would continue to take up space.
Change-Id: Ic70857685680af6868d4b2153d942d73eef3ca56
diff --git a/InCallUI/res/values/styles.xml b/InCallUI/res/values/styles.xml
index e16d72c..dba7cc3 100644
--- a/InCallUI/res/values/styles.xml
+++ b/InCallUI/res/values/styles.xml
@@ -70,43 +70,12 @@
<item name="android:textOff">@null</item>
</style>
- <style name="InCallAnimationStyle" parent="@android:style/Animation.Activity">
- <!-- Suppress task-to-task animation happening during the transition from
- OutgoingCallBroadcaster (and SipOptionHandler) to InCallActivity.
- The transition unexpectedly happens during the transition (inside the phone task),
- because InCallActivity is using android:launchMode="singleInstance".
-
- - taskOpenEnterAnimation/taskOpenExitAnimation is used for the first time
- InCallActivity instance is created.
-
- - taskToFrontEnterAnimation/taskToFrontExitAnimation is used when InCallActivity
- is already available.
- (Note that InCallActivity won't be destroyed once it is created)
-
- TODO: try removing the flag instead -->
- <item name="android:taskOpenEnterAnimation">@null</item>
- <item name="android:taskOpenExitAnimation">@anim/activity_open_exit</item>
- <item name="android:taskToFrontEnterAnimation">@anim/activity_open_enter</item>
- <item name="android:taskToFrontExitAnimation">@anim/activity_open_exit</item>
- </style>
-
- <style name="OutgoingCallAnimationStyle" parent="@android:style/Animation.Activity">
- <item name="android:taskOpenEnterAnimation">@null</item>
- <item name="android:taskOpenExitAnimation">@null</item>
- <item name="android:activityOpenEnterAnimation">@null</item>
- <item name="android:activityOpenExitAnimation">@null</item>
- <item name="android:activityCloseEnterAnimation">@null</item>
- <item name="android:activityCloseExitAnimation">@null</item>
- <item name="android:taskToFrontEnterAnimation">@null</item>
- <item name="android:taskToFrontExitAnimation">@null</item>
- </style>
-
<!-- Theme for the InCallActivity activity. Should have a transparent background for the
circular reveal animation for a new outgoing call to work correctly. We don't just use
Theme.Black.NoTitleBar directly, since we want any popups or dialogs from the
InCallActivity to have the correct Material style. -->
<style name="Theme.InCallScreen" parent="@android:style/Theme.Material.Light">
- <item name="android:windowAnimationStyle">@style/InCallAnimationStyle</item>
+ <item name="android:windowAnimationStyle">@null</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
@@ -118,15 +87,6 @@
<item name="android:buttonStyleToggle">@style/InCallCompoundButton</item>
</style>
- <style name="Theme.CircularRevealAnimation" parent="@android:style/Theme.Material.Light">
- <item name="android:windowIsTranslucent">true</item>
- <item name="android:windowContentOverlay">@null</item>
- <item name="android:windowNoTitle">true</item>
- <item name="android:colorPrimaryDark">@color/dialer_theme_color_dark</item>
- <item name="android:windowBackground">@android:color/transparent</item>
- <item name="android:windowAnimationStyle">@null</item>
- </style>
-
<style name="InCallPopupMenuStyle" parent="@android:style/Theme.Material.Light">
<item name="android:textColorPrimary">@color/popup_menu_color</item>
</style>