Home
last modified time | relevance | path

Searched refs:mPowerManager (Results 1 – 14 of 14) sorted by relevance

/cts/tests/tests/os/src/android/os/cts/
DLowPowerStandbyTest.java102 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 …]
DPowerManager_ThermalTest.java60 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/
DKeepScreenOnTests.java52 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/
DDisplayWakeReportedTests.java50 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/
DBatterySaverTestActivity.java30 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()) {
DIgnoreBatteryOptimizationsTestActivity.java32 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/
DPowerPolicyTestActivity.java67 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()
DPowerPolicyTestClient.java51 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()
DCarPowerTestService.java357 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/
DPowerPolicyTestActivity.java49 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/
DUserInitiatedJobTest.java81 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()
DJobThrottlingTest.java100 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/
DConnectivityBackgroundTestActivity.java94 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/
DBasicApiTests.java94 private PowerManager mPowerManager = mContext.getSystemService(PowerManager.class); field in BasicApiTests
324 PollingCheck.waitFor(10_000, () -> (on == mPowerManager.isDeviceIdleMode()), in toggleIdleMode()