diff options
author | Kevin <kevhan@google.com> | 2019-05-09 15:26:52 -0700 |
---|---|---|
committer | Kevin <kevhan@google.com> | 2019-05-09 16:08:09 -0700 |
commit | 4ff2a278a20821fc11e301cc1db555227c8eab02 (patch) | |
tree | 5cae5398df5a6f9911a591bb4f03cad4c42b2394 /go | |
parent | 75d2bcbe41bb3a671bfba2cacb72455247053f17 (diff) | |
download | android_packages_apps_Trebuchet-4ff2a278a20821fc11e301cc1db555227c8eab02.tar.gz android_packages_apps_Trebuchet-4ff2a278a20821fc11e301cc1db555227c8eab02.tar.bz2 android_packages_apps_Trebuchet-4ff2a278a20821fc11e301cc1db555227c8eab02.zip |
Use Animator cancel instead of end
Animtor's cancel() skips some animator init logic that end() does so
we'd like to use that instead. The on end callback will still set the
animation value to its target end value so this doesn't affect
correctness.
Bug: 132285006
Test: Build and manual test endAnimations
Change-Id: I450a888c7b37a7dc74f24035d9abc5bda1cbbbd8
Diffstat (limited to 'go')
-rw-r--r-- | go/quickstep/src/com/android/quickstep/ContentFillItemAnimator.java | 4 |
1 files changed, 3 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..c5e4b839f 100644 --- a/go/quickstep/src/com/android/quickstep/ContentFillItemAnimator.java +++ b/go/quickstep/src/com/android/quickstep/ContentFillItemAnimator.java @@ -180,6 +180,7 @@ public final class ContentFillItemAnimator extends SimpleItemAnimator { @Override public void onAnimationEnd(Animator animation) { + CONTENT_TRANSITION_PROGRESS.set(itemView, 1.0f); dispatchChangeFinished(viewHolder, true /* oldItem */); mRunningAnims.remove(anim); dispatchFinishedWhenDone(); @@ -252,7 +253,8 @@ public final class ContentFillItemAnimator extends SimpleItemAnimator { } for (int i = mRunningAnims.size() - 1; i >= 0; i--) { ObjectAnimator anim = mRunningAnims.get(i); - anim.end(); + // This calls the on end animation callback which will set values to their end target. + anim.cancel(); } dispatchAnimationsFinished(); } |