summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2018-05-18 16:12:54 -0700
committerTony Wickham <twickham@google.com>2018-05-29 21:58:52 +0000
commit8935d9515c17db0d717757022d9d2442153ecf0d (patch)
tree13dabab10f25dbb8657c10fedc5ad5d79a293249
parent688701317a3960be1a38e6f40653b9f37216fbfc (diff)
downloadandroid_packages_apps_Trebuchet-8935d9515c17db0d717757022d9d2442153ecf0d.tar.gz
android_packages_apps_Trebuchet-8935d9515c17db0d717757022d9d2442153ecf0d.tar.bz2
android_packages_apps_Trebuchet-8935d9515c17db0d717757022d9d2442153ecf0d.zip
Set mState = mCurrentStableState in onAnimationCancel
mState is set when the transition starts toward that state even if it is never reached. If the animation is canceled, therefore, we should reset mState = mCurrentStableState since that is the state we came from. For instance, when swiping up from overview, mState = ALL_APPS, but when swiping back down we cancel that animation and create the task launch animation. When creating the task launch animation, we reapplyState(), which, before this change, was still ALL_APPS instead of OVERVIEW. Bug: 79935289 Change-Id: I59c5799e92350747e4ef1d99a80ba678a2ce7b98
-rw-r--r--src/com/android/launcher3/LauncherStateManager.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/launcher3/LauncherStateManager.java b/src/com/android/launcher3/LauncherStateManager.java
index b5eef8bd3..02fa916b1 100644
--- a/src/com/android/launcher3/LauncherStateManager.java
+++ b/src/com/android/launcher3/LauncherStateManager.java
@@ -348,6 +348,12 @@ public class LauncherStateManager {
}
@Override
+ public void onAnimationCancel(Animator animation) {
+ super.onAnimationCancel(animation);
+ mState = mCurrentStableState;
+ }
+
+ @Override
public void onAnimationSuccess(Animator animator) {
// Run any queued runnables
if (onCompleteRunnable != null) {
@@ -432,7 +438,6 @@ public class LauncherStateManager {
}
public void setCurrentUserControlledAnimation(AnimatorPlaybackController controller) {
- clearCurrentAnimation();
setCurrentAnimation(controller.getTarget());
mConfig.userControlled = true;
mConfig.playbackController = controller;