Loading services/core/java/com/android/server/wm/ActivityRecord.java +1 −5 Original line number Diff line number Diff line Loading @@ -7973,11 +7973,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A return false; } } // Activity should be resizable if the task is. final boolean isResizeable = task != null ? task.isResizeable() || isResizeable() : isResizeable(); return !isResizeable && (info.isFixedOrientation() || hasFixedAspectRatio()) return !isResizeable() && (info.isFixedOrientation() || hasFixedAspectRatio()) // The configuration of non-standard type should be enforced by system. // {@link WindowConfiguration#ACTIVITY_TYPE_STANDARD} is set when this activity is // added to a task, but this function is called when resolving the launch params, at Loading services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java +3 −3 Original line number Diff line number Diff line Loading @@ -961,7 +961,7 @@ public class SizeCompatTests extends WindowTestsBase { .setResizeMode(ActivityInfo.RESIZE_MODE_UNRESIZEABLE) .setScreenOrientation(SCREEN_ORIENTATION_PORTRAIT) .build(); assertFalse(activity.shouldCreateCompatDisplayInsets()); assertTrue(activity.shouldCreateCompatDisplayInsets()); // The non-resizable activity should not be size compat because it is on a resizable task // in multi-window mode. Loading Loading @@ -994,7 +994,7 @@ public class SizeCompatTests extends WindowTestsBase { } @Test public void testShouldNotCreateCompatDisplayInsetsWhenRootActivityIsResizeable() { public void testShouldCreateCompatDisplayInsetsWhenUnresizeableAndSupportsSizeChangesFalse() { setUpDisplaySizeWithApp(1000, 2500); // Make the task root resizable. Loading @@ -1003,7 +1003,7 @@ public class SizeCompatTests extends WindowTestsBase { // Create an activity on the same task. final ActivityRecord activity = buildActivityRecord(/* supportsSizeChanges= */false, RESIZE_MODE_UNRESIZEABLE, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); assertFalse(activity.shouldCreateCompatDisplayInsets()); assertTrue(activity.shouldCreateCompatDisplayInsets()); } @Test Loading Loading
services/core/java/com/android/server/wm/ActivityRecord.java +1 −5 Original line number Diff line number Diff line Loading @@ -7973,11 +7973,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A return false; } } // Activity should be resizable if the task is. final boolean isResizeable = task != null ? task.isResizeable() || isResizeable() : isResizeable(); return !isResizeable && (info.isFixedOrientation() || hasFixedAspectRatio()) return !isResizeable() && (info.isFixedOrientation() || hasFixedAspectRatio()) // The configuration of non-standard type should be enforced by system. // {@link WindowConfiguration#ACTIVITY_TYPE_STANDARD} is set when this activity is // added to a task, but this function is called when resolving the launch params, at Loading
services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java +3 −3 Original line number Diff line number Diff line Loading @@ -961,7 +961,7 @@ public class SizeCompatTests extends WindowTestsBase { .setResizeMode(ActivityInfo.RESIZE_MODE_UNRESIZEABLE) .setScreenOrientation(SCREEN_ORIENTATION_PORTRAIT) .build(); assertFalse(activity.shouldCreateCompatDisplayInsets()); assertTrue(activity.shouldCreateCompatDisplayInsets()); // The non-resizable activity should not be size compat because it is on a resizable task // in multi-window mode. Loading Loading @@ -994,7 +994,7 @@ public class SizeCompatTests extends WindowTestsBase { } @Test public void testShouldNotCreateCompatDisplayInsetsWhenRootActivityIsResizeable() { public void testShouldCreateCompatDisplayInsetsWhenUnresizeableAndSupportsSizeChangesFalse() { setUpDisplaySizeWithApp(1000, 2500); // Make the task root resizable. Loading @@ -1003,7 +1003,7 @@ public class SizeCompatTests extends WindowTestsBase { // Create an activity on the same task. final ActivityRecord activity = buildActivityRecord(/* supportsSizeChanges= */false, RESIZE_MODE_UNRESIZEABLE, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); assertFalse(activity.shouldCreateCompatDisplayInsets()); assertTrue(activity.shouldCreateCompatDisplayInsets()); } @Test Loading