Run pending animation end callback immediately on cancel
To avoid calling the end callback while the next new animation
is started.
For example, at the last frame of anim_1's onAnimationUpdate,
it calls
anim_1.cancel();
anim_2.start();
The correct order should be
anim_1 onAnimationEnd
anim_2 onAnimationStart
instead of
anim_2 onAnimationStart
anim_1 onAnimationEnd
Bug: 399819784
Bug: 300035126
Flag: com.android.window.flags.system_ui_post_animation_end
Test: atest ValueAnimatorTests#testCancelOnPendingEndListener
AnimatorSetCallsTest#testCancelOnPendingEndListener
Change-Id: Ic28282128708d1722f039a6b0b414c6af8950c4b
Loading
Please register or sign in to comment