Merge "Hook up Adaptive Battery to new flag." into pi-dev

This commit is contained in:
Lei Yu
2018-04-26 22:07:53 +00:00
committed by Android (Google) Code Review
7 changed files with 19 additions and 14 deletions

View File

@@ -143,7 +143,7 @@ public class AnomalyDetectionJobService extends JobService {
final int uid = extractUidFromStatsDimensionsValue(intentDimsValue);
final boolean autoFeatureOn = powerUsageFeatureProvider.isSmartBatterySupported()
? Settings.Global.getInt(contentResolver,
Settings.Global.APP_STANDBY_ENABLED, ON) == ON
Settings.Global.ADAPTIVE_BATTERY_MANAGEMENT_ENABLED, ON) == ON
: Settings.Global.getInt(contentResolver,
Settings.Global.APP_AUTO_RESTRICTION_ENABLED, ON) == ON;
final String packageName = batteryUtils.getPackageName(uid);