Add setting for Aware enable/disable

Bug: 122712565
Test: make
Change-Id: I65358e815c1e2cb30be0ad90b3c94f4af11f17d9
This commit is contained in:
Edgar Wang
2019-01-11 19:30:12 +08:00
parent ac1c15821c
commit 5ee8154aea
7 changed files with 35 additions and 1 deletions

View File

@@ -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);
}
/**

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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>

View File

@@ -3548,4 +3548,6 @@
<!-- For CBRS -->
<java-symbol type="bool" name="config_cbrs_supported" />
<java-symbol type="bool" name="config_awareSettingAvailable" />
</resources>

View File

@@ -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);

View File

@@ -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