Merge "Add APP_AUTO_RESTRICTION_ENABLED" into pi-dev

This commit is contained in:
TreeHugger Robot
2018-03-07 02:32:17 +00:00
committed by Android (Google) Code Review
3 changed files with 22 additions and 2 deletions

View File

@@ -10582,6 +10582,21 @@ public final class Settings {
*/
public static final java.lang.String APP_STANDBY_ENABLED = "app_standby_enabled";
/**
* Whether or not app auto restriction is enabled. When it is enabled, settings app will
* auto restrict the app if it has bad behavior(e.g. hold wakelock for long time).
*
* Type: boolean (0 for false, 1 for true)
* Default: 1
*
* @hide
*/
public static final java.lang.String APP_AUTO_RESTRICTION_ENABLED =
"app_auto_restriction_enabled";
private static final Validator APP_AUTO_RESTRICTION_ENABLED_VALIDATOR =
BOOLEAN_VALIDATOR;
/**
* Feature flag to enable or disable the Forced App Standby feature.
* Type: int (0 for false, 1 for true)
@@ -11505,6 +11520,7 @@ public final class Settings {
public static final String[] SETTINGS_TO_BACKUP = {
BUGREPORT_IN_POWER_MENU,
STAY_ON_WHILE_PLUGGED_IN,
APP_AUTO_RESTRICTION_ENABLED,
AUTO_TIME,
AUTO_TIME_ZONE,
POWER_SOUNDS_ENABLED,
@@ -11563,6 +11579,7 @@ public final class Settings {
VALIDATORS.put(SOFT_AP_TIMEOUT_ENABLED, SOFT_AP_TIMEOUT_ENABLED_VALIDATOR);
VALIDATORS.put(WIFI_CARRIER_NETWORKS_AVAILABLE_NOTIFICATION_ON,
WIFI_CARRIER_NETWORKS_AVAILABLE_NOTIFICATION_ON_VALIDATOR);
VALIDATORS.put(APP_AUTO_RESTRICTION_ENABLED, APP_AUTO_RESTRICTION_ENABLED_VALIDATOR);
}
/**

View File

@@ -432,10 +432,10 @@ message GlobalSettingsProto {
optional SettingProto show_restart_in_crash_dialog = 351 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto show_mute_in_crash_dialog = 352 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingsProto show_zen_upgrade_notification = 354 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingsProto app_auto_restriction_enabled = 359 [ (android.privacy).dest = DEST_AUTOMATIC ];
// Please insert fields in the same order as in
// frameworks/base/core/java/android/provider/Settings.java.
// Next tag = 359;
// Next tag = 360;
}
message SecureSettingsProto {

View File

@@ -1138,6 +1138,9 @@ class SettingsProtoDumpUtil {
dumpSetting(s, p,
Settings.Global.SHOW_ZEN_UPGRADE_NOTIFICATION,
GlobalSettingsProto.SHOW_ZEN_UPGRADE_NOTIFICATION);
dumpSetting(s, p,
Settings.Global.APP_AUTO_RESTRICTION_ENABLED,
GlobalSettingsProto.APP_AUTO_RESTRICTION_ENABLED);
// Please insert new settings using the same order as in Settings.Global.
}