Loading services/core/java/com/android/server/wm/AppCompatSizeCompatModePolicy.java +4 −1 Original line number Diff line number Diff line Loading @@ -361,7 +361,10 @@ class AppCompatSizeCompatModePolicy { if (enableSizeCompatModeImprovementsForConnectedDisplays()) { overrideConfig.touchscreen = fullConfig.touchscreen; overrideConfig.navigation = fullConfig.navigation; overrideConfig.fontScale = fullConfig.fontScale; overrideConfig.keyboard = fullConfig.keyboard; overrideConfig.keyboardHidden = fullConfig.keyboardHidden; overrideConfig.hardKeyboardHidden = fullConfig.hardKeyboardHidden; overrideConfig.navigationHidden = fullConfig.navigationHidden; } // The smallest screen width is the short side of screen bounds. Because the bounds // and density won't be changed, smallestScreenWidthDp is also fixed. Loading services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java +3 −2 Original line number Diff line number Diff line Loading @@ -572,8 +572,8 @@ public class SizeCompatTests extends WindowTestsBase { new TestDisplayContent.Builder(mAtm, 1000, 2000).build(); final InputDevice device = new InputDevice.Builder() .setAssociatedDisplayId(newDisplay.mDisplayId) .setSources(InputDevice.SOURCE_TOUCHSCREEN | InputDevice.SOURCE_TRACKBALL | InputDevice.KEYBOARD_TYPE_ALPHABETIC) .setKeyboardType(InputDevice.KEYBOARD_TYPE_ALPHABETIC) .setSources(InputDevice.SOURCE_TOUCHSCREEN | InputDevice.SOURCE_TRACKBALL) .build(); final InputDevice[] devices = {device}; doReturn(true).when(newDisplay.mWmService.mInputManager) Loading @@ -596,6 +596,7 @@ public class SizeCompatTests extends WindowTestsBase { assertEquals(originalTouchscreen, newConfiguration.touchscreen); assertEquals(originalNavigation, newConfiguration.navigation); assertEquals(originalKeyboard, newConfiguration.keyboard); // TODO(b/399749909): assert keyboardHidden, hardkeyboardHidden, and navigationHidden too. } @Test Loading Loading
services/core/java/com/android/server/wm/AppCompatSizeCompatModePolicy.java +4 −1 Original line number Diff line number Diff line Loading @@ -361,7 +361,10 @@ class AppCompatSizeCompatModePolicy { if (enableSizeCompatModeImprovementsForConnectedDisplays()) { overrideConfig.touchscreen = fullConfig.touchscreen; overrideConfig.navigation = fullConfig.navigation; overrideConfig.fontScale = fullConfig.fontScale; overrideConfig.keyboard = fullConfig.keyboard; overrideConfig.keyboardHidden = fullConfig.keyboardHidden; overrideConfig.hardKeyboardHidden = fullConfig.hardKeyboardHidden; overrideConfig.navigationHidden = fullConfig.navigationHidden; } // The smallest screen width is the short side of screen bounds. Because the bounds // and density won't be changed, smallestScreenWidthDp is also fixed. Loading
services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java +3 −2 Original line number Diff line number Diff line Loading @@ -572,8 +572,8 @@ public class SizeCompatTests extends WindowTestsBase { new TestDisplayContent.Builder(mAtm, 1000, 2000).build(); final InputDevice device = new InputDevice.Builder() .setAssociatedDisplayId(newDisplay.mDisplayId) .setSources(InputDevice.SOURCE_TOUCHSCREEN | InputDevice.SOURCE_TRACKBALL | InputDevice.KEYBOARD_TYPE_ALPHABETIC) .setKeyboardType(InputDevice.KEYBOARD_TYPE_ALPHABETIC) .setSources(InputDevice.SOURCE_TOUCHSCREEN | InputDevice.SOURCE_TRACKBALL) .build(); final InputDevice[] devices = {device}; doReturn(true).when(newDisplay.mWmService.mInputManager) Loading @@ -596,6 +596,7 @@ public class SizeCompatTests extends WindowTestsBase { assertEquals(originalTouchscreen, newConfiguration.touchscreen); assertEquals(originalNavigation, newConfiguration.navigation); assertEquals(originalKeyboard, newConfiguration.keyboard); // TODO(b/399749909): assert keyboardHidden, hardkeyboardHidden, and navigationHidden too. } @Test Loading