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

Commit c22a47b5 authored by Hongwei Wang's avatar Hongwei Wang Committed by Automerger Merge Worker
Browse files

Merge "Avoid double end on PipTransitionAnimator" into udc-dev am: 839aca67...

Merge "Avoid double end on PipTransitionAnimator" into udc-dev am: 839aca67 am: 2a93920d am: 27f4ecaa

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23270226



Change-Id: Ied7f584dcabd96a943f45f6a639e7c98acf3afc9
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents a5a97c42 27f4ecaa
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -328,6 +328,8 @@ public class PipAnimationController {
        private PipSurfaceTransactionHelper mSurfaceTransactionHelper;
        private @TransitionDirection int mTransitionDirection;
        protected PipContentOverlay mContentOverlay;
        // Flag to avoid double-end
        private boolean mHasRequestedEnd;

        private PipTransitionAnimator(TaskInfo taskInfo, SurfaceControl leash,
                @AnimationType int animationType,
@@ -357,6 +359,7 @@ public class PipAnimationController {

        @Override
        public void onAnimationUpdate(ValueAnimator animation) {
            if (mHasRequestedEnd) return;
            applySurfaceControlTransaction(mLeash,
                    mSurfaceControlTransactionFactory.getTransaction(),
                    animation.getAnimatedFraction());
@@ -364,6 +367,8 @@ public class PipAnimationController {

        @Override
        public void onAnimationEnd(Animator animation) {
            if (mHasRequestedEnd) return;
            mHasRequestedEnd = true;
            mCurrentValue = mEndValue;
            final SurfaceControl.Transaction tx =
                    mSurfaceControlTransactionFactory.getTransaction();