diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 618fbd07ad9e4..b05ad59565f72 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -8435,6 +8435,13 @@ public final class Settings { private static final Validator THEME_CUSTOMIZATION_OVERLAY_PACKAGES_VALIDATOR = new SettingsValidators.PackageNameListValidator(","); + /** + * Controls whether aware is enabled. + * @hide + */ + public static final String AWARE_ENABLED = "aware_enabled"; + + private static final Validator AWARE_ENABLED_VALIDATOR = BOOLEAN_VALIDATOR; /** * This are the settings to be backed up. * @@ -8559,6 +8566,7 @@ public final class Settings { SKIP_GESTURE, SILENCE_GESTURE, THEME_CUSTOMIZATION_OVERLAY_PACKAGES, + AWARE_ENABLED, }; /** @@ -8731,6 +8739,7 @@ public final class Settings { VALIDATORS.put(SILENCE_GESTURE, SILENCE_GESTURE_VALIDATOR); VALIDATORS.put(THEME_CUSTOMIZATION_OVERLAY_PACKAGES, THEME_CUSTOMIZATION_OVERLAY_PACKAGES_VALIDATOR); + VALIDATORS.put(AWARE_ENABLED, AWARE_ENABLED_VALIDATOR); } /** diff --git a/core/proto/android/app/settings_enums.proto b/core/proto/android/app/settings_enums.proto index 6cdba33a9adaf..eb716ac280e26 100644 --- a/core/proto/android/app/settings_enums.proto +++ b/core/proto/android/app/settings_enums.proto @@ -2183,4 +2183,10 @@ enum PageId { // OPEN: Settings > Display > Adaptive sleep // OS: Q SETTINGS_ADAPTIVE_SLEEP = 1628; + + // OPEN: Settings > System > Aware + SETTINGS_AWARE = 1632; + + // OPEN: Settings > System > Aware > Disable > Dialog + DIALOG_AWARE_DISABLE = 1633; } diff --git a/core/proto/android/providers/settings/secure.proto b/core/proto/android/providers/settings/secure.proto index c0d6139b117a6..aaf6c63b2978c 100644 --- a/core/proto/android/providers/settings/secure.proto +++ b/core/proto/android/providers/settings/secure.proto @@ -530,7 +530,9 @@ message SecureSettingsProto { optional SettingProto silence_gesture_enabled = 75 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto theme_customization_overlay_packages = 76 [ (android.privacy).dest = DEST_AUTOMATIC ]; + optional SettingProto aware_enabled = 77 [ (android.privacy).dest = DEST_AUTOMATIC ]; + // Please insert fields in alphabetical order and group them into messages // if possible (to avoid reaching the method limit). - // Next tag = 77; + // Next tag = 78; } diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 1a2130697daf9..e2a638f476bc9 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -3759,4 +3759,7 @@ false + + + false diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 83982c77f8b55..3595a94021515 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -3548,4 +3548,6 @@ + + diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java index 808739a69920b..10a86bb420546 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java @@ -2378,6 +2378,10 @@ class SettingsProtoDumpUtil { Settings.Secure.THEME_CUSTOMIZATION_OVERLAY_PACKAGES, SecureSettingsProto.THEME_CUSTOMIZATION_OVERLAY_PACKAGES); + dumpSetting(s, p, + Settings.Secure.AWARE_ENABLED, + SecureSettingsProto.AWARE_ENABLED); + // Please insert new settings using the same order as in SecureSettingsProto. p.end(token); diff --git a/proto/src/metrics_constants/metrics_constants.proto b/proto/src/metrics_constants/metrics_constants.proto index efa4e79cc318f..d1aa84fe31336 100644 --- a/proto/src/metrics_constants/metrics_constants.proto +++ b/proto/src/metrics_constants/metrics_constants.proto @@ -6862,6 +6862,14 @@ message MetricsEvent { // OS: Q FIELD_AUTOFILL_NUMBER_AUGMENTED_REQUESTS = 1631; + // OPEN: Settings > System > Aware + // OS: Q + SETTINGS_AWARE = 1632; + + // OPEN: Settings > System > Aware > Disable > Dialog + // OS: Q + DIALOG_AWARE_DISABLE = 1633; + // ---- End Q Constants, all Q constants go above this line ---- // Add new aosp constants above this line. // END OF AOSP CONSTANTS