diff options
7 files changed, 20 insertions, 1 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 50ebab751574..abc8bf51b67b 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -10657,6 +10657,14 @@ public final class Settings { "assist_long_press_home_enabled"; /** + * Whether press and hold on nav handle can trigger search. + * + * @hide + */ + public static final String SEARCH_PRESS_HOLD_NAV_HANDLE_ENABLED = + "search_press_hold_nav_handle_enabled"; + + /** * Control whether Trust Agents are in active unlock or extend unlock mode. * @hide */ diff --git a/core/proto/android/providers/settings/secure.proto b/core/proto/android/providers/settings/secure.proto index d7969cf0b3ff..ed0081c08cad 100644 --- a/core/proto/android/providers/settings/secure.proto +++ b/core/proto/android/providers/settings/secure.proto @@ -137,6 +137,7 @@ message SecureSettingsProto { optional SettingProto gesture_setup_complete = 9 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto touch_gesture_enabled = 10 [ (android.privacy).dest = DEST_AUTOMATIC ]; 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 Assist assist = 7; diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index a78b0407be67..2f0b390d92c2 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -6172,6 +6172,9 @@ <!-- Default value for Settings.ASSIST_TOUCH_GESTURE_ENABLED --> <bool name="config_assistTouchGestureEnabledDefault">true</bool> + <!-- Default value for Settings.SEARCH_PRESS_HOLD_NAV_HANDLE_ENABLED --> + <bool name="config_searchPressHoldNavHandleEnabledDefault">true</bool> + <!-- The maximum byte size of the information contained in the bundle of HotwordDetectedResult. --> <integer translatable="false" name="config_hotwordDetectedResultMaxBundleSize">0</integer> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index eaccd43d9fab..f1a78a6a1e7d 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -4907,6 +4907,8 @@ <java-symbol type="bool" name="config_assistLongPressHomeEnabledDefault" /> <java-symbol type="bool" name="config_assistTouchGestureEnabledDefault" /> + <java-symbol type="bool" name="config_searchPressHoldNavHandleEnabledDefault" /> + <java-symbol type="integer" name="config_hotwordDetectedResultMaxBundleSize" /> <java-symbol type="dimen" name="config_wallpaperDimAmount" /> diff --git a/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java b/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java index 423c8a3d23eb..2d62e2a95da1 100644 --- a/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java +++ b/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java @@ -242,6 +242,7 @@ public class SecureSettings { Settings.Secure.HEARING_AID_CALL_ROUTING, Settings.Secure.HEARING_AID_MEDIA_ROUTING, Settings.Secure.HEARING_AID_SYSTEM_SOUNDS_ROUTING, - Settings.Secure.ACCESSIBILITY_FONT_SCALING_HAS_BEEN_CHANGED + Settings.Secure.ACCESSIBILITY_FONT_SCALING_HAS_BEEN_CHANGED, + Settings.Secure.SEARCH_PRESS_HOLD_NAV_HANDLE_ENABLED }; } diff --git a/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java b/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java index 6c9da97f4c92..4494765fd8e6 100644 --- a/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java +++ b/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java @@ -200,6 +200,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.SEARCH_PRESS_HOLD_NAV_HANDLE_ENABLED, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.VR_DISPLAY_MODE, new DiscreteValueValidator(new String[] {"0", "1"})); VALIDATORS.put(Secure.NOTIFICATION_BADGING, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.NOTIFICATION_DISMISS_RTL, BOOLEAN_VALIDATOR); diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java index 1192e0086123..d2b444b3c40e 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java @@ -1926,6 +1926,9 @@ class SettingsProtoDumpUtil { dumpSetting(s, p, Settings.Secure.ASSIST_LONG_PRESS_HOME_ENABLED, SecureSettingsProto.Assist.LONG_PRESS_HOME_ENABLED); + dumpSetting(s, p, + Settings.Secure.SEARCH_PRESS_HOLD_NAV_HANDLE_ENABLED, + SecureSettingsProto.Assist.SEARCH_PRESS_HOLD_NAV_HANDLE_ENABLED); p.end(assistToken); final long assistHandlesToken = p.start(SecureSettingsProto.ASSIST_HANDLES); |