Loading core/res/res/values/config.xml +1 −1 Original line number Diff line number Diff line Loading @@ -5218,7 +5218,7 @@ <!-- Vertical position of a center of the letterboxed app window. 0 corresponds to the upper side of the screen and 1 to the lower side. If given value < 0 or > 1, it is ignored and central position is used (0.5). --> <item name="config_letterboxVerticalPositionMultiplier" format="float" type="dimen">0.5</item> <item name="config_letterboxVerticalPositionMultiplier" format="float" type="dimen">0.0</item> <!-- Whether horizontal reachability repositioning is allowed for letterboxed fullscreen apps. --> Loading services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java +9 −7 Original line number Diff line number Diff line Loading @@ -2267,7 +2267,7 @@ public class SizeCompatTests extends WindowTestsBase { prepareUnresizable(mActivity, /* maxAspect */ 1.1f, SCREEN_ORIENTATION_UNSPECIFIED); // Bounds are letterboxed to respect the provided max aspect ratio. assertEquals(mActivity.getBounds(), new Rect(0, 850, 1000, 1950)); assertEquals(mActivity.getBounds(), new Rect(0, 0, 1000, 1100)); // Move activity to split screen which has landscape size. mTask.reparent(organizer.mPrimary, POSITION_TOP, /* moveParents */ false, "test"); Loading Loading @@ -2334,6 +2334,8 @@ public class SizeCompatTests extends WindowTestsBase { @Test public void testLetterboxDetailsForStatusBar_letterboxNotOverlappingStatusBar() { // Align to center so that we don't overlap with the status bar mAtm.mWindowManager.mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(0.5f); final DisplayContent display = new TestDisplayContent.Builder(mAtm, 1000, 2800) .setNotch(100) .build(); Loading Loading @@ -2450,7 +2452,7 @@ public class SizeCompatTests extends WindowTestsBase { // At launch. /* fixedOrientationLetterbox */ new Rect(0, 0, 700, 1400), // After 90 degree rotation. /* sizeCompatUnscaled */ new Rect(0, 700, 700, 2100), /* sizeCompatUnscaled */ new Rect(0, 0, 700, 1400), // After the display is resized to (700, 1400). /* sizeCompatScaled */ new Rect(0, 0, 350, 700)); } Loading @@ -2463,7 +2465,7 @@ public class SizeCompatTests extends WindowTestsBase { // At launch. /* fixedOrientationLetterbox */ new Rect(1050, 0, 1750, 1400), // After 90 degree rotation. /* sizeCompatUnscaled */ new Rect(350, 700, 1050, 2100), /* sizeCompatUnscaled */ new Rect(350, 0, 1050, 1400), // After the display is resized to (700, 1400). /* sizeCompatScaled */ new Rect(525, 0, 875, 700)); } Loading @@ -2478,7 +2480,7 @@ public class SizeCompatTests extends WindowTestsBase { // At launch. /* fixedOrientationLetterbox */ new Rect(1050, 0, 1750, 1400), // After 90 degree rotation. /* sizeCompatUnscaled */ new Rect(350, 700, 1050, 2100), /* sizeCompatUnscaled */ new Rect(350, 0, 1050, 1400), // After the display is resized to (700, 1400). /* sizeCompatScaled */ new Rect(525, 0, 875, 700)); Loading @@ -2488,7 +2490,7 @@ public class SizeCompatTests extends WindowTestsBase { // At launch. /* fixedOrientationLetterbox */ new Rect(1050, 0, 1750, 1400), // After 90 degree rotation. /* sizeCompatUnscaled */ new Rect(350, 700, 1050, 2100), /* sizeCompatUnscaled */ new Rect(350, 0, 1050, 1400), // After the display is resized to (700, 1400). /* sizeCompatScaled */ new Rect(525, 0, 875, 700)); } Loading @@ -2501,7 +2503,7 @@ public class SizeCompatTests extends WindowTestsBase { // At launch. /* fixedOrientationLetterbox */ new Rect(2100, 0, 2800, 1400), // After 90 degree rotation. /* sizeCompatUnscaled */ new Rect(700, 700, 1400, 2100), /* sizeCompatUnscaled */ new Rect(700, 0, 1400, 1400), // After the display is resized to (700, 1400). /* sizeCompatScaled */ new Rect(1050, 0, 1400, 700)); } Loading Loading @@ -3028,7 +3030,7 @@ public class SizeCompatTests extends WindowTestsBase { rotateDisplay(mActivity.mDisplayContent, ROTATION_90); assertTrue(mActivity.inSizeCompatMode()); // Activity is in size compat mode but not scaled. assertEquals(new Rect(0, 1050, 1400, 1750), mActivity.getBounds()); assertEquals(new Rect(0, 0, 1400, 700), mActivity.getBounds()); } private void assertVerticalPositionForDifferentDisplayConfigsForPortraitActivity( Loading services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java +1 −1 Original line number Diff line number Diff line Loading @@ -238,7 +238,7 @@ class WindowTestsBase extends SystemServiceTestsBase { // Ensure letterbox vertical position multiplier is not overridden on any device target. // {@link com.android.internal.R.dimen.config_letterboxHorizontalPositionMultiplier}, // may be set on some device form factors. mAtm.mWindowManager.mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(0.5f); mAtm.mWindowManager.mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(0.0f); // Ensure letterbox horizontal reachability treatment isn't overridden on any device target. // {@link com.android.internal.R.bool.config_letterboxIsHorizontalReachabilityEnabled}, // may be set on some device form factors. Loading Loading
core/res/res/values/config.xml +1 −1 Original line number Diff line number Diff line Loading @@ -5218,7 +5218,7 @@ <!-- Vertical position of a center of the letterboxed app window. 0 corresponds to the upper side of the screen and 1 to the lower side. If given value < 0 or > 1, it is ignored and central position is used (0.5). --> <item name="config_letterboxVerticalPositionMultiplier" format="float" type="dimen">0.5</item> <item name="config_letterboxVerticalPositionMultiplier" format="float" type="dimen">0.0</item> <!-- Whether horizontal reachability repositioning is allowed for letterboxed fullscreen apps. --> Loading
services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java +9 −7 Original line number Diff line number Diff line Loading @@ -2267,7 +2267,7 @@ public class SizeCompatTests extends WindowTestsBase { prepareUnresizable(mActivity, /* maxAspect */ 1.1f, SCREEN_ORIENTATION_UNSPECIFIED); // Bounds are letterboxed to respect the provided max aspect ratio. assertEquals(mActivity.getBounds(), new Rect(0, 850, 1000, 1950)); assertEquals(mActivity.getBounds(), new Rect(0, 0, 1000, 1100)); // Move activity to split screen which has landscape size. mTask.reparent(organizer.mPrimary, POSITION_TOP, /* moveParents */ false, "test"); Loading Loading @@ -2334,6 +2334,8 @@ public class SizeCompatTests extends WindowTestsBase { @Test public void testLetterboxDetailsForStatusBar_letterboxNotOverlappingStatusBar() { // Align to center so that we don't overlap with the status bar mAtm.mWindowManager.mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(0.5f); final DisplayContent display = new TestDisplayContent.Builder(mAtm, 1000, 2800) .setNotch(100) .build(); Loading Loading @@ -2450,7 +2452,7 @@ public class SizeCompatTests extends WindowTestsBase { // At launch. /* fixedOrientationLetterbox */ new Rect(0, 0, 700, 1400), // After 90 degree rotation. /* sizeCompatUnscaled */ new Rect(0, 700, 700, 2100), /* sizeCompatUnscaled */ new Rect(0, 0, 700, 1400), // After the display is resized to (700, 1400). /* sizeCompatScaled */ new Rect(0, 0, 350, 700)); } Loading @@ -2463,7 +2465,7 @@ public class SizeCompatTests extends WindowTestsBase { // At launch. /* fixedOrientationLetterbox */ new Rect(1050, 0, 1750, 1400), // After 90 degree rotation. /* sizeCompatUnscaled */ new Rect(350, 700, 1050, 2100), /* sizeCompatUnscaled */ new Rect(350, 0, 1050, 1400), // After the display is resized to (700, 1400). /* sizeCompatScaled */ new Rect(525, 0, 875, 700)); } Loading @@ -2478,7 +2480,7 @@ public class SizeCompatTests extends WindowTestsBase { // At launch. /* fixedOrientationLetterbox */ new Rect(1050, 0, 1750, 1400), // After 90 degree rotation. /* sizeCompatUnscaled */ new Rect(350, 700, 1050, 2100), /* sizeCompatUnscaled */ new Rect(350, 0, 1050, 1400), // After the display is resized to (700, 1400). /* sizeCompatScaled */ new Rect(525, 0, 875, 700)); Loading @@ -2488,7 +2490,7 @@ public class SizeCompatTests extends WindowTestsBase { // At launch. /* fixedOrientationLetterbox */ new Rect(1050, 0, 1750, 1400), // After 90 degree rotation. /* sizeCompatUnscaled */ new Rect(350, 700, 1050, 2100), /* sizeCompatUnscaled */ new Rect(350, 0, 1050, 1400), // After the display is resized to (700, 1400). /* sizeCompatScaled */ new Rect(525, 0, 875, 700)); } Loading @@ -2501,7 +2503,7 @@ public class SizeCompatTests extends WindowTestsBase { // At launch. /* fixedOrientationLetterbox */ new Rect(2100, 0, 2800, 1400), // After 90 degree rotation. /* sizeCompatUnscaled */ new Rect(700, 700, 1400, 2100), /* sizeCompatUnscaled */ new Rect(700, 0, 1400, 1400), // After the display is resized to (700, 1400). /* sizeCompatScaled */ new Rect(1050, 0, 1400, 700)); } Loading Loading @@ -3028,7 +3030,7 @@ public class SizeCompatTests extends WindowTestsBase { rotateDisplay(mActivity.mDisplayContent, ROTATION_90); assertTrue(mActivity.inSizeCompatMode()); // Activity is in size compat mode but not scaled. assertEquals(new Rect(0, 1050, 1400, 1750), mActivity.getBounds()); assertEquals(new Rect(0, 0, 1400, 700), mActivity.getBounds()); } private void assertVerticalPositionForDifferentDisplayConfigsForPortraitActivity( Loading
services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java +1 −1 Original line number Diff line number Diff line Loading @@ -238,7 +238,7 @@ class WindowTestsBase extends SystemServiceTestsBase { // Ensure letterbox vertical position multiplier is not overridden on any device target. // {@link com.android.internal.R.dimen.config_letterboxHorizontalPositionMultiplier}, // may be set on some device form factors. mAtm.mWindowManager.mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(0.5f); mAtm.mWindowManager.mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(0.0f); // Ensure letterbox horizontal reachability treatment isn't overridden on any device target. // {@link com.android.internal.R.bool.config_letterboxIsHorizontalReachabilityEnabled}, // may be set on some device form factors. Loading