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

Commit 9de45c97 authored by Jerry Chang's avatar Jerry Chang
Browse files

Add Settings keys definition for swipe bottom gesture

Add Settings keys definition for swipe bottom to expand notification
gesture and support user settings backup/restore.

Gesture settings toggle located at:
Settings > System > Gesture > Swipe for notification

Bug: 154080211
Test: manual check settings works properly
Change-Id: Ibfe3f57020c386a01407e1c579d64304d04d2537
parent f2ca5dbd
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -7882,6 +7882,13 @@ public final class Settings {
         */
        public static final String AWARE_TAP_PAUSE_TOUCH_COUNT = "aware_tap_pause_touch_count";
        /**
         * For user preference if swipe bottom to expand notification gesture enabled.
         * @hide
         */
        public static final String SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED =
                "swipe_bottom_to_notification_enabled";
        /**
         * For user preference if One-Handed Mode enabled.
         * @hide
@@ -7889,13 +7896,13 @@ public final class Settings {
        public static final String ONE_HANDED_MODE_ENABLED = "one_handed_mode_enabled";
        /**
         * For user perference if One-Handed Mode timeout.
         * For user preference if One-Handed Mode timeout.
         * @hide
         */
        public static final String ONE_HANDED_MODE_TIMEOUT = "one_handed_mode_timeout";
        /**
         * For user tapps app to exit One-Handed Mode.
         * For user taps app to exit One-Handed Mode.
         * @hide
         */
        public static final String TAPS_APP_TO_EXIT = "taps_app_to_exit";
+6 −1
Original line number Diff line number Diff line
@@ -1722,7 +1722,7 @@ enum PageId {
    // OPEN: Settings > System > Language & Region
    SETTINGS_LANGUAGE_CATEGORY = 750;

    // OPEN: Settings > System > Input & Gesture > Swipe to notification gesture
    // OPEN: Settings > System > Input & Gesture > Swipe fingerprint for notifications
    SETTINGS_GESTURE_SWIPE_TO_NOTIFICATION = 751;

    // OPEN: Settings > System > Input & Gesture > Double tap power button gesture
@@ -2688,4 +2688,9 @@ enum PageId {
    // CATEGORY: SETTINGS
    // OS: R
    MEDIA_CONTROLS_SETTINGS = 1845;

    // OPEN: Settings > System > Gestures > Swipe for notification
    // CATEGORY: SETTINGS
    // OS: R QPR
    SETTINGS_SWIPE_BOTTOM_TO_NOTIFICATION = 1846;
}
+11 −10
Original line number Diff line number Diff line
@@ -381,6 +381,15 @@ message SecureSettingsProto {
    }
    optional Notification notification = 41;

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

        optional SettingProto one_handed_mode_enabled = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto one_handed_mode_timeout = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto taps_app_to_exit = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
    }
    optional OneHanded onehanded = 80;

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

@@ -502,6 +511,7 @@ message SecureSettingsProto {
    // parent profile.
    optional SettingProto sync_parent_sounds = 55 [ (android.privacy).dest = DEST_AUTOMATIC ];
    optional SettingProto system_navigation_keys_enabled = 56 [ (android.privacy).dest = DEST_AUTOMATIC ];
    optional SettingProto swipe_bottom_to_notification_enabled = 82 [ (android.privacy).dest = DEST_AUTOMATIC ];
    optional SettingProto theme_customization_overlay_packages = 75 [ (android.privacy).dest = DEST_AUTOMATIC ];
    optional SettingProto trust_agents_initialized = 57 [ (android.privacy).dest = DEST_AUTOMATIC ];

@@ -594,16 +604,7 @@ message SecureSettingsProto {
    }
    optional Zen zen = 71;

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

        optional SettingProto one_handed_mode_enabled = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto one_handed_mode_timeout = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto taps_app_to_exit = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
    }
    optional OneHanded onehanded = 80;

    // Please insert fields in alphabetical order and group them into messages
    // if possible (to avoid reaching the method limit).
    // Next tag = 82;
    // Next tag = 83;
}
+1 −0
Original line number Diff line number Diff line
@@ -172,5 +172,6 @@ public class SecureSettings {
        Settings.Secure.ONE_HANDED_MODE_ENABLED,
        Settings.Secure.ONE_HANDED_MODE_TIMEOUT,
        Settings.Secure.TAPS_APP_TO_EXIT,
        Settings.Secure.SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED,
    };
}
+1 −0
Original line number Diff line number Diff line
@@ -259,5 +259,6 @@ public class SecureSettingsValidators {
        VALIDATORS.put(Secure.ONE_HANDED_MODE_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.ONE_HANDED_MODE_TIMEOUT, ANY_INTEGER_VALIDATOR);
        VALIDATORS.put(Secure.TAPS_APP_TO_EXIT, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED, BOOLEAN_VALIDATOR);
    }
}
Loading