Loading services/core/java/com/android/server/wm/AsyncRotationController.java +5 −7 Original line number Diff line number Diff line Loading @@ -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); } /** Loading services/tests/wmtests/src/com/android/server/wm/TransitionTests.java +2 −1 Original line number Diff line number Diff line Loading @@ -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(); Loading @@ -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. Loading Loading
services/core/java/com/android/server/wm/AsyncRotationController.java +5 −7 Original line number Diff line number Diff line Loading @@ -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); } /** Loading
services/tests/wmtests/src/com/android/server/wm/TransitionTests.java +2 −1 Original line number Diff line number Diff line Loading @@ -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(); Loading @@ -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. Loading