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

Commit 342b8f4a authored by Mehdi Alizadeh's avatar Mehdi Alizadeh
Browse files

Adds settings fields for left and right back gesture inset size

Test: It builds and passes presubmit tests
Bug: 146004827
Change-Id: I317e3ee4ea8ed2ae37a7ff90a74a639c146f211b
parent 89a5dbf1
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -8391,6 +8391,20 @@ public final class Settings {
        public static final String NAVIGATION_MODE =
                "navigation_mode";
        /**
         * Scale factor for the back gesture inset size on the left side of the screen.
         * @hide
         */
        public static final String BACK_GESTURE_INSET_SCALE_LEFT =
                "back_gesture_inset_scale_left";
        /**
         * Scale factor for the back gesture inset size on the right side of the screen.
         * @hide
         */
        public static final String BACK_GESTURE_INSET_SCALE_RIGHT =
                "back_gesture_inset_scale_right";
        /**
         * Controls whether aware is enabled.
         * @hide
+8 −1
Original line number Diff line number Diff line
@@ -219,6 +219,12 @@ message SecureSettingsProto {
    }
    optional Gesture gesture = 74;

    message GestureNavigation {
        optional SettingProto back_gesture_inset_scale_left = 1 [(android.privacy).dest = DEST_AUTOMATIC];
        optional SettingProto back_gesture_inset_scale_right = 2 [(android.privacy).dest = DEST_AUTOMATIC];
    }
    optional GestureNavigation gesture_navigation = 77;

    optional SettingProto immersive_mode_confirmations = 24 [ (android.privacy).dest = DEST_AUTOMATIC ];

    message Incall {
@@ -316,6 +322,7 @@ message SecureSettingsProto {
    optional SettingProto multi_press_timeout = 38 [ (android.privacy).dest = DEST_AUTOMATIC ];

    optional SettingProto navigation_mode = 76 [ (android.privacy).dest = DEST_AUTOMATIC ];

    message NfcPayment {
        option (android.msg_privacy).dest = DEST_EXPLICIT;

@@ -564,5 +571,5 @@ message SecureSettingsProto {

    // Please insert fields in alphabetical order and group them into messages
    // if possible (to avoid reaching the method limit).
    // Next tag = 77;
    // Next tag = 78;
}
+2 −0
Original line number Diff line number Diff line
@@ -142,6 +142,8 @@ public class SecureSettings {
        Settings.Secure.LOCK_SCREEN_WHEN_TRUST_LOST,
        Settings.Secure.SKIP_DIRECTION,
        Settings.Secure.THEME_CUSTOMIZATION_OVERLAY_PACKAGES,
        Settings.Secure.BACK_GESTURE_INSET_SCALE_LEFT,
        Settings.Secure.BACK_GESTURE_INSET_SCALE_RIGHT,
        Settings.Secure.NAVIGATION_MODE,
        Settings.Secure.SKIP_GESTURE_COUNT,
        Settings.Secure.SKIP_TOUCH_COUNT,
+4 −0
Original line number Diff line number Diff line
@@ -216,6 +216,10 @@ public class SecureSettingsValidators {
        VALIDATORS.put(Secure.THEME_CUSTOMIZATION_OVERLAY_PACKAGES, JSON_OBJECT_VALIDATOR);
        VALIDATORS.put(
                Secure.NAVIGATION_MODE, new DiscreteValueValidator(new String[] {"0", "1", "2"}));
        VALIDATORS.put(Secure.BACK_GESTURE_INSET_SCALE_LEFT,
                new InclusiveFloatRangeValidator(0.0f, Float.MAX_VALUE));
        VALIDATORS.put(Secure.BACK_GESTURE_INSET_SCALE_RIGHT,
                new InclusiveFloatRangeValidator(0.0f, Float.MAX_VALUE));
        VALIDATORS.put(Secure.AWARE_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.SKIP_GESTURE_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR);
        VALIDATORS.put(Secure.SKIP_TOUCH_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR);
+8 −0
Original line number Diff line number Diff line
@@ -2188,6 +2188,14 @@ class SettingsProtoDumpUtil {
                Settings.Secure.NAVIGATION_MODE,
                SecureSettingsProto.NAVIGATION_MODE);

        dumpSetting(s, p,
                Settings.Secure.BACK_GESTURE_INSET_SCALE_LEFT,
                SecureSettingsProto.GestureNavigation.BACK_GESTURE_INSET_SCALE_LEFT);

        dumpSetting(s, p,
                Settings.Secure.BACK_GESTURE_INSET_SCALE_RIGHT,
                SecureSettingsProto.GestureNavigation.BACK_GESTURE_INSET_SCALE_RIGHT);

        final long nfcPaymentToken = p.start(SecureSettingsProto.NFC_PAYMENT);
        dumpSetting(s, p,
                Settings.Secure.NFC_PAYMENT_DEFAULT_COMPONENT,