Loading core/java/android/provider/Settings.java +17 −0 Original line number Diff line number Diff line Loading @@ -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) Loading Loading @@ -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, Loading Loading @@ -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); } /** Loading core/proto/android/providers/settings.proto +2 −2 Original line number Diff line number Diff line Loading @@ -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 { Loading packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java +3 −0 Original line number Diff line number Diff line Loading @@ -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. } Loading Loading
core/java/android/provider/Settings.java +17 −0 Original line number Diff line number Diff line Loading @@ -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) Loading Loading @@ -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, Loading Loading @@ -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); } /** Loading
core/proto/android/providers/settings.proto +2 −2 Original line number Diff line number Diff line Loading @@ -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 { Loading
packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java +3 −0 Original line number Diff line number Diff line Loading @@ -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. } Loading