Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f6e4a97 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Return running state before calling animation end callback

This only affects if setPostNotifyEndListenerEnabled is set.
Previously, anim.isRunning() returns false if the end callback is
posted, then the app may miss to call end or cancel. And if the
app starts a new animation immediately, the callbacks between the
old and new animations will have overlap.

So when the end listener is pending, isRunning() and isStarted()
should return true. And if app invoke cancel() or end(), the
pending end listener should be called and consumed immediately.

Fix: 399819784
Bug: 300035126
Flag: com.android.window.flags.system_ui_post_animation_end
Test: atest ValueAnimatorTests#testEndOnPendingEndListener
            AnimatorSetCallsTest#testEndOnPendingEndListener

Change-Id: Ie3aa2ef14cb53d91a04fdfac012ab63494c69990
parent b16925e3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment