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

Commit 65a0586b authored by Winson Chung's avatar Winson Chung
Browse files

Initialize the animation leash with the current values

- We already do this with remote animations, need to do this with the
  recents animation to ensure that layers are set correctly by default.

Bug: 77981669
Test: Open app, open translucent activity, swipe up and ensure that they
      don't reorder during the transition

Change-Id: I492d12b871c602e348ea0623752787b8b0ac3f10
parent 437b252c
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -549,7 +549,12 @@ public class RecentsAnimationController implements DeathRecipient {
        @Override
        @Override
        public void startAnimation(SurfaceControl animationLeash, Transaction t,
        public void startAnimation(SurfaceControl animationLeash, Transaction t,
                OnAnimationFinishedCallback finishCallback) {
                OnAnimationFinishedCallback finishCallback) {
            // Restore z-layering, position and stack crop until client has a chance to modify it.
            t.setLayer(animationLeash, mTask.getPrefixOrderIndex());
            t.setPosition(animationLeash, mPosition.x, mPosition.y);
            t.setPosition(animationLeash, mPosition.x, mPosition.y);
            mTmpRect.set(mBounds);
            mTmpRect.offsetTo(0, 0);
            t.setWindowCrop(animationLeash, mTmpRect);
            mCapturedLeash = animationLeash;
            mCapturedLeash = animationLeash;
            mCapturedFinishCallback = finishCallback;
            mCapturedFinishCallback = finishCallback;
        }
        }