diff options
author | Kevin <kevhan@google.com> | 2019-05-09 16:01:01 -0700 |
---|---|---|
committer | Kevin <kevhan@google.com> | 2019-05-09 16:01:01 -0700 |
commit | 63517a7a0721a5b3c176f9a80a78a2e19827dd26 (patch) | |
tree | 6bf910fb885c1dd0339871661c76757a8bff4a78 /go/quickstep/src/com | |
parent | 75d2bcbe41bb3a671bfba2cacb72455247053f17 (diff) | |
download | android_packages_apps_Trebuchet-63517a7a0721a5b3c176f9a80a78a2e19827dd26.tar.gz android_packages_apps_Trebuchet-63517a7a0721a5b3c176f9a80a78a2e19827dd26.tar.bz2 android_packages_apps_Trebuchet-63517a7a0721a5b3c176f9a80a78a2e19827dd26.zip |
Fix anim done callback not being called sometimes
We should call dispatchFinishedWhenDone in endAnimations instead of
calling dispatchAnimationsFinished as the former will run the listener.
However, we only do this if we were running animations in the first
place.
Bug: 132285006
Test: Build and manual test endAnimations() call
Change-Id: I31afdc4c9e3ef5f56eda6178569d5c264c16ae78
Diffstat (limited to 'go/quickstep/src/com')
-rw-r--r-- | go/quickstep/src/com/android/quickstep/ContentFillItemAnimator.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/go/quickstep/src/com/android/quickstep/ContentFillItemAnimator.java b/go/quickstep/src/com/android/quickstep/ContentFillItemAnimator.java index 87ae6955e..9b4ab8e30 100644 --- a/go/quickstep/src/com/android/quickstep/ContentFillItemAnimator.java +++ b/go/quickstep/src/com/android/quickstep/ContentFillItemAnimator.java @@ -235,6 +235,9 @@ public final class ContentFillItemAnimator extends SimpleItemAnimator { @Override public void endAnimations() { + if (!isRunning()) { + return; + } for (int i = mPendingAnims.size() - 1; i >= 0; i--) { PendingAnimation pendAnim = mPendingAnims.get(i); ViewHolder item = pendAnim.viewHolder; @@ -254,7 +257,7 @@ public final class ContentFillItemAnimator extends SimpleItemAnimator { ObjectAnimator anim = mRunningAnims.get(i); anim.end(); } - dispatchAnimationsFinished(); + dispatchFinishedWhenDone(); } @Override |