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

Commit d25bcc73 authored by Chun-Ku Lin's avatar Chun-Ku Lin
Browse files

Create a new settings - Settings.Secure.ACCESSIBILITY_QS_TARGETS

The new setting is used to store the accessibility features that has
tiles in the Quick Setting panel.

Bug: 314847175
Test: build succeed
Change-Id: I089db6f3034f7d83340e54487ca181442bb9722d
parent 2b253d43
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -8290,6 +8290,17 @@ public final class Settings {
        @Readable
        public static final String ACCESSIBILITY_BUTTON_TARGETS = "accessibility_button_targets";
        /**
         * Setting specifying the accessibility services, accessibility shortcut targets,
         * or features to be toggled via a tile in the quick settings panel.
         *
         * <p> This is a colon-separated string list which contains the flattened
         * {@link ComponentName} and the class name of a system class implementing a supported
         * accessibility feature.
         * @hide
         */
        public static final String ACCESSIBILITY_QS_TARGETS = "accessibility_qs_targets";
        /**
         * The system class name of magnification controller which is a target to be toggled via
         * accessibility shortcut or accessibility button.
+1 −0
Original line number Diff line number Diff line
@@ -99,6 +99,7 @@ message SecureSettingsProto {
        optional SettingProto accessibility_font_scaling_has_been_changed = 51 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto accessibility_force_invert_color_enabled = 52 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto accessibility_magnification_two_finger_triple_tap_enabled = 53 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto qs_targets = 54 [ (android.privacy).dest = DEST_AUTOMATIC ];

    }
    optional Accessibility accessibility = 2;
+3 −0
Original line number Diff line number Diff line
@@ -105,6 +105,9 @@ public class SecureSettings {
        Settings.Secure.CAMERA_DOUBLE_TWIST_TO_FLIP_ENABLED,
        Settings.Secure.CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED,
        Settings.Secure.SYSTEM_NAVIGATION_KEYS_ENABLED,
        // ACCESSIBILITY_QS_TARGETS needs to be restored after ENABLED_ACCESSIBILITY_SERVICES
        // but before QS_TILES
        Settings.Secure.ACCESSIBILITY_QS_TARGETS,
        Settings.Secure.QS_TILES,
        Settings.Secure.QS_AUTO_ADDED_TILES,
        Settings.Secure.CONTROLS_ENABLED,
+3 −0
Original line number Diff line number Diff line
@@ -319,6 +319,9 @@ public class SecureSettingsValidators {
        VALIDATORS.put(
                Secure.ACCESSIBILITY_BUTTON_TARGETS,
                ACCESSIBILITY_SHORTCUT_TARGET_LIST_VALIDATOR);
        VALIDATORS.put(
                Secure.ACCESSIBILITY_QS_TARGETS,
                ACCESSIBILITY_SHORTCUT_TARGET_LIST_VALIDATOR);
        VALIDATORS.put(Secure.ACCESSIBILITY_FORCE_INVERT_COLOR_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.ONE_HANDED_MODE_ACTIVATED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.ONE_HANDED_MODE_ENABLED, BOOLEAN_VALIDATOR);
+3 −0
Original line number Diff line number Diff line
@@ -1812,6 +1812,9 @@ class SettingsProtoDumpUtil {
        dumpSetting(s, p,
                Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS,
                SecureSettingsProto.Accessibility.BUTTON_TARGETS);
        dumpSetting(s, p,
                Settings.Secure.ACCESSIBILITY_QS_TARGETS,
                SecureSettingsProto.Accessibility.QS_TARGETS);
        dumpSetting(s, p,
                Settings.Secure.ACCESSIBILITY_MAGNIFICATION_CAPABILITY,
                SecureSettingsProto.Accessibility.ACCESSIBILITY_MAGNIFICATION_CAPABILITY);