Loading services/core/java/com/android/server/wm/DisplayContent.java +3 −1 Original line number Diff line number Diff line Loading @@ -2834,7 +2834,9 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp // If the transition finished callback cannot match the token for some reason, make sure the // rotated state is cleared if it is already invisible. if (mFixedRotationLaunchingApp != null && !mFixedRotationLaunchingApp.isVisibleRequested() && !mFixedRotationLaunchingApp.isVisible()) { && !mFixedRotationLaunchingApp.isVisible() // In case the next transition still needs the existing transform. && !mTransitionController.isCollecting()) { clearFixedRotationLaunchingApp(); } // If there won't be a transition to notify the launch is done, then it should be ready to Loading services/tests/wmtests/src/com/android/server/wm/TransitionTests.java +10 −0 Original line number Diff line number Diff line Loading @@ -1320,6 +1320,7 @@ public class TransitionTests extends WindowTestsBase { mDisplayContent.setLastHasContent(); mDisplayContent.requestChangeTransition(1 /* changes */, null /* displayChange */, ActionChain.test()); assertTrue(mDisplayContent.mTransitionController.isCollecting()); assertNotNull(mDisplayContent.getAsyncRotationController()); mDisplayContent.setFixedRotationLaunchingAppUnchecked(null); assertNull("Clear rotation controller if rotation is not changed", Loading @@ -1332,6 +1333,15 @@ public class TransitionTests extends WindowTestsBase { mDisplayContent.setFixedRotationLaunchingAppUnchecked(null); assertNotNull("Keep rotation controller if rotation will be changed", mDisplayContent.getAsyncRotationController()); mDisplayContent.getDisplayRotation().setRotation( mDisplayContent.getWindowConfiguration().getRotation()); app.setVisibleRequested(false); app.setVisible(false); mDisplayContent.setFixedRotationLaunchingAppUnchecked(app); mDisplayContent.onTransitionFinished(); assertNotNull("Keep rotation controller if a transition is collecting", mDisplayContent.getAsyncRotationController()); } @Test Loading Loading
services/core/java/com/android/server/wm/DisplayContent.java +3 −1 Original line number Diff line number Diff line Loading @@ -2834,7 +2834,9 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp // If the transition finished callback cannot match the token for some reason, make sure the // rotated state is cleared if it is already invisible. if (mFixedRotationLaunchingApp != null && !mFixedRotationLaunchingApp.isVisibleRequested() && !mFixedRotationLaunchingApp.isVisible()) { && !mFixedRotationLaunchingApp.isVisible() // In case the next transition still needs the existing transform. && !mTransitionController.isCollecting()) { clearFixedRotationLaunchingApp(); } // If there won't be a transition to notify the launch is done, then it should be ready to Loading
services/tests/wmtests/src/com/android/server/wm/TransitionTests.java +10 −0 Original line number Diff line number Diff line Loading @@ -1320,6 +1320,7 @@ public class TransitionTests extends WindowTestsBase { mDisplayContent.setLastHasContent(); mDisplayContent.requestChangeTransition(1 /* changes */, null /* displayChange */, ActionChain.test()); assertTrue(mDisplayContent.mTransitionController.isCollecting()); assertNotNull(mDisplayContent.getAsyncRotationController()); mDisplayContent.setFixedRotationLaunchingAppUnchecked(null); assertNull("Clear rotation controller if rotation is not changed", Loading @@ -1332,6 +1333,15 @@ public class TransitionTests extends WindowTestsBase { mDisplayContent.setFixedRotationLaunchingAppUnchecked(null); assertNotNull("Keep rotation controller if rotation will be changed", mDisplayContent.getAsyncRotationController()); mDisplayContent.getDisplayRotation().setRotation( mDisplayContent.getWindowConfiguration().getRotation()); app.setVisibleRequested(false); app.setVisible(false); mDisplayContent.setFixedRotationLaunchingAppUnchecked(app); mDisplayContent.onTransitionFinished(); assertNotNull("Keep rotation controller if a transition is collecting", mDisplayContent.getAsyncRotationController()); } @Test Loading