Home
last modified time | relevance | path

Searched refs:BatteryUtils (Results 1 – 17 of 17) sorted by relevance

/cts/tests/JobScheduler/src/android/jobscheduler/cts/
DJobThrottlingTest.java66 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 …]
DJobParametersTest.java28 import com.android.compatibility.common.util.BatteryUtils;
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()
DConnectivityConstraintTest.java47 import com.android.compatibility.common.util.BatteryUtils;
145 BatteryUtils.runDumpsysBatteryReset(); in tearDown()
412 BatteryUtils.runDumpsysBatteryUnplug(); in testExpeditedJobExecutes_IdleApp()
430 if (!BatteryUtils.isBatterySaverSupported()) { in testExpeditedJobExecutes_BatterySaverOn()
443 BatteryUtils.runDumpsysBatteryUnplug(); in testExpeditedJobExecutes_BatterySaverOn()
444 BatteryUtils.enableBatterySaver(true); in testExpeditedJobExecutes_BatterySaverOn()
489 if (!BatteryUtils.isBatterySaverSupported()) { in testExpeditedJobBypassesSimultaneousFirewalls_noDataSaver()
511 BatteryUtils.runDumpsysBatteryUnplug(); in testExpeditedJobBypassesSimultaneousFirewalls_noDataSaver()
512 BatteryUtils.enableBatterySaver(true); in testExpeditedJobBypassesSimultaneousFirewalls_noDataSaver()
774 if (!BatteryUtils.isBatterySaverSupported()) { in testExpeditedJobDoesNotBypassSimultaneousFirewalls_withDataSaver()
[all …]
DBaseJobSchedulerTest.java38 import com.android.compatibility.common.util.BatteryUtils;
215 BatteryUtils.turnOnScreen(screenon); in toggleScreenOn()
/cts/tests/tests/os/src/android/os/cts/
DPowerManagerTest.java32 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()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DScreenUtils.java22 BatteryUtils.turnOnScreen(on); in setScreenOn()
39 mScreenInteractive = BatteryUtils.getPowerManager().isInteractive(); in ScreenResetter()
44 BatteryUtils.turnOnScreen(mScreenInteractive); in close()
DBatteryUtils.java33 public class BatteryUtils { class
36 private BatteryUtils() { in BatteryUtils() method in BatteryUtils
/cts/tests/tests/batterysaving/src/android/os/cts/batterysaving/
DBatterySaverTest.java18 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()
DBatterySavingTestBase.java18 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();
DActionChargingTest.java33 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()
DBatterySaverBgServiceTest.java23 import static com.android.compatibility.common.util.BatteryUtils.enableBatterySaver;
24 import static com.android.compatibility.common.util.BatteryUtils.runDumpsysBatteryUnplug;
DBatterySaverAlarmTest.java23 import static com.android.compatibility.common.util.BatteryUtils.enableBatterySaver;
24 import static com.android.compatibility.common.util.BatteryUtils.runDumpsysBatteryUnplug;
/cts/tests/app/src/android/app/cts/
DUiModeManagerTest.java36 import com.android.compatibility.common.util.BatteryUtils;
208 if (mUiModeManager.isNightModeLocked() || !BatteryUtils.isBatterySaverSupported()) { in testNightModeInCarModeOnPowerSaveIsTransient()
214 BatteryUtils.runDumpsysBatteryUnplug(); in testNightModeInCarModeOnPowerSaveIsTransient()
217 BatteryUtils.enableBatterySaver(false); in testNightModeInCarModeOnPowerSaveIsTransient()
223 BatteryUtils.enableBatterySaver(true); in testNightModeInCarModeOnPowerSaveIsTransient()
228 BatteryUtils.enableBatterySaver(false); in testNightModeInCarModeOnPowerSaveIsTransient()
234 BatteryUtils.enableBatterySaver(true); in testNightModeInCarModeOnPowerSaveIsTransient()
251 BatteryUtils.enableBatterySaver(false); in testNightModeInCarModeOnPowerSaveIsTransient()
255 BatteryUtils.runDumpsysBatteryReset(); in testNightModeInCarModeOnPowerSaveIsTransient()
/cts/tests/AlarmManager/src/android/alarmmanager/cts/
DTimeChangeTests.java40 import com.android.compatibility.common.util.BatteryUtils;
109 BatteryUtils.runDumpsysBatteryUnplug(); in setUp()
147 BatteryUtils.runDumpsysBatteryReset(); in tearDown()
/cts/tests/tests/syncmanager/src/android/content/syncmanager/cts/
DCtsSyncManagerTest.java55 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()
/cts/tests/location/location_fine/src/android/location/cts/fine/
DLocationManagerFineTest.java88 import com.android.compatibility.common.util.BatteryUtils;
698 BatteryUtils.runDumpsysBatteryUnplug(); in testRequestLocationUpdates_BatterySaver_GpsDisabledScreenOff()
699 BatteryUtils.enableBatterySaver(true); in testRequestLocationUpdates_BatterySaver_GpsDisabledScreenOff()
721 BatteryUtils.enableBatterySaver(false); in testRequestLocationUpdates_BatterySaver_GpsDisabledScreenOff()
722 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()
785 BatteryUtils.runDumpsysBatteryUnplug(); in testRequestLocationUpdates_BatterySaver_ThrottleScreenOff()
[all …]
/cts/tests/tests/app.usage/src/android/app/usage/cts/
DUsageStatsTest.java69 import com.android.compatibility.common.util.BatteryUtils;
915 BatteryUtils.runDumpsysBatteryUnplug(); in testIsAppInactive()
949 BatteryUtils.runDumpsysBatteryReset(); in testIsAppInactive()
960 BatteryUtils.runDumpsysBatteryUnplug(); in testIsAppInactive_Charging()
964 BatteryUtils.runDumpsysBatterySetPluggedIn(true); in testIsAppInactive_Charging()
965 BatteryUtils.runDumpsysBatterySetLevel(100); in testIsAppInactive_Charging()
969 BatteryUtils.runDumpsysBatteryReset(); in testIsAppInactive_Charging()