diff options
author | Tony Wickham <twickham@google.com> | 2018-05-10 09:55:07 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2018-05-10 10:03:54 -0700 |
commit | d4ece9a74ca81b376bf9e40fc112ad0133637fe8 (patch) | |
tree | d8111c09c9a269ce6679fb59005d4c82b0289659 /src | |
parent | cc0453c5e065446bc5faa0d683f80d6f3cec45b6 (diff) | |
download | android_packages_apps_Trebuchet-d4ece9a74ca81b376bf9e40fc112ad0133637fe8.tar.gz android_packages_apps_Trebuchet-d4ece9a74ca81b376bf9e40fc112ad0133637fe8.tar.bz2 android_packages_apps_Trebuchet-d4ece9a74ca81b376bf9e40fc112ad0133637fe8.zip |
Don't reapply state when setting user controlled animation
Bug: 79525106
Change-Id: Ia41a51559196d4aa657fae47727c7366d9073295
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher3/LauncherStateManager.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/com/android/launcher3/LauncherStateManager.java b/src/com/android/launcher3/LauncherStateManager.java index d04401e5c..cf0c7fcb6 100644 --- a/src/com/android/launcher3/LauncherStateManager.java +++ b/src/com/android/launcher3/LauncherStateManager.java @@ -387,6 +387,7 @@ public class LauncherStateManager { } public void setCurrentUserControlledAnimation(AnimatorPlaybackController controller) { + clearCurrentAnimation(); setCurrentAnimation(controller.getTarget()); mConfig.userControlled = true; mConfig.playbackController = controller; @@ -405,15 +406,10 @@ public class LauncherStateManager { } if (mConfig.playbackController != null && mConfig.playbackController.getTarget() == childAnim) { - if (mConfig.mCurrentAnimation != null) { - mConfig.mCurrentAnimation.removeListener(mConfig); - mConfig.mCurrentAnimation = null; - } - mConfig.playbackController = null; + clearCurrentAnimation(); break; } else if (mConfig.mCurrentAnimation == childAnim) { - mConfig.mCurrentAnimation.removeListener(mConfig); - mConfig.mCurrentAnimation = null; + clearCurrentAnimation(); break; } } @@ -425,6 +421,14 @@ public class LauncherStateManager { mConfig.setAnimation(anim, null); } + private void clearCurrentAnimation() { + if (mConfig.mCurrentAnimation != null) { + mConfig.mCurrentAnimation.removeListener(mConfig); + mConfig.mCurrentAnimation = null; + } + mConfig.playbackController = null; + } + private class StartAnimRunnable implements Runnable { private final AnimatorSet mAnim; |