diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2018-04-09 16:30:51 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2018-04-09 16:31:12 -0700 |
commit | b35f50cf55742a26c6e319ec324f9118c6886b88 (patch) | |
tree | 5a2136210b748b4f6ec0f98afea0daee0f008a9b /src/com/android/launcher3/LauncherStateManager.java | |
parent | 55156007320b83940d285eab9b0ba3dc149c634a (diff) | |
download | android_packages_apps_Trebuchet-b35f50cf55742a26c6e319ec324f9118c6886b88.tar.gz android_packages_apps_Trebuchet-b35f50cf55742a26c6e319ec324f9118c6886b88.tar.bz2 android_packages_apps_Trebuchet-b35f50cf55742a26c6e319ec324f9118c6886b88.zip |
Do not reset the previous state animation, if it is a part of the new state animaiton
Change-Id: Ic433db8cd2b0701923185d0a2db2a4361567437f
Diffstat (limited to 'src/com/android/launcher3/LauncherStateManager.java')
-rw-r--r-- | src/com/android/launcher3/LauncherStateManager.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/com/android/launcher3/LauncherStateManager.java b/src/com/android/launcher3/LauncherStateManager.java index 534c8ae35..d5e6a9ddd 100644 --- a/src/com/android/launcher3/LauncherStateManager.java +++ b/src/com/android/launcher3/LauncherStateManager.java @@ -354,8 +354,17 @@ public class LauncherStateManager { /** * Sets the animation as the current state animation, i.e., canceled when * starting another animation and may block some launcher interactions while running. + * + * @param childAnimations Set of animations with the new target is controlling. */ - public void setCurrentAnimation(AnimatorSet anim) { + public void setCurrentAnimation(AnimatorSet anim, Animator... childAnimations) { + for (Animator childAnim : childAnimations) { + if (childAnim != null && mConfig.mCurrentAnimation == childAnim) { + mConfig.mCurrentAnimation.removeListener(mConfig); + mConfig.mCurrentAnimation = null; + break; + } + } boolean reapplyNeeded = mConfig.mCurrentAnimation != null; cancelAnimation(); if (reapplyNeeded) { |