Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b16925e3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Sandbox more input-related configs instead of fontScale with SCM" into main

parents 8dea9444 417778c6
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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.
+3 −2
Original line number Diff line number Diff line
@@ -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)
@@ -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