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

Commit e296f7e6 authored by Jason Chang's avatar Jason Chang Committed by Android (Google) Code Review
Browse files

Merge "Add One-Handed mode features 1. Settings keys definition. 2. Support...

Merge "Add One-Handed mode features 1. Settings keys definition. 2. Support Backup/Restore for user settings."
parents 53783f5f a02d42dd
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -7831,6 +7831,24 @@ public final class Settings {
         */
        public static final String AWARE_TAP_PAUSE_TOUCH_COUNT = "aware_tap_pause_touch_count";
        /**
         * For user preference if One-Handed Mode enabled.
         * @hide
         */
        public static final String ONE_HANDED_MODE_ENABLED = "one_handed_mode_enabled";
        /**
         * For user perference 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.
         * @hide
         */
        public static final String TAPS_APP_TO_EXIT = "taps_app_to_exit";
        /**
         * The current night mode that has been selected by the user.  Owned
         * and controlled by UiModeManagerService.  Constants are as per
+5 −0
Original line number Diff line number Diff line
@@ -2669,4 +2669,9 @@ enum PageId {
    // Open: Settings > Sound > Do Not Disturb > Apps > <Choose App>
    // OS: R
    DND_APPS_BYPASSING = 1840;

    // OPEN: Settings > System > Gestures > One-Handed
    // CATEGORY: SETTINGS
    // OS: R QPR
    SETTINGS_ONE_HANDED = 1841;
}
+10 −1
Original line number Diff line number Diff line
@@ -587,7 +587,16 @@ 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 = 80;
    // Next tag = 81;
}
+3 −0
Original line number Diff line number Diff line
@@ -166,5 +166,8 @@ public class SecureSettings {
        Settings.Secure.ACCESSIBILITY_MAGNIFICATION_MODE,
        Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS,
        Settings.Secure.ACCESSIBILITY_MAGNIFICATION_CAPABILITY,
        Settings.Secure.ONE_HANDED_MODE_ENABLED,
        Settings.Secure.ONE_HANDED_MODE_TIMEOUT,
        Settings.Secure.TAPS_APP_TO_EXIT,
    };
}
+3 −0
Original line number Diff line number Diff line
@@ -253,5 +253,8 @@ public class SecureSettingsValidators {
        VALIDATORS.put(
                Secure.ACCESSIBILITY_BUTTON_TARGETS,
                ACCESSIBILITY_SHORTCUT_TARGET_LIST_VALIDATOR);
        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);
    }
}
Loading