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

Commit 2c019acb authored by Riddle Hsu's avatar Riddle Hsu Committed by Automerger Merge Worker
Browse files

Merge "Keep insets leash position before display transaction applies" into...

Merge "Keep insets leash position before display transaction applies" into udc-qpr-dev am: 5918648b

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



Change-Id: I60b4dcd1287c95afd06b053d8d70ce2807a3b870
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 7f8a00c6 5918648b
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -455,13 +455,11 @@ class AsyncRotationController extends FadeAnimationController implements Consume
     * or seamless transformation in a rotated display.
     */
    boolean shouldFreezeInsetsPosition(WindowState w) {
        if (TransitionController.SYNC_METHOD != BLASTSyncEngine.METHOD_BLAST) {
            // Expect a screenshot layer has covered the screen, so it is fine to let client side
            // insets animation runner update the position directly.
            return false;
        }
        return mTransitionOp != OP_LEGACY && !mIsStartTransactionCommitted
                && isTargetToken(w.mToken);
        // Non-change transition (OP_APP_SWITCH) and METHOD_BLAST don't use screenshot so the
        // insets should keep original position before the start transaction is applied.
        return mTransitionOp != OP_LEGACY && (mTransitionOp == OP_APP_SWITCH
                || TransitionController.SYNC_METHOD == BLASTSyncEngine.METHOD_BLAST)
                && !mIsStartTransactionCommitted && isTargetToken(w.mToken);
    }

    /**
+2 −1
Original line number Diff line number Diff line
@@ -1197,7 +1197,7 @@ public class TransitionTests extends WindowTestsBase {
        final AsyncRotationController asyncRotationController =
                mDisplayContent.getAsyncRotationController();
        assertNotNull(asyncRotationController);
        assertShouldFreezeInsetsPosition(asyncRotationController, statusBar, true);
        assertTrue(asyncRotationController.shouldFreezeInsetsPosition(statusBar));
        assertTrue(app.getTask().inTransition());

        player.start();
@@ -1222,6 +1222,7 @@ public class TransitionTests extends WindowTestsBase {
        assertFalse(asyncRotationController.isTargetToken(navBar.mToken));
        navBar.finishDrawing(null /* postDrawTransaction */, Integer.MAX_VALUE);
        assertTrue(asyncRotationController.isTargetToken(navBar.mToken));
        assertTrue(asyncRotationController.shouldFreezeInsetsPosition(navBar));

        player.startTransition();
        // Non-app windows should not be collected.