From 7be75d2af8364ada3583f5d574b9aae636392ced Mon Sep 17 00:00:00 2001 From: Jing Ji Date: Wed, 11 May 2022 22:28:55 -0700 Subject: [PATCH] Add config for the auto restricted bucket on abusive bg battery drain By default it's OFF. It could be turned ON in the devices with high confidence on the battery measurements - meaning that, on thoese devices, the apps would be moved to restricted standby bucket level if system detects they're draining significant amount of battery in the background. Bug: 203105544 Test: atest FrameworksMockingServicesTests:BackgroundRestrictionTest Test: dumpsys activity -a Change-Id: I74cc1f7e463e5dbed912b71969298ab3f97f1618 --- core/res/res/values/config.xml | 8 ++++ core/res/res/values/symbols.xml | 1 + .../android/server/am/AppBatteryTracker.java | 46 +++++++++++++++++-- .../server/am/BackgroundRestrictionTest.java | 20 ++++++++ 4 files changed, 72 insertions(+), 3 deletions(-) diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 21abd2237bfa3..ce470a94ccf3b 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -5755,6 +5755,14 @@ --> 1800 + + false +