Home
last modified time | relevance | path

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

/cts/tests/JobScheduler/src/android/jobscheduler/cts/
DJobThrottlingTest.java55 import com.android.compatibility.common.util.BatteryUtils;
526 assumeTrue("device doesn't have battery", BatteryUtils.hasBattery()); in testJobsInRestrictedBucket_ParoleSession()
561 BatteryUtils.runDumpsysBatterySetLevel(100); in testJobsInRestrictedBucket_CorrectParoleWhileCharging()
582 assumeTrue("device doesn't have battery", BatteryUtils.hasBattery()); in testJobsInRestrictedBucket_DeferredUntilFreeResources()
602 BatteryUtils.runDumpsysBatterySetLevel(100); in testJobsInRestrictedBucket_DeferredUntilFreeResources()
621 assumeTrue("device doesn't have battery", BatteryUtils.hasBattery()); in testJobsInRestrictedBucket_NoRequiredNetwork()
642 BatteryUtils.runDumpsysBatterySetLevel(100); in testJobsInRestrictedBucket_NoRequiredNetwork()
657 assumeTrue("device doesn't have battery", BatteryUtils.hasBattery()); in testJobsInRestrictedBucket_WithRequiredNetwork()
681 BatteryUtils.runDumpsysBatterySetLevel(100); in testJobsInRestrictedBucket_WithRequiredNetwork()
704 assumeTrue("device doesn't have battery", BatteryUtils.hasBattery()); in testJobsInNeverApp()
[all …]
DConnectivityConstraintTest.java43 import com.android.compatibility.common.util.BatteryUtils;
101 BatteryUtils.runDumpsysBatteryReset(); in tearDown()
102 BatteryUtils.resetBatterySaver(); in tearDown()
366 BatteryUtils.runDumpsysBatteryUnplug(); in testExpeditedJobExecutes_IdleApp()
384 if (!BatteryUtils.isBatterySaverSupported()) { in testExpeditedJobExecutes_BatterySaverOn()
401 BatteryUtils.runDumpsysBatteryUnplug(); in testExpeditedJobExecutes_BatterySaverOn()
402 BatteryUtils.enableBatterySaver(true); in testExpeditedJobExecutes_BatterySaverOn()
474 if (!BatteryUtils.isBatterySaverSupported()) { in testExpeditedJobBypassesSimultaneousFirewalls_noDataSaver()
494 BatteryUtils.runDumpsysBatteryUnplug(); in testExpeditedJobBypassesSimultaneousFirewalls_noDataSaver()
495 BatteryUtils.enableBatterySaver(true); in testExpeditedJobBypassesSimultaneousFirewalls_noDataSaver()
[all …]
DJobParametersTest.java30 import com.android.compatibility.common.util.BatteryUtils;
200 if (BatteryUtils.hasBattery()) { in testStopReason()
DJobSchedulingTest.java48 import com.android.compatibility.common.util.BatteryUtils;
70 BatteryUtils.runDumpsysBatteryReset(); in tearDown()
482 if (!BatteryUtils.hasBattery()) {
500 if (!BatteryUtils.hasBattery()) {
DBaseJobSchedulerTest.java47 import com.android.compatibility.common.util.BatteryUtils;
332 BatteryUtils.turnOnScreen(screenon); in toggleScreenOn()
/cts/tests/tests/voiceinteraction/src/android/voiceinteraction/cts/
DAlwaysOnHotwordDetectorTest.java76 import com.android.compatibility.common.util.BatteryUtils;
398 BatteryUtils.assumeBatterySaverFeature(); in testStartRecognitionNoFlagBatterySaverAllEnabled_noRecognitionPaused()
411 BatteryUtils.runDumpsysBatteryUnplug(); in testStartRecognitionNoFlagBatterySaverAllEnabled_noRecognitionPaused()
417 BatteryUtils.enableBatterySaver(/* isEnabled= */ true); in testStartRecognitionNoFlagBatterySaverAllEnabled_noRecognitionPaused()
420 BatteryUtils.runDumpsysBatteryReset(); in testStartRecognitionNoFlagBatterySaverAllEnabled_noRecognitionPaused()
421 BatteryUtils.resetBatterySaver(); in testStartRecognitionNoFlagBatterySaverAllEnabled_noRecognitionPaused()
439 BatteryUtils.assumeBatterySaverFeature(); in testStartRecognitionNoFlagBatterySaverCriticalOnly_recognitionPaused()
452 BatteryUtils.runDumpsysBatteryUnplug(); in testStartRecognitionNoFlagBatterySaverCriticalOnly_recognitionPaused()
459 BatteryUtils.enableBatterySaver(/* isEnabled= */ true); in testStartRecognitionNoFlagBatterySaverCriticalOnly_recognitionPaused()
464 BatteryUtils.enableBatterySaver(/* isEnabled= */ false); in testStartRecognitionNoFlagBatterySaverCriticalOnly_recognitionPaused()
[all …]
/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.java36 public class BatteryUtils { class
39 private BatteryUtils() { in BatteryUtils() method in BatteryUtils
/cts/tests/tests/os/src/android/os/cts/
DPowerManagerTest.java36 import com.android.compatibility.common.util.BatteryUtils;
109 PowerManager manager = BatteryUtils.getPowerManager(); in testPowerManager_getPowerSaveMode()
132 PowerManager manager = BatteryUtils.getPowerManager(); in testPowerManager_setDynamicPowerSavings()
155 final PowerManager manager = BatteryUtils.getPowerManager(); in testPowerManager_batteryDischargePrediction()
160 if (!BatteryUtils.hasBattery()) { in testPowerManager_batteryDischargePrediction()
166 BatteryUtils.runDumpsysBatteryUnplug(); in testPowerManager_batteryDischargePrediction()
171 BatteryUtils.runDumpsysBatterySetPluggedIn(true); in testPowerManager_batteryDischargePrediction()
182 BatteryUtils.runDumpsysBatteryUnplug(); in testPowerManager_batteryDischargePrediction()
207 final PowerManager manager = BatteryUtils.getPowerManager(); in setDischargePrediction()
214 final PowerManager manager = BatteryUtils.getPowerManager(); in assertDischargePrediction()
/cts/tests/tests/batterysaving/src/android/os/cts/batterysaving/
DActionChargingTest.java35 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()
DBatterySaverTest.java20 import static com.android.compatibility.common.util.BatteryUtils.enableBatterySaver;
21 import static com.android.compatibility.common.util.BatteryUtils.resetBatterySaver;
22 import static com.android.compatibility.common.util.BatteryUtils.runDumpsysBatteryUnplug;
49 import com.android.compatibility.common.util.BatteryUtils;
157 PowerManager manager = BatteryUtils.getPowerManager(); in testSetBatterySaver_powerManager()
178 final PowerManager powerManager = BatteryUtils.getPowerManager(); in testAutomotiveProjectionExceptions()
248 final PowerManager powerManager = BatteryUtils.getPowerManager(); in testGlobalSettings()
274 final PowerManager powerManager = BatteryUtils.getPowerManager(); in testDeviceConfig()
301 final PowerManager powerManager = BatteryUtils.getPowerManager(); in testGlobalSettingsOverridesDeviceConfig()
DBatterySavingTestBase.java18 import static com.android.compatibility.common.util.BatteryUtils.resetBatterySaver;
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;
73 BatteryUtils.assumeBatterySaverFeature();
DBatterySaverBgServiceTest.java23 import static com.android.compatibility.common.util.BatteryUtils.assumeBatterySaverFeature;
24 import static com.android.compatibility.common.util.BatteryUtils.enableBatterySaver;
25 import static com.android.compatibility.common.util.BatteryUtils.runDumpsysBatteryUnplug;
DBatterySaverAlarmTest.java23 import static com.android.compatibility.common.util.BatteryUtils.assumeBatterySaverFeature;
24 import static com.android.compatibility.common.util.BatteryUtils.enableBatterySaver;
25 import static com.android.compatibility.common.util.BatteryUtils.runDumpsysBatteryUnplug;
/cts/tests/tests/batterysaving/src/android/os/cts/deviceidle/
DDeviceIdleTest.java37 import com.android.compatibility.common.util.BatteryUtils;
61 BatteryUtils.runDumpsysBatteryReset(); in tearDown()
84 BatteryUtils.runDumpsysBatteryUnplug(); in testLightIdleMode()
/cts/tests/AlarmManager/src/android/alarmmanager/cts/
DTimeChangeTests.java40 import com.android.compatibility.common.util.BatteryUtils;
110 BatteryUtils.runDumpsysBatteryUnplug(); in setUp()
148 BatteryUtils.runDumpsysBatteryReset(); in tearDown()
/cts/tests/app/src/android/app/cts/
DUiModeManagerTest.java53 import com.android.compatibility.common.util.BatteryUtils;
100 BatteryUtils.runDumpsysBatteryReset(); in tearDown()
101 BatteryUtils.resetBatterySaver(); in tearDown()
458 if (mUiModeManager.isNightModeLocked() || !BatteryUtils.isBatterySaverSupported()) { in testNightModeInCarModeOnPowerSaveIsTransient()
464 BatteryUtils.runDumpsysBatteryUnplug(); in testNightModeInCarModeOnPowerSaveIsTransient()
467 BatteryUtils.enableBatterySaver(false); in testNightModeInCarModeOnPowerSaveIsTransient()
473 BatteryUtils.enableBatterySaver(true); in testNightModeInCarModeOnPowerSaveIsTransient()
478 BatteryUtils.enableBatterySaver(false); in testNightModeInCarModeOnPowerSaveIsTransient()
484 BatteryUtils.enableBatterySaver(true); in testNightModeInCarModeOnPowerSaveIsTransient()
501 BatteryUtils.enableBatterySaver(false); in testNightModeInCarModeOnPowerSaveIsTransient()
/cts/tests/tests/syncmanager/src/android/content/syncmanager/cts/
DCtsSyncManagerTest.java54 import com.android.compatibility.common.util.BatteryUtils;
99 BatteryUtils.runDumpsysBatteryUnplug(); in setUp()
100 BatteryUtils.enableAdaptiveBatterySaver(false); in setUp()
102 BatteryUtils.enableBatterySaver(false, false); in setUp()
121 BatteryUtils.runDumpsysBatteryReset(); in tearDown()
/cts/tests/tests/app.usage/src/android/app/usage/cts/
DUsageStatsTest.java104 import com.android.compatibility.common.util.BatteryUtils;
1368 assumeTrue("Test only works on devices with a battery", BatteryUtils.hasBattery()); in testIsAppInactive()
1373 BatteryUtils.runDumpsysBatteryUnplug(); in testIsAppInactive()
1407 BatteryUtils.runDumpsysBatteryReset(); in testIsAppInactive()
1415 assumeTrue("Test only works on devices with a battery", BatteryUtils.hasBattery()); in testIsAppInactive_Charging()
1420 BatteryUtils.runDumpsysBatteryUnplug(); in testIsAppInactive_Charging()
1424 BatteryUtils.runDumpsysBatterySetPluggedIn(true); in testIsAppInactive_Charging()
1425 BatteryUtils.runDumpsysBatterySetLevel(100); in testIsAppInactive_Charging()
1429 BatteryUtils.runDumpsysBatteryReset(); in testIsAppInactive_Charging()