/cts/tests/tests/os/src/android/os/cts/ |
D | LowPowerStandbyTest.java | 102 private PowerManager mPowerManager; field in LowPowerStandbyTest 110 mPowerManager = mContext.getSystemService(PowerManager.class); in setUp() 111 mOriginalEnabled = mPowerManager.isLowPowerStandbyEnabled(); in setUp() 116 assumeTrue(mPowerManager.isLowPowerStandbySupported()); in setUp() 117 mOriginalPolicy = mPowerManager.getLowPowerStandbyPolicy(); in setUp() 120 mPowerManager.setLowPowerStandbyPolicy(null); in setUp() 126 if (mPowerManager != null) { in tearDown() 130 mPowerManager.setLowPowerStandbyEnabled(mOriginalEnabled); in tearDown() 131 mPowerManager.forceLowPowerStandbyActive(false); in tearDown() 132 mPowerManager.setLowPowerStandbyPolicy(mOriginalPolicy); in tearDown() [all …]
|
D | PowerManager_ThermalTest.java | 60 private PowerManager mPowerManager; field in PowerManager_ThermalTest 75 mPowerManager = mContext.getSystemService(PowerManager.class); in setUp() 87 assertEquals(status, mPowerManager.getCurrentThermalStatus()); in testGetThermalStatus() 90 assertEquals(status, mPowerManager.getCurrentThermalStatus()); in testGetThermalStatus() 98 mPowerManager.addThermalStatusListener(mExec, mListener1); in testThermalStatusCallback() 109 mPowerManager.addThermalStatusListener(mListener1); in testThermalStatusCallback() 114 mPowerManager.addThermalStatusListener(mListener2); in testThermalStatusCallback() 127 mPowerManager.removeThermalStatusListener(mListener1); in testThermalStatusCallback() 130 mPowerManager.removeThermalStatusListener(mListener1); in testThermalStatusCallback() 150 float headroom = mPowerManager.getThermalHeadroom(0); in testGetThermalHeadroom() [all …]
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/animations/ |
D | KeepScreenOnTests.java | 52 private PowerManager mPowerManager; field in KeepScreenOnTests 66 mPowerManager = mContext.getSystemService(PowerManager.class); in setUp() 84 assertTrue(mPowerManager.isInteractive()); in testKeepScreenOn_activityOnDefaultDisplay_screenStaysOn() 88 assertTrue(mPowerManager.isInteractive()); in testKeepScreenOn_activityOnDefaultDisplay_screenStaysOn() 100 assertTrue(mPowerManager.isInteractive()); in testKeepScreenOn_activityNotForeground_screenTurnsOff() 106 assertFalse(mPowerManager.isInteractive()); in testKeepScreenOn_activityNotForeground_screenTurnsOff() 119 assertTrue(mPowerManager.isInteractive()); in testKeepScreenOn_activityOnVirtualDisplay_screenStaysOn() 123 assertTrue(mPowerManager.isInteractive()); in testKeepScreenOn_activityOnVirtualDisplay_screenStaysOn() 136 assertTrue(mPowerManager.isInteractive()); in testKeepScreenOn_activityOnVirtualDisplayNotForeground_screenTurnsOff() 142 assertFalse(mPowerManager.isInteractive()); in testKeepScreenOn_activityOnVirtualDisplayNotForeground_screenTurnsOff()
|
/cts/hostsidetests/statsdatom/apps/statsdapp/src/com/android/server/cts/device/statsdatom/ |
D | DisplayWakeReportedTests.java | 50 private PowerManager mPowerManager; field in DisplayWakeReportedTests 56 mPowerManager = InstrumentationRegistry.getContext().getSystemService(PowerManager.class); in setUp() 57 mSystemWakeLock = mPowerManager.newWakeLock(PARTIAL_WAKE_LOCK, TAG); in setUp() 63 () -> !mPowerManager.isInteractive()); in setUp() 69 () -> mPowerManager.isInteractive()); in tearDown() 87 PowerManager.WakeLock wakeLock = mPowerManager.newWakeLock( in testWakeWithWakeLock() 96 mPowerManager.wakeUp(SystemClock.uptimeMillis(), in testWakeWithWakeUpApi()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/battery/ |
D | BatterySaverTestActivity.java | 30 private PowerManager mPowerManager; field in BatterySaverTestActivity 38 mPowerManager = getSystemService(PowerManager.class); in onCreate() 110 if (!mPowerManager.isPowerSaveMode()) { 117 if (mPowerManager.isPowerSaveMode()) { 128 if (mPowerManager.isPowerSaveMode()) { 139 if (!mPowerManager.isPowerSaveMode()) {
|
D | IgnoreBatteryOptimizationsTestActivity.java | 32 private PowerManager mPowerManager; field in IgnoreBatteryOptimizationsTestActivity 41 mPowerManager = getSystemService(PowerManager.class); in onCreate() 66 return mPowerManager.isIgnoringBatteryOptimizations(getPackageName()) in isExempted() 75 if (mPowerManager.isIgnoringBatteryOptimizations(getPackageName()) in isFullyNotExempted() 95 if (mPowerManager.areAutoPowerSaveModesEnabled()) {
|
/cts/hostsidetests/car/app/src/android/car/cts/app/ |
D | PowerPolicyTestActivity.java | 67 private CarPowerManager mPowerManager; field in PowerPolicyTestActivity 72 return mPowerManager; in getPowerManager() 122 mTestClient.setPowerManager(mPowerManager); in initCarApi() 137 mPowerManager = (CarPowerManager) car.getCarManager( in initManagers() 141 mPowerManager = null; in initManagers()
|
D | PowerPolicyTestClient.java | 51 private CarPowerManager mPowerManager; field in PowerPolicyTestClient 128 mPowerManager = pm; in setPowerManager() 132 return mPowerManager; in getPowerManager() 164 mPowerManager.addPowerPolicyListener(mExecutor, filter, listener); in registerPowerPolicyListener() 174 mPowerManager.removePowerPolicyListener(listener); in unregisterPowerPolicyListener()
|
D | CarPowerTestService.java | 357 protected final CarPowerManager mPowerManager; field in CarPowerTestService.WaitablePowerStateListener 364 mPowerManager = mCarPowerManager; in WaitablePowerStateListener() 378 mPowerManager.setListener(getMainExecutor(), in WaitablePowerStateListenerWithoutCompletion() 399 mPowerManager.setListenerWithCompletion(getMainExecutor(), in WaitablePowerStateListenerWithCompletion()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/car/ |
D | PowerPolicyTestActivity.java | 49 private CarPowerManager mPowerManager; field in PowerPolicyTestActivity 104 CarPowerPolicy curPolicy = mPowerManager.getCurrentPowerPolicy(); in onCreate() 156 CarPowerPolicy curPolicy = mPowerManager.getCurrentPowerPolicy(); in onCreate() 229 if (mPowerManager == null) { in checkCarPowerManager() 252 mPowerManager = (CarPowerManager) car.getCarManager( in initManagers() 256 mPowerManager = null; in initManagers()
|
/cts/tests/JobScheduler/src/android/jobscheduler/cts/ |
D | UserInitiatedJobTest.java | 81 private PowerManager mPowerManager; field in UserInitiatedJobTest 107 mPowerManager = mContext.getSystemService(PowerManager.class); in setUp() 108 mInitialLowPowerStandbyEnabled = mPowerManager.isLowPowerStandbyEnabled(); in setUp() 111 mPowerManager.setLowPowerStandbyEnabled(false); in setUp() 124 mPowerManager.setLowPowerStandbyEnabled(mInitialLowPowerStandbyEnabled); in tearDown()
|
D | JobThrottlingTest.java | 100 private PowerManager mPowerManager; field in JobThrottlingTest 131 mPowerManager = mContext.getSystemService(PowerManager.class); in setUp() 1382 ? mPowerManager.isDeviceIdleMode() in toggleDozeState() 1383 : mPowerManager.isDeviceLightIdleMode(); in toggleDozeState() 1385 return !mPowerManager.isDeviceIdleMode() in toggleDozeState() 1386 && !mPowerManager.isDeviceLightIdleMode(); in toggleDozeState()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/net/ |
D | ConnectivityBackgroundTestActivity.java | 94 private PowerManager mPowerManager; field in ConnectivityBackgroundTestActivity 176 mPowerManager = (PowerManager) getSystemService(Context.POWER_SERVICE); in configureFromSystemServices() 177 mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG); in configureFromSystemServices() 262 PowerManager.WakeLock screenOnLock = mPowerManager.newWakeLock( in tryScreenOn()
|
/cts/tests/AlarmManager/src/android/alarmmanager/cts/ |
D | BasicApiTests.java | 94 private PowerManager mPowerManager = mContext.getSystemService(PowerManager.class); field in BasicApiTests 324 PollingCheck.waitFor(10_000, () -> (on == mPowerManager.isDeviceIdleMode()), in toggleIdleMode()
|