Home
last modified time | relevance | path

Searched refs:mBatterySaverPolicy (Results 1 – 3 of 3) sorted by relevance

/frameworks/base/services/tests/servicestests/src/com/android/server/power/batterysaver/
DBatterySaverPolicyTest.java87 private BatterySaverPolicyForTest mBatterySaverPolicy; field in BatterySaverPolicyTest
96 mBatterySaverPolicy = new BatterySaverPolicyForTest(lock, getContext(), in setUp()
98 mBatterySaverPolicy.systemReady(); in setUp()
100 mBatterySaverPolicy.setPolicyLevel(POLICY_LEVEL_FULL); in setUp()
115 mBatterySaverPolicy.setAccessibilityEnabledForTest(true); in testGetBatterySaverPolicy_PolicyVibration_WithAccessibilityEnabled()
156 mBatterySaverPolicy.updateConstantsLocked("", ""); in testGetBatterySaverPolicy_PolicyDataSaver_DefaultValueCorrect()
157 mBatterySaverPolicy.setPolicyLevel(POLICY_LEVEL_FULL); in testGetBatterySaverPolicy_PolicyDataSaver_DefaultValueCorrect()
159 mBatterySaverPolicy.getBatterySaverPolicy(ServiceType.DATA_SAVER); in testGetBatterySaverPolicy_PolicyDataSaver_DefaultValueCorrect()
162 mBatterySaverPolicy.setPolicyLevel(POLICY_LEVEL_OFF); in testGetBatterySaverPolicy_PolicyDataSaver_DefaultValueCorrect()
163 final PowerSaveState batterySaverStateOff = mBatterySaverPolicy.getBatterySaverPolicy( in testGetBatterySaverPolicy_PolicyDataSaver_DefaultValueCorrect()
[all …]
/frameworks/base/services/core/java/com/android/server/power/batterysaver/
DBatterySaverController.java71 private final BatterySaverPolicy mBatterySaverPolicy; field in BatterySaverController
201 mBatterySaverPolicy = policy; in BatterySaverController()
202 mBatterySaverPolicy.addListener(this); in BatterySaverController()
309 return mBatterySaverPolicy.setPolicyLevel(BatterySaverPolicy.POLICY_LEVEL_FULL); in updatePolicyLevelLocked()
311 return mBatterySaverPolicy.setPolicyLevel(BatterySaverPolicy.POLICY_LEVEL_ADAPTIVE); in updatePolicyLevelLocked()
313 return mBatterySaverPolicy.setPolicyLevel(BatterySaverPolicy.POLICY_LEVEL_OFF); in updatePolicyLevelLocked()
324 || (mAdaptiveEnabled && mBatterySaverPolicy.shouldAdvertiseIsEnabled()); in isEnabled()
361 if (mBatterySaverPolicy.setAdaptivePolicyLocked(policy)) { in setAdaptivePolicyLocked()
369 if (mBatterySaverPolicy.resetAdaptivePolicyLocked()) { in resetAdaptivePolicyLocked()
397 return mBatterySaverPolicy; in getBatterySaverPolicy()
[all …]
/frameworks/base/services/core/java/com/android/server/power/
DPowerManagerService.java232 private final BatterySaverPolicy mBatterySaverPolicy; field in PowerManagerService
772 mBatterySaverPolicy = in PowerManagerService()
775 BackgroundThread.get().getLooper(), mBatterySaverPolicy, in PowerManagerService()
885 mBatterySaverPolicy.systemReady(); in systemReady()
2913 PowerSaveState state = mBatterySaverPolicy. in updatePowerRequestFromBatterySaverPolicy()
3560 mBatterySaverPolicy.dump(pw); in dumpInternal()
4520 return mBatterySaverPolicy.getBatterySaverPolicy(serviceType); in getPowerSaveState()
4964 return mBatterySaverPolicy.getBatterySaverPolicy(serviceType); in getLowPowerState()