summaryrefslogtreecommitdiff
path: root/src/com/android/launcher3/anim
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2021-06-21 22:32:23 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-06-21 22:32:23 +0000
commitb3eafe97bbdf635ce9c099471206cae0dd90ed8e (patch)
treea6a64c11a78eb3bbecad27c46e931a5d204c7cfb /src/com/android/launcher3/anim
parent82fc5c83a5f319d637574b8193127e23dc2b028f (diff)
parentde644313b0675cca9a67ec7c175a5d1ef7e65e22 (diff)
downloadLauncher3-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.java13
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();
}