Hook up Adaptive Battery to new flag.
APP_STANDBY_ENABLED is controlled by server side to do experiment. Before this CL, Adaptive Battery is hooked up to this flag, so even though if user turns it off, it may be turned on by server. Add a high level ADAPTIVE_BATTERY_MANAGEMENT_ENABLED to control the feature in settings UI side. Bug: 78153913 Test: RunSettingsRoboTests Change-Id: I1a18d622ddc31ec4d45db918bf981516fbb926c1
This commit is contained in:
@@ -107,10 +107,12 @@ public class SmartBatteryPreferenceControllerTest {
|
||||
}
|
||||
|
||||
private void putSmartBatteryValue(int value) {
|
||||
Settings.Global.putInt(mContentResolver, Settings.Global.APP_STANDBY_ENABLED, value);
|
||||
Settings.Global.putInt(mContentResolver,
|
||||
Settings.Global.ADAPTIVE_BATTERY_MANAGEMENT_ENABLED, value);
|
||||
}
|
||||
|
||||
private int getSmartBatteryValue() {
|
||||
return Settings.Global.getInt(mContentResolver, Settings.Global.APP_STANDBY_ENABLED, ON);
|
||||
return Settings.Global.getInt(mContentResolver,
|
||||
Settings.Global.ADAPTIVE_BATTERY_MANAGEMENT_ENABLED, ON);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user