Searched refs:BatteryUtils (Results 1 – 16 of 16) sorted by relevance
66 import com.android.compatibility.common.util.BatteryUtils;200 BatteryUtils.runDumpsysBatterySetPluggedIn(true); in setUp()396 BatteryUtils.runDumpsysBatteryUnplug(); in testJobsInRestrictedBucket_ParoleSession()425 BatteryUtils.runDumpsysBatterySetPluggedIn(true); in testJobsInRestrictedBucket_CorrectParoleWhileCharging()426 BatteryUtils.runDumpsysBatterySetLevel(100); in testJobsInRestrictedBucket_CorrectParoleWhileCharging()457 BatteryUtils.runDumpsysBatteryUnplug(); in testJobsInRestrictedBucket_DeferredUntilFreeResources()469 BatteryUtils.runDumpsysBatterySetPluggedIn(true); in testJobsInRestrictedBucket_DeferredUntilFreeResources()470 BatteryUtils.runDumpsysBatterySetLevel(100); in testJobsInRestrictedBucket_DeferredUntilFreeResources()500 BatteryUtils.runDumpsysBatteryUnplug(); in testJobsInRestrictedBucket_NoRequiredNetwork()509 BatteryUtils.runDumpsysBatterySetPluggedIn(true); in testJobsInRestrictedBucket_NoRequiredNetwork()[all …]
28 import com.android.compatibility.common.util.BatteryUtils;125 if (BatteryUtils.hasBattery() && !isAutomotiveDevice()) { in testStopReason()126 BatteryUtils.runDumpsysBatterySetLevel(100); in testStopReason()127 BatteryUtils.runDumpsysBatteryUnplug(); in testStopReason()131 () -> BatteryUtils.runDumpsysBatterySetLevel(5)); in testStopReason()133 BatteryUtils.runDumpsysBatterySetPluggedIn(true); in testStopReason()134 BatteryUtils.runDumpsysBatterySetLevel(100); in testStopReason()138 BatteryUtils::runDumpsysBatteryUnplug); in testStopReason()
48 import com.android.compatibility.common.util.BatteryUtils;149 BatteryUtils.runDumpsysBatteryReset(); in tearDown()433 BatteryUtils.runDumpsysBatteryUnplug(); in testExpeditedJobExecutes_IdleApp()451 if (!BatteryUtils.isBatterySaverSupported()) { in testExpeditedJobExecutes_BatterySaverOn()464 BatteryUtils.runDumpsysBatteryUnplug(); in testExpeditedJobExecutes_BatterySaverOn()465 BatteryUtils.enableBatterySaver(true); in testExpeditedJobExecutes_BatterySaverOn()514 if (!BatteryUtils.isBatterySaverSupported()) { in testExpeditedJobBypassesSimultaneousFirewalls_noDataSaver()536 BatteryUtils.runDumpsysBatteryUnplug(); in testExpeditedJobBypassesSimultaneousFirewalls_noDataSaver()537 BatteryUtils.enableBatterySaver(true); in testExpeditedJobBypassesSimultaneousFirewalls_noDataSaver()809 if (!BatteryUtils.isBatterySaverSupported()) { in testExpeditedJobDoesNotBypassSimultaneousFirewalls_withDataSaver()[all …]
38 import com.android.compatibility.common.util.BatteryUtils;215 BatteryUtils.turnOnScreen(screenon); in toggleScreenOn()
22 BatteryUtils.turnOnScreen(on); in setScreenOn()39 mScreenInteractive = BatteryUtils.getPowerManager().isInteractive(); in ScreenResetter()44 BatteryUtils.turnOnScreen(mScreenInteractive); in close()
33 public class BatteryUtils { class36 private BatteryUtils() { in BatteryUtils() method in BatteryUtils
32 import com.android.compatibility.common.util.BatteryUtils;106 PowerManager manager = BatteryUtils.getPowerManager(); in testPowerManager_getPowerSaveMode()125 PowerManager manager = BatteryUtils.getPowerManager(); in testPowerManager_setDynamicPowerSavings()143 final PowerManager manager = BatteryUtils.getPowerManager(); in testPowerManager_batteryDischargePrediction()145 if (!BatteryUtils.hasBattery()) { in testPowerManager_batteryDischargePrediction()151 BatteryUtils.runDumpsysBatteryUnplug(); in testPowerManager_batteryDischargePrediction()156 BatteryUtils.runDumpsysBatterySetPluggedIn(true); in testPowerManager_batteryDischargePrediction()167 BatteryUtils.runDumpsysBatteryUnplug(); in testPowerManager_batteryDischargePrediction()192 final PowerManager manager = BatteryUtils.getPowerManager(); in setDischargePrediction()199 final PowerManager manager = BatteryUtils.getPowerManager(); in assertDischargePrediction()
18 import static com.android.compatibility.common.util.BatteryUtils.enableBatterySaver;19 import static com.android.compatibility.common.util.BatteryUtils.runDumpsysBatteryUnplug;39 import com.android.compatibility.common.util.BatteryUtils;110 PowerManager manager = BatteryUtils.getPowerManager(); in testSetBatterySaver_powerManager()133 final PowerManager powerManager = BatteryUtils.getPowerManager(); in testAutomotiveProjectionExceptions()196 final PowerManager powerManager = BatteryUtils.getPowerManager(); in testGlobalSettings()218 final PowerManager powerManager = BatteryUtils.getPowerManager(); in testDeviceConfig()242 final PowerManager powerManager = BatteryUtils.getPowerManager(); in testGlobalSettingsOverridesDeviceConfig()
33 import com.android.compatibility.common.util.BatteryUtils;139 BatteryUtils.runDumpsysBatteryUnplug(); in checkActionChargingDeferred()140 BatteryUtils.runDumpsysBatterySetLevel(50); in checkActionChargingDeferred()149 BatteryUtils.runDumpsysBatterySetPluggedIn(true); in checkActionChargingDeferred()162 BatteryUtils.runDumpsysBatterySetLevel(51); in checkActionChargingDeferred()
18 import static com.android.compatibility.common.util.BatteryUtils.enableBatterySaver;19 import static com.android.compatibility.common.util.BatteryUtils.runDumpsysBatteryReset;20 import static com.android.compatibility.common.util.BatteryUtils.turnOnScreen;34 import com.android.compatibility.common.util.BatteryUtils;69 BatteryUtils.assumeBatterySaverFeature();
23 import static com.android.compatibility.common.util.BatteryUtils.enableBatterySaver;24 import static com.android.compatibility.common.util.BatteryUtils.runDumpsysBatteryUnplug;
35 import com.android.compatibility.common.util.BatteryUtils;205 if (mUiModeManager.isNightModeLocked() || !BatteryUtils.isBatterySaverSupported()) { in testNightModeInCarModeOnPowerSaveIsTransient()211 BatteryUtils.runDumpsysBatteryUnplug(); in testNightModeInCarModeOnPowerSaveIsTransient()214 BatteryUtils.enableBatterySaver(false); in testNightModeInCarModeOnPowerSaveIsTransient()220 BatteryUtils.enableBatterySaver(true); in testNightModeInCarModeOnPowerSaveIsTransient()225 BatteryUtils.enableBatterySaver(false); in testNightModeInCarModeOnPowerSaveIsTransient()231 BatteryUtils.enableBatterySaver(true); in testNightModeInCarModeOnPowerSaveIsTransient()248 BatteryUtils.enableBatterySaver(false); in testNightModeInCarModeOnPowerSaveIsTransient()252 BatteryUtils.runDumpsysBatteryReset(); in testNightModeInCarModeOnPowerSaveIsTransient()
40 import com.android.compatibility.common.util.BatteryUtils;109 BatteryUtils.runDumpsysBatteryUnplug(); in setUp()147 BatteryUtils.runDumpsysBatteryReset(); in tearDown()
55 import com.android.compatibility.common.util.BatteryUtils;98 BatteryUtils.runDumpsysBatteryUnplug(); in setUp()99 BatteryUtils.enableAdaptiveBatterySaver(false); in setUp()100 BatteryUtils.enableBatterySaver(false); in setUp()119 BatteryUtils.runDumpsysBatteryReset(); in tearDown()
92 import com.android.compatibility.common.util.BatteryUtils;697 BatteryUtils.runDumpsysBatteryUnplug(); in testRequestLocationUpdates_BatterySaver_GpsDisabledScreenOff()698 BatteryUtils.enableBatterySaver(true); in testRequestLocationUpdates_BatterySaver_GpsDisabledScreenOff()720 BatteryUtils.enableBatterySaver(false); in testRequestLocationUpdates_BatterySaver_GpsDisabledScreenOff()721 BatteryUtils.runDumpsysBatteryReset(); in testRequestLocationUpdates_BatterySaver_GpsDisabledScreenOff()744 BatteryUtils.runDumpsysBatteryUnplug(); in testRequestLocationUpdates_BatterySaver_AllDisabledScreenOff()745 BatteryUtils.enableBatterySaver(true); in testRequestLocationUpdates_BatterySaver_AllDisabledScreenOff()762 BatteryUtils.enableBatterySaver(false); in testRequestLocationUpdates_BatterySaver_AllDisabledScreenOff()763 BatteryUtils.runDumpsysBatteryReset(); in testRequestLocationUpdates_BatterySaver_AllDisabledScreenOff()786 BatteryUtils.runDumpsysBatteryUnplug(); in testRequestLocationUpdates_BatterySaver_ThrottleScreenOff()[all …]
73 import com.android.compatibility.common.util.BatteryUtils;949 assumeTrue("Test only works on devices with a battery", BatteryUtils.hasBattery()); in testIsAppInactive()954 BatteryUtils.runDumpsysBatteryUnplug(); in testIsAppInactive()988 BatteryUtils.runDumpsysBatteryReset(); in testIsAppInactive()996 assumeTrue("Test only works on devices with a battery", BatteryUtils.hasBattery()); in testIsAppInactive_Charging()1001 BatteryUtils.runDumpsysBatteryUnplug(); in testIsAppInactive_Charging()1005 BatteryUtils.runDumpsysBatterySetPluggedIn(true); in testIsAppInactive_Charging()1006 BatteryUtils.runDumpsysBatterySetLevel(100); in testIsAppInactive_Charging()1010 BatteryUtils.runDumpsysBatteryReset(); in testIsAppInactive_Charging()