Loading core/java/android/window/flags/windowing_frontend.aconfig +0 −7 Original line number Diff line number Diff line Loading @@ -220,13 +220,6 @@ flag { } } flag { name: "respect_non_top_visible_fixed_orientation" namespace: "windowing_frontend" description: "If top activity is not opaque, respect the fixed orientation of activity behind it" bug: "283514860" } flag { name: "insets_decoupled_configuration" namespace: "windowing_frontend" Loading services/core/java/com/android/server/wm/DisplayContent.java +6 −22 Original line number Diff line number Diff line Loading @@ -1781,9 +1781,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp * different fixed orientations will still keep their original appearances. */ void applyFixedRotationForNonTopVisibleActivityIfNeeded() { if (!mWmService.mFlags.mRespectNonTopVisibleFixedOrientation) { return; } final ActivityRecord orientationSrcApp = getLastOrientationSourceApp(); if (orientationSrcApp == null || orientationSrcApp.fillsParent()) { return; Loading @@ -1807,9 +1804,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp * then the bottom one will apply the fixed rotation transform for its orientation. */ void applyFixedRotationForNonTopVisibleActivityIfNeeded(@NonNull ActivityRecord ar) { if (!mWmService.mFlags.mRespectNonTopVisibleFixedOrientation) { return; } final ActivityRecord orientationSrcApp = getLastOrientationSourceApp(); if (orientationSrcApp != null) { applyFixedRotationForNonTopVisibleActivityIfNeeded(ar, Loading Loading @@ -1916,8 +1910,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp return false; } if (r.hasFixedRotationTransform()) { if (mWmService.mFlags.mRespectNonTopVisibleFixedOrientation && mFixedRotationLaunchingApp == null) { if (mFixedRotationLaunchingApp == null) { // It could be finishing the previous top translucent activity, and the next fixed // orientation activity becomes the current top. setFixedRotationLaunchingAppUnchecked(r, Loading @@ -1926,18 +1919,11 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp // It has been set and not yet finished. return true; } if (mWmService.mFlags.mRespectNonTopVisibleFixedOrientation) { if (r.isReportedDrawn()) { // It is late for a drawn app. Either this is already a stable state or it needs // a rotation animation to handle the change. return false; } } else if (!r.occludesParent() || r.isReportedDrawn()) { // While entering or leaving a translucent or floating activity (e.g. dialog style), // there is a visible activity in the background. Then it still needs rotation animation // to cover the activity configuration change. return false; } if (checkOpening) { if (!mTransitionController.isCollecting(r)) { // Apply normal rotation animation in case the activity changes requested Loading Loading @@ -6735,7 +6721,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp final boolean rotationChanged = super.setIgnoreOrientationRequest(ignoreOrientationRequest); mWmService.mDisplayWindowSettings.setIgnoreOrientationRequest( this, mSetIgnoreOrientationRequest); if (ignoreOrientationRequest && mWmService.mFlags.mRespectNonTopVisibleFixedOrientation) { if (ignoreOrientationRequest) { forAllActivities(r -> { r.finishFixedRotationTransform(); }); Loading Loading @@ -6971,9 +6957,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp // In most cases this is a no-op if the activity doesn't have fixed rotation. // Otherwise it could be from finishing recents animation while the display has // different orientation. if (!mWmService.mFlags.mRespectNonTopVisibleFixedOrientation) { r.finishFixedRotationTransform(); } else if (!r.isVisible()) { if (!r.isVisible()) { r.finishFixedRotationTransform(); } return; Loading services/core/java/com/android/server/wm/TransparentPolicy.java +0 −3 Original line number Diff line number Diff line Loading @@ -338,9 +338,6 @@ class TransparentPolicy { if (task == null || task.getWindowingMode() == WINDOWING_MODE_FREEFORM) { return false; } if (!mActivityRecord.mWmService.mFlags.mRespectNonTopVisibleFixedOrientation) { return true; } // Do not enable the policy if the activity can affect display orientation. final int orientation = mActivityRecord.getOverrideOrientation(); return orientation == SCREEN_ORIENTATION_UNSPECIFIED Loading services/core/java/com/android/server/wm/WindowManagerFlags.java +0 −3 Original line number Diff line number Diff line Loading @@ -50,9 +50,6 @@ class WindowManagerFlags { final boolean mInsetsDecoupledConfiguration = Flags.insetsDecoupledConfiguration(); final boolean mRespectNonTopVisibleFixedOrientation = Flags.respectNonTopVisibleFixedOrientation(); final boolean mAodTransition = Flags.aodTransition(); final boolean mDispatchFirstKeyguardLockedState = Flags.dispatchFirstKeyguardLockedState(); Loading services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java +0 −1 Original line number Diff line number Diff line Loading @@ -1752,7 +1752,6 @@ public class DisplayContentTests extends WindowTestsBase { assertFalse(mDisplayContent.hasTopFixedRotationLaunchingApp()); } @EnableFlags(com.android.window.flags.Flags.FLAG_RESPECT_NON_TOP_VISIBLE_FIXED_ORIENTATION) @Test public void testRespectNonTopVisibleFixedOrientation() { spyOn(mWm.mAppCompatConfiguration); Loading Loading
core/java/android/window/flags/windowing_frontend.aconfig +0 −7 Original line number Diff line number Diff line Loading @@ -220,13 +220,6 @@ flag { } } flag { name: "respect_non_top_visible_fixed_orientation" namespace: "windowing_frontend" description: "If top activity is not opaque, respect the fixed orientation of activity behind it" bug: "283514860" } flag { name: "insets_decoupled_configuration" namespace: "windowing_frontend" Loading
services/core/java/com/android/server/wm/DisplayContent.java +6 −22 Original line number Diff line number Diff line Loading @@ -1781,9 +1781,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp * different fixed orientations will still keep their original appearances. */ void applyFixedRotationForNonTopVisibleActivityIfNeeded() { if (!mWmService.mFlags.mRespectNonTopVisibleFixedOrientation) { return; } final ActivityRecord orientationSrcApp = getLastOrientationSourceApp(); if (orientationSrcApp == null || orientationSrcApp.fillsParent()) { return; Loading @@ -1807,9 +1804,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp * then the bottom one will apply the fixed rotation transform for its orientation. */ void applyFixedRotationForNonTopVisibleActivityIfNeeded(@NonNull ActivityRecord ar) { if (!mWmService.mFlags.mRespectNonTopVisibleFixedOrientation) { return; } final ActivityRecord orientationSrcApp = getLastOrientationSourceApp(); if (orientationSrcApp != null) { applyFixedRotationForNonTopVisibleActivityIfNeeded(ar, Loading Loading @@ -1916,8 +1910,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp return false; } if (r.hasFixedRotationTransform()) { if (mWmService.mFlags.mRespectNonTopVisibleFixedOrientation && mFixedRotationLaunchingApp == null) { if (mFixedRotationLaunchingApp == null) { // It could be finishing the previous top translucent activity, and the next fixed // orientation activity becomes the current top. setFixedRotationLaunchingAppUnchecked(r, Loading @@ -1926,18 +1919,11 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp // It has been set and not yet finished. return true; } if (mWmService.mFlags.mRespectNonTopVisibleFixedOrientation) { if (r.isReportedDrawn()) { // It is late for a drawn app. Either this is already a stable state or it needs // a rotation animation to handle the change. return false; } } else if (!r.occludesParent() || r.isReportedDrawn()) { // While entering or leaving a translucent or floating activity (e.g. dialog style), // there is a visible activity in the background. Then it still needs rotation animation // to cover the activity configuration change. return false; } if (checkOpening) { if (!mTransitionController.isCollecting(r)) { // Apply normal rotation animation in case the activity changes requested Loading Loading @@ -6735,7 +6721,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp final boolean rotationChanged = super.setIgnoreOrientationRequest(ignoreOrientationRequest); mWmService.mDisplayWindowSettings.setIgnoreOrientationRequest( this, mSetIgnoreOrientationRequest); if (ignoreOrientationRequest && mWmService.mFlags.mRespectNonTopVisibleFixedOrientation) { if (ignoreOrientationRequest) { forAllActivities(r -> { r.finishFixedRotationTransform(); }); Loading Loading @@ -6971,9 +6957,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp // In most cases this is a no-op if the activity doesn't have fixed rotation. // Otherwise it could be from finishing recents animation while the display has // different orientation. if (!mWmService.mFlags.mRespectNonTopVisibleFixedOrientation) { r.finishFixedRotationTransform(); } else if (!r.isVisible()) { if (!r.isVisible()) { r.finishFixedRotationTransform(); } return; Loading
services/core/java/com/android/server/wm/TransparentPolicy.java +0 −3 Original line number Diff line number Diff line Loading @@ -338,9 +338,6 @@ class TransparentPolicy { if (task == null || task.getWindowingMode() == WINDOWING_MODE_FREEFORM) { return false; } if (!mActivityRecord.mWmService.mFlags.mRespectNonTopVisibleFixedOrientation) { return true; } // Do not enable the policy if the activity can affect display orientation. final int orientation = mActivityRecord.getOverrideOrientation(); return orientation == SCREEN_ORIENTATION_UNSPECIFIED Loading
services/core/java/com/android/server/wm/WindowManagerFlags.java +0 −3 Original line number Diff line number Diff line Loading @@ -50,9 +50,6 @@ class WindowManagerFlags { final boolean mInsetsDecoupledConfiguration = Flags.insetsDecoupledConfiguration(); final boolean mRespectNonTopVisibleFixedOrientation = Flags.respectNonTopVisibleFixedOrientation(); final boolean mAodTransition = Flags.aodTransition(); final boolean mDispatchFirstKeyguardLockedState = Flags.dispatchFirstKeyguardLockedState(); Loading
services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java +0 −1 Original line number Diff line number Diff line Loading @@ -1752,7 +1752,6 @@ public class DisplayContentTests extends WindowTestsBase { assertFalse(mDisplayContent.hasTopFixedRotationLaunchingApp()); } @EnableFlags(com.android.window.flags.Flags.FLAG_RESPECT_NON_TOP_VISIBLE_FIXED_ORIENTATION) @Test public void testRespectNonTopVisibleFixedOrientation() { spyOn(mWm.mAppCompatConfiguration); Loading