diff options
| author | 2019-01-11 19:30:12 +0800 | |
|---|---|---|
| committer | 2019-01-24 14:43:07 +0800 | |
| commit | 5ee8154aeaa4bbe40e05d1f0920100eeff19c24b (patch) | |
| tree | 5f93443e8f1928e4b4c31736c07a892787b514ef | |
| parent | ac1c15821c4c3ec4fcfd39081d181b90991c57ab (diff) | |
Add setting for Aware enable/disable
Bug: 122712565
Test: make
Change-Id: I65358e815c1e2cb30be0ad90b3c94f4af11f17d9
| -rw-r--r-- | core/java/android/provider/Settings.java | 9 | ||||
| -rw-r--r-- | core/proto/android/app/settings_enums.proto | 6 | ||||
| -rw-r--r-- | core/proto/android/providers/settings/secure.proto | 4 | ||||
| -rw-r--r-- | core/res/res/values/config.xml | 3 | ||||
| -rw-r--r-- | core/res/res/values/symbols.xml | 2 | ||||
| -rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java | 4 | ||||
| -rw-r--r-- | proto/src/metrics_constants/metrics_constants.proto | 8 |
7 files changed, 35 insertions, 1 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 618fbd07ad9e..b05ad59565f7 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -8436,6 +8436,13 @@ public final class Settings { 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. * * NOTE: Settings are backed up and restored in the order they appear @@ -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 6cdba33a9ada..eb716ac280e2 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 c0d6139b117a..aaf6c63b2978 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 1a2130697daf..e2a638f476bc 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -3759,4 +3759,7 @@ <!-- Whether cbrs is supported on the device or not --> <bool translatable="false" name="config_cbrs_supported">false</bool> + + <!-- Whether or not aware is enabled by default --> + <bool name="config_awareSettingAvailable">false</bool> </resources> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 83982c77f8b5..3595a9402151 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -3548,4 +3548,6 @@ <!-- For CBRS --> <java-symbol type="bool" name="config_cbrs_supported" /> + + <java-symbol type="bool" name="config_awareSettingAvailable" /> </resources> diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java index 808739a69920..10a86bb42054 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 efa4e79cc318..d1aa84fe3133 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 |