diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2021-06-21 22:32:23 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-06-21 22:32:23 +0000 |
commit | b3eafe97bbdf635ce9c099471206cae0dd90ed8e (patch) | |
tree | a6a64c11a78eb3bbecad27c46e931a5d204c7cfb /src/com/android/launcher3/anim | |
parent | 82fc5c83a5f319d637574b8193127e23dc2b028f (diff) | |
parent | de644313b0675cca9a67ec7c175a5d1ef7e65e22 (diff) | |
download | Launcher3-b3eafe97bbdf635ce9c099471206cae0dd90ed8e.tar.gz |
Merge "Fixing animation end not-called when cancelling state the animation recursively" into sc-dev
Diffstat (limited to 'src/com/android/launcher3/anim')
-rw-r--r-- | src/com/android/launcher3/anim/AnimatorPlaybackController.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/com/android/launcher3/anim/AnimatorPlaybackController.java b/src/com/android/launcher3/anim/AnimatorPlaybackController.java index 7d8b82a8eb..85ca280ba2 100644 --- a/src/com/android/launcher3/anim/AnimatorPlaybackController.java +++ b/src/com/android/launcher3/anim/AnimatorPlaybackController.java @@ -278,12 +278,19 @@ public class AnimatorPlaybackController implements ValueAnimator.AnimatorUpdateL } } - public void dispatchOnStart() { + public AnimatorPlaybackController dispatchOnStart() { callListenerCommandRecursively(mAnim, AnimatorListener::onAnimationStart); + return this; } - public void dispatchOnCancel() { + public AnimatorPlaybackController dispatchOnCancel() { callListenerCommandRecursively(mAnim, AnimatorListener::onAnimationCancel); + return this; + } + + public AnimatorPlaybackController dispatchOnEnd() { + callListenerCommandRecursively(mAnim, AnimatorListener::onAnimationEnd); + return this; } public void dispatchSetInterpolator(TimeInterpolator interpolator) { @@ -328,7 +335,7 @@ public class AnimatorPlaybackController implements ValueAnimator.AnimatorUpdateL public void onAnimationSuccess(Animator animator) { // We wait for the spring (if any) to finish running before completing the end callback. if (!mDispatched) { - callListenerCommandRecursively(mAnim, AnimatorListener::onAnimationEnd); + dispatchOnEnd(); if (mEndAction != null) { mEndAction.run(); } |