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

Commit 1c664739 authored by Mehdi Alizadeh's avatar Mehdi Alizadeh Committed by Android (Google) Code Review
Browse files

Merge "Adds settings fields for left and right back gesture inset size"

parents d8455e3c 342b8f4a
Loading
Loading
Loading
Loading
+14 −0
Original line number Original line Diff line number Diff line
@@ -8391,6 +8391,20 @@ public final class Settings {
        public static final String NAVIGATION_MODE =
        public static final String NAVIGATION_MODE =
                "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.
         * Controls whether aware is enabled.
         * @hide
         * @hide
+8 −1
Original line number Original line Diff line number Diff line
@@ -219,6 +219,12 @@ message SecureSettingsProto {
    }
    }
    optional Gesture gesture = 74;
    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 ];
    optional SettingProto immersive_mode_confirmations = 24 [ (android.privacy).dest = DEST_AUTOMATIC ];


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


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

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


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


    // Please insert fields in alphabetical order and group them into messages
    // Please insert fields in alphabetical order and group them into messages
    // if possible (to avoid reaching the method limit).
    // if possible (to avoid reaching the method limit).
    // Next tag = 77;
    // Next tag = 78;
}
}
+2 −0
Original line number Original line Diff line number Diff line
@@ -142,6 +142,8 @@ public class SecureSettings {
        Settings.Secure.LOCK_SCREEN_WHEN_TRUST_LOST,
        Settings.Secure.LOCK_SCREEN_WHEN_TRUST_LOST,
        Settings.Secure.SKIP_DIRECTION,
        Settings.Secure.SKIP_DIRECTION,
        Settings.Secure.THEME_CUSTOMIZATION_OVERLAY_PACKAGES,
        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.NAVIGATION_MODE,
        Settings.Secure.SKIP_GESTURE_COUNT,
        Settings.Secure.SKIP_GESTURE_COUNT,
        Settings.Secure.SKIP_TOUCH_COUNT,
        Settings.Secure.SKIP_TOUCH_COUNT,
+4 −0
Original line number Original line 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.THEME_CUSTOMIZATION_OVERLAY_PACKAGES, JSON_OBJECT_VALIDATOR);
        VALIDATORS.put(
        VALIDATORS.put(
                Secure.NAVIGATION_MODE, new DiscreteValueValidator(new String[] {"0", "1", "2"}));
                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.AWARE_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.SKIP_GESTURE_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR);
        VALIDATORS.put(Secure.SKIP_GESTURE_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR);
        VALIDATORS.put(Secure.SKIP_TOUCH_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR);
        VALIDATORS.put(Secure.SKIP_TOUCH_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR);
+8 −0
Original line number Original line Diff line number Diff line
@@ -2191,6 +2191,14 @@ class SettingsProtoDumpUtil {
                Settings.Secure.NAVIGATION_MODE,
                Settings.Secure.NAVIGATION_MODE,
                SecureSettingsProto.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);
        final long nfcPaymentToken = p.start(SecureSettingsProto.NFC_PAYMENT);
        dumpSetting(s, p,
        dumpSetting(s, p,
                Settings.Secure.NFC_PAYMENT_DEFAULT_COMPONENT,
                Settings.Secure.NFC_PAYMENT_DEFAULT_COMPONENT,