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

Commit 48d32648 authored by Charles Chen's avatar Charles Chen Committed by charleschen
Browse files

Add settings for visual query accessibility

This setting is introduced for the accessiblity settings API to toggle a
priviledged data egress for the VisualQueryDetectionService.

Test: atest android.provider.settings.validators.SettingsValidatorsTest
Change-Id: I9b5253c00e9468574c5fd29bae949ebd4cbfaa46
parent efa3d09f
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -11061,6 +11061,15 @@ public final class Settings {
        public static final String SEARCH_LONG_PRESS_HOME_ENABLED =
                "search_long_press_home_enabled";
        /**
         * Whether or not the accessibility data streaming is enbled for the
         * {@link VisualQueryDetectedResult#setAccessibilityDetectionData}.
         * @hide
         */
        public static final String VISUAL_QUERY_ACCESSIBILITY_DETECTION_ENABLED =
                "visual_query_accessibility_detection_enabled";
        /**
         * Control whether Night display is currently activated.
         * @hide
+1 −0
Original line number Diff line number Diff line
@@ -144,6 +144,7 @@ message SecureSettingsProto {
        optional SettingProto long_press_home_enabled = 11 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto search_press_hold_nav_handle_enabled = 12 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto search_long_press_home_enabled = 13 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto visual_query_accessibility_detection_enabled = 14 [ (android.privacy).dest = DEST_AUTOMATIC ];
    }
    optional Assist assist = 7;

+2 −1
Original line number Diff line number Diff line
@@ -265,6 +265,7 @@ public class SecureSettings {
        Settings.Secure.EVEN_DIMMER_ACTIVATED,
        Settings.Secure.EVEN_DIMMER_MIN_NITS,
        Settings.Secure.STYLUS_POINTER_ICON_ENABLED,
        Settings.Secure.CAMERA_EXTENSIONS_FALLBACK
        Settings.Secure.CAMERA_EXTENSIONS_FALLBACK,
        Settings.Secure.VISUAL_QUERY_ACCESSIBILITY_DETECTION_ENABLED
    };
}
+1 −0
Original line number Diff line number Diff line
@@ -207,6 +207,7 @@ public class SecureSettingsValidators {
        VALIDATORS.put(Secure.ASSIST_GESTURE_WAKE_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.ASSIST_TOUCH_GESTURE_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.ASSIST_LONG_PRESS_HOME_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.VISUAL_QUERY_ACCESSIBILITY_DETECTION_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.SEARCH_PRESS_HOLD_NAV_HANDLE_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.SEARCH_LONG_PRESS_HOME_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.VR_DISPLAY_MODE, new DiscreteValueValidator(new String[] {"0", "1"}));
+3 −0
Original line number Diff line number Diff line
@@ -1951,6 +1951,9 @@ class SettingsProtoDumpUtil {
        dumpSetting(s, p,
                Settings.Secure.SEARCH_LONG_PRESS_HOME_ENABLED,
                SecureSettingsProto.Assist.SEARCH_LONG_PRESS_HOME_ENABLED);
        dumpSetting(s, p,
                Settings.Secure.VISUAL_QUERY_ACCESSIBILITY_DETECTION_ENABLED,
                SecureSettingsProto.Assist.VISUAL_QUERY_ACCESSIBILITY_DETECTION_ENABLED);
        p.end(assistToken);

        final long assistHandlesToken = p.start(SecureSettingsProto.ASSIST_HANDLES);