Loading services/core/java/com/android/server/wm/DisplayContent.java +12 −0 Original line number Diff line number Diff line Loading @@ -2908,6 +2908,18 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp && !mDisplayRotation.isRotatingSeamlessly()) { clearFixedRotationLaunchingApp(); } // If there won't be a transition to notify the launch is done, then it should be ready to // update with display orientation. E.g. a translucent activity enters pip from a task which // contains another opaque activity. if (mFixedRotationLaunchingApp != null && mFixedRotationLaunchingApp.isVisible() && !mTransitionController.isCollecting() && !mAtmService.mBackNavigationController.isMonitoringFinishTransition()) { final Transition finishTransition = mTransitionController.mFinishingTransition; if (finishTransition == null || !finishTransition.mParticipants.contains( mFixedRotationLaunchingApp)) { continueUpdateOrientationForDiffOrienLaunchingApp(); } } } /** Loading services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java +5 −0 Original line number Diff line number Diff line Loading @@ -1877,6 +1877,11 @@ public class DisplayContentTests extends WindowTestsBase { assertEquals("Display must be portrait after closing the translucent activity", Configuration.ORIENTATION_PORTRAIT, mDisplayContent.getConfiguration().orientation); mDisplayContent.setFixedRotationLaunchingAppUnchecked(nonTopVisible); mDisplayContent.onTransitionFinished(); assertFalse("Complete fixed rotation if not in a transition", mDisplayContent.hasTopFixedRotationLaunchingApp()); } @Test Loading Loading
services/core/java/com/android/server/wm/DisplayContent.java +12 −0 Original line number Diff line number Diff line Loading @@ -2908,6 +2908,18 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp && !mDisplayRotation.isRotatingSeamlessly()) { clearFixedRotationLaunchingApp(); } // If there won't be a transition to notify the launch is done, then it should be ready to // update with display orientation. E.g. a translucent activity enters pip from a task which // contains another opaque activity. if (mFixedRotationLaunchingApp != null && mFixedRotationLaunchingApp.isVisible() && !mTransitionController.isCollecting() && !mAtmService.mBackNavigationController.isMonitoringFinishTransition()) { final Transition finishTransition = mTransitionController.mFinishingTransition; if (finishTransition == null || !finishTransition.mParticipants.contains( mFixedRotationLaunchingApp)) { continueUpdateOrientationForDiffOrienLaunchingApp(); } } } /** Loading
services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java +5 −0 Original line number Diff line number Diff line Loading @@ -1877,6 +1877,11 @@ public class DisplayContentTests extends WindowTestsBase { assertEquals("Display must be portrait after closing the translucent activity", Configuration.ORIENTATION_PORTRAIT, mDisplayContent.getConfiguration().orientation); mDisplayContent.setFixedRotationLaunchingAppUnchecked(nonTopVisible); mDisplayContent.onTransitionFinished(); assertFalse("Complete fixed rotation if not in a transition", mDisplayContent.hasTopFixedRotationLaunchingApp()); } @Test Loading