Fixing animation end not-called when cancelling state the animation recursively
Bug: 190856140 Test: Manual Change-Id: I5d6a00c1d1c0e95e615b7f2115e3e4ebb56b987f
This commit is contained in:
1 parent
caabfa1519
commit
de644313b0
3 files changed
+28
-15
No files matched your search
@@ -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();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user