summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/BaseActivity.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2018-04-04 13:33:23 -0700
committerWinson Chung <winsonc@google.com>2018-04-04 14:36:40 -0700
commit9800e730a2ab7469002cf971ad9c8dd92d3cf372 (patch)
treea49119f014d6f9b1473e7da16cc9e35a4162b753 /src/com/android/launcher3/BaseActivity.java
parentbc5bfc11196d40234f077b1e8de07e4d9ad80263 (diff)
downloadandroid_packages_apps_Trebuchet-9800e730a2ab7469002cf971ad9c8dd92d3cf372.tar.gz
android_packages_apps_Trebuchet-9800e730a2ab7469002cf971ad9c8dd92d3cf372.tar.bz2
android_packages_apps_Trebuchet-9800e730a2ab7469002cf971ad9c8dd92d3cf372.zip
Fix animations home
- To prevent surface thrashing, we no longer hide the home activity before starting the transition home. This prevents the launcher from being added to the remote animation target list, which means that we default to skipping the launcher animation. As a workaround, we special case the flow and force the animation to run when starting the recents animation. Bug: 74405472 Test: Go home from an app, ensure there is an animation. Change-Id: Ifd2b39444fdeab323ee79a368b580a6264c3e5b9
Diffstat (limited to 'src/com/android/launcher3/BaseActivity.java')
-rw-r--r--src/com/android/launcher3/BaseActivity.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/com/android/launcher3/BaseActivity.java b/src/com/android/launcher3/BaseActivity.java
index cf2d79faf..ae631a446 100644
--- a/src/com/android/launcher3/BaseActivity.java
+++ b/src/com/android/launcher3/BaseActivity.java
@@ -39,6 +39,9 @@ public abstract class BaseActivity extends Activity {
protected SystemUiController mSystemUiController;
private boolean mStarted;
+ // When the recents animation is running, the visibility of the Launcher is managed by the
+ // animation
+ private boolean mForceInvisible;
private boolean mUserActive;
public DeviceProfile getDeviceProfile() {
@@ -100,6 +103,7 @@ public abstract class BaseActivity extends Activity {
@Override
protected void onStop() {
mStarted = false;
+ mForceInvisible = false;
super.onStop();
}
@@ -126,6 +130,22 @@ public abstract class BaseActivity extends Activity {
}
/**
+ * Used to set the override visibility state, used only to handle the transition home with the
+ * recents animation.
+ * @see LauncherAppTransitionManagerImpl.getWallpaperOpenRunner()
+ */
+ public void setForceInvisible(boolean invisible) {
+ mForceInvisible = invisible;
+ }
+
+ /**
+ * @return Wether this activity should be considered invisible regardless of actual visibility.
+ */
+ public boolean isForceInvisible() {
+ return mForceInvisible;
+ }
+
+ /**
* Sets the device profile, adjusting it accordingly in case of multi-window
*/
protected void setDeviceProfile(DeviceProfile dp) {