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

Commit 6c5bfcb4 authored by Jamie Garside's avatar Jamie Garside
Browse files

Update the bouncer to be able to move to either side of a wide screen.

This is currently enabled by settings
persist.sysui.keyguard.one_handed_keyguard_enabled to true. If enabled,
this will cause "one-handed able" security modes to be measured with
half of the width of the SecurityViewContainer. Tapping either side of
the screen will then move the keyguard by changing the margins.

There's some flaws here, but it's a start. There's a frame of the
bouncer being on the wrong side of the screen if the keyguard is on the
right, and it doesn't respond to opening/closing the device properly yet.

Bug: b/170858298
Change-Id: Ib997b9b3cb4ca7a069c805c7a8f3a79434eebd4c
Test: Incoming :)
parent 7de88bce
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -13580,6 +13580,28 @@ public final class Settings {
        public static final String POWER_BUTTON_VERY_LONG_PRESS =
                "power_button_very_long_press";
        /**
         * Keyguard should be on the left hand side of the screen, for wide screen layouts.
         *
         * @hide
         */
        public static final int ONE_HANDED_KEYGUARD_SIDE_LEFT = 0;
        /**
         * Keyguard should be on the right hand side of the screen, for wide screen layouts.
         *
         * @hide
         */
        public static final int ONE_HANDED_KEYGUARD_SIDE_RIGHT = 1;
        /**
         * In one handed mode, which side the keyguard should be on. Allowable values are one of
         * the ONE_HANDED_KEYGUARD_SIDE_* constants.
         *
         * @hide
         */
        public static final String ONE_HANDED_KEYGUARD_SIDE = "one_handed_keyguard_side";
        /**
         * Keys we no longer back up under the current schema, but want to continue to
         * process when restoring historical backup datasets.
+3 −0
Original line number Diff line number Diff line
@@ -4691,4 +4691,7 @@

    <!-- Whether to select voice/data/sms preference without user confirmation -->
    <bool name="config_voice_data_sms_auto_fallback">false</bool>

    <!-- Whether to enable the one-handed keyguard on the lock screen for wide-screen devices. -->
    <bool name="config_enableOneHandedKeyguard">false</bool>
</resources>
+2 −0
Original line number Diff line number Diff line
@@ -4172,4 +4172,6 @@
  <java-symbol type="bool" name="config_telephony5gNonStandalone" />

  <java-symbol type="bool" name="config_voice_data_sms_auto_fallback" />

  <java-symbol type="bool" name="config_enableOneHandedKeyguard" />
</resources>
+5 −0
Original line number Diff line number Diff line
@@ -147,5 +147,10 @@ public class GlobalSettingsValidators {
        VALIDATORS.put(Global.DEVELOPMENT_SETTINGS_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Global.NOTIFICATION_FEEDBACK_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Global.RESTRICTED_NETWORKING_MODE, BOOLEAN_VALIDATOR);
        VALIDATORS.put(
                Global.ONE_HANDED_KEYGUARD_SIDE,
                new InclusiveIntegerRangeValidator(
                        /* first= */Global.ONE_HANDED_KEYGUARD_SIDE_LEFT,
                        /* last= */Global.ONE_HANDED_KEYGUARD_SIDE_RIGHT));
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -283,6 +283,7 @@ public class SettingsBackupTest {
                    Settings.Global.EUICC_REMOVING_INVISIBLE_PROFILES_TIMEOUT_MILLIS,
                    Settings.Global.EUICC_SWITCH_SLOT_TIMEOUT_MILLIS,
                    Settings.Global.FANCY_IME_ANIMATIONS,
                    Settings.Global.ONE_HANDED_KEYGUARD_SIDE,
                    Settings.Global.FORCE_ALLOW_ON_EXTERNAL,
                    Settings.Global.FORCED_APP_STANDBY_ENABLED,
                    Settings.Global.FORCED_APP_STANDBY_FOR_SMALL_BATTERY_ENABLED,
Loading