/frameworks/base/core/tests/coretests/src/android/os/ |
D | PowerManagerTest.java | 40 private PowerManager mPm; 44 private PowerManager.OnThermalStatusChangedListener mListener1; 46 private PowerManager.OnThermalStatusChangedListener mListener2; 57 mPm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); in setUp() 86 PowerManager.WakeLock wl = mPm.newWakeLock(PowerManager.FULL_WAKE_LOCK, "FULL_WAKE_LOCK"); in testNewWakeLock() 89 wl = mPm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, "SCREEN_BRIGHT_WAKE_LOCK"); in testNewWakeLock() 92 wl = mPm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "SCREEN_DIM_WAKE_LOCK"); in testNewWakeLock() 95 wl = mPm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "PARTIAL_WAKE_LOCK"); in testNewWakeLock() 109 final int badFlags = PowerManager.SCREEN_BRIGHT_WAKE_LOCK in testBadNewWakeLock() 110 | PowerManager.SCREEN_DIM_WAKE_LOCK; in testBadNewWakeLock() [all …]
|
D | PowerManagerVrTest.java | 35 private PowerManager mPm; 50 mPm = (PowerManager) getInstrumentation().getTargetContext().getSystemService( in setUp() 129 PowerManager.WakeLock wl = mPm.newWakeLock( in wakeUpDevice() 130 PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP in wakeUpDevice() 131 | PowerManager.ON_AFTER_RELEASE, "FULL_WAKE_LOCK"); in wakeUpDevice()
|
/frameworks/opt/net/voip/src/java/com/android/server/sip/ |
D | SipWakeLock.java | 19 import android.os.PowerManager; 27 private PowerManager mPowerManager; 28 private PowerManager.WakeLock mWakeLock; 29 private PowerManager.WakeLock mTimerWakeLock; 32 SipWakeLock(PowerManager powerManager) { in SipWakeLock() 45 PowerManager.PARTIAL_WAKE_LOCK, "SipWakeLock.timer"); in acquire() 55 PowerManager.PARTIAL_WAKE_LOCK, "SipWakeLock"); in acquire()
|
/frameworks/base/tests/StatusBar/src/com/android/statusbartest/ |
D | PowerTest.java | 26 import android.os.PowerManager; 35 PowerManager mPm; 36 PowerManager.WakeLock mProx; 46 mPm = (PowerManager)getSystemService("power"); in tests() 47 mProx = mPm.newWakeLock(PowerManager.PROXIMITY_SCREEN_OFF_WAKE_LOCK, "PowerTest-prox"); in tests() 82 mProx.release(PowerManager.RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY); 103 mProx.release(PowerManager.RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY);
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ |
D | DozeParametersTest.java | 25 import android.os.PowerManager; 44 PowerManager mockedPowerManager = dozeParameters.getPowerManager(); in test_setControlScreenOffAnimation_setsDozeAfterScreenOff_false() 54 PowerManager mockedPowerManager = dozeParameters.getPowerManager(); in test_setControlScreenOffAnimation_setsDozeAfterScreenOff_true() 71 private PowerManager mPowerManager; 75 mPowerManager = mock(PowerManager.class); in TestableDozeParameters() 79 protected PowerManager getPowerManager() { in getPowerManager()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/ |
D | BatteryControllerTest.java | 23 import android.os.PowerManager; 46 private PowerManager mPowerManager; 61 Intent intent = new Intent(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED); in testIndependentAODBatterySaver_true() 62 when(mPowerManager.getPowerSaveState(PowerManager.ServiceType.AOD)).thenReturn(state); in testIndependentAODBatterySaver_true() 76 Intent intent = new Intent(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED); in testIndependentAODBatterySaver_false() 77 when(mPowerManager.getPowerSaveState(PowerManager.ServiceType.AOD)).thenReturn(state); in testIndependentAODBatterySaver_false()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/power/ |
D | PowerManagerServiceTest.java | 59 import android.os.PowerManager; 150 eq(PowerManager.ServiceType.SCREEN_BRIGHTNESS))) in setUp() 247 PowerManager.GO_TO_SLEEP_REASON_APPLICATION, PowerManager.GO_TO_SLEEP_FLAG_NO_DOZE); in forceSleep() 256 PowerManager.WAKE_REASON_UNKNOWN, "testing IPowerManager.wakeUp()", "pkg.name"); in forceAwake() 261 PowerManager.GO_TO_SLEEP_REASON_APPLICATION, 0); in forceDozing() 287 assertThat(reason).isEqualTo(PowerManager.SHUTDOWN_REASON_THERMAL_SHUTDOWN); in testGetLastShutdownReasonInternal() 294 mService.setWakefulnessLocked(WAKEFULNESS_AWAKE, PowerManager.WAKE_REASON_UNKNOWN, 0); in testGetDesiredScreenPolicy_WithVR() 304 mService.setWakefulnessLocked(WAKEFULNESS_ASLEEP, PowerManager.GO_TO_SLEEP_REASON_TIMEOUT, in testGetDesiredScreenPolicy_WithVR() 310 mService.setWakefulnessLocked(WAKEFULNESS_AWAKE, PowerManager.WAKE_REASON_UNKNOWN, 0); in testGetDesiredScreenPolicy_WithVR() 335 PowerManager.GO_TO_SLEEP_REASON_APPLICATION, PowerManager.GO_TO_SLEEP_FLAG_NO_DOZE); in testWakefulnessSleep_NoDozeSleepFlag() [all …]
|
/frameworks/base/services/core/java/com/android/server/power/ |
D | Notifier.java | 38 import android.os.PowerManager; 39 import android.os.PowerManager.WakeReason; 185 new Intent(PowerManager.ACTION_SCREEN_BRIGHTNESS_BOOST_CHANGED); in Notifier() 216 && (flags & PowerManager.UNIMPORTANT_FOR_LOGGING) != 0; in onWakeLockAcquired() 298 && (newFlags & PowerManager.UNIMPORTANT_FOR_LOGGING) != 0; in onWakeLockChanging() 343 switch (flags & PowerManager.WAKE_LOCK_LEVEL_MASK) { in getBatteryStatsWakeLockMonitorType() 344 case PowerManager.PARTIAL_WAKE_LOCK: in getBatteryStatsWakeLockMonitorType() 347 case PowerManager.SCREEN_DIM_WAKE_LOCK: in getBatteryStatsWakeLockMonitorType() 348 case PowerManager.SCREEN_BRIGHT_WAKE_LOCK: in getBatteryStatsWakeLockMonitorType() 351 case PowerManager.PROXIMITY_SCREEN_OFF_WAKE_LOCK: in getBatteryStatsWakeLockMonitorType() [all …]
|
D | PowerManagerService.java | 54 import android.os.PowerManager; 55 import android.os.PowerManager.ServiceType; 56 import android.os.PowerManager.WakeData; 57 import android.os.PowerManager.WakeReason; 503 private int mDozeScreenBrightnessOverrideFromDreamManager = PowerManager.BRIGHTNESS_DEFAULT; 824 now, PowerManager.USER_ACTIVITY_EVENT_OTHER, 0, Process.SYSTEM_UID); in onBootPhase() 840 PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); in systemReady() 1109 switch (wakeLock.mFlags & PowerManager.WAKE_LOCK_LEVEL_MASK) { in isScreenLock() 1110 case PowerManager.FULL_WAKE_LOCK: in isScreenLock() 1111 case PowerManager.SCREEN_BRIGHT_WAKE_LOCK: in isScreenLock() [all …]
|
/frameworks/base/services/core/java/com/android/server/ |
D | ConsumerIrService.java | 22 import android.os.PowerManager; 37 private final PowerManager.WakeLock mWakeLock; 43 PowerManager pm = (PowerManager)context.getSystemService( in ConsumerIrService() 45 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG); in ConsumerIrService()
|
D | UserspaceRebootLogger.java | 27 import android.os.PowerManager; 61 if (!PowerManager.isRebootingUserspaceSupportedImpl()) { in noteUserspaceRebootWasRequested() 79 if (!PowerManager.isRebootingUserspaceSupportedImpl()) { in noteUserspaceRebootSuccess() 94 if (!PowerManager.isRebootingUserspaceSupportedImpl()) { in shouldLogUserspaceRebootEvent() 112 if (!PowerManager.isRebootingUserspaceSupportedImpl()) { in logEventAsync()
|
/frameworks/base/services/core/java/com/android/server/power/batterysaver/ |
D | BatterySaverController.java | 30 import android.os.PowerManager; 69 private PowerManager mPowerManager; 185 case PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED: 186 case PowerManager.ACTION_LIGHT_DEVICE_IDLE_MODE_CHANGED: 228 filter.addAction(PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED); in systemReady() 229 filter.addAction(PowerManager.ACTION_LIGHT_DEVICE_IDLE_MODE_CHANGED); in systemReady() 237 private PowerManager getPowerManager() { in getPowerManager() 240 Preconditions.checkNotNull(mContext.getSystemService(PowerManager.class)); in getPowerManager() 479 Intent intent = new Intent(PowerManager.ACTION_POWER_SAVE_MODE_CHANGING) in handleBatterySaverStateChanged() 480 .putExtra(PowerManager.EXTRA_POWER_SAVE_MODE, isEnabled()) in handleBatterySaverStateChanged() [all …]
|
/frameworks/base/services/core/java/com/android/server/job/controllers/ |
D | DeviceIdleJobsController.java | 27 import android.os.PowerManager; 68 private final PowerManager mPowerManager; 83 case PowerManager.ACTION_LIGHT_DEVICE_IDLE_MODE_CHANGED: 84 case PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED: 88 case PowerManager.ACTION_POWER_SAVE_WHITELIST_CHANGED: 98 case PowerManager.ACTION_POWER_SAVE_TEMP_WHITELIST_CHANGED: 124 mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); in DeviceIdleJobsController() 134 filter.addAction(PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED); in DeviceIdleJobsController() 135 filter.addAction(PowerManager.ACTION_LIGHT_DEVICE_IDLE_MODE_CHANGED); in DeviceIdleJobsController() 136 filter.addAction(PowerManager.ACTION_POWER_SAVE_WHITELIST_CHANGED); in DeviceIdleJobsController() [all …]
|
/frameworks/base/services/core/java/com/android/server/timedetector/ |
D | TimeDetectorStrategyCallbackImpl.java | 23 import android.os.PowerManager; 49 @NonNull private final PowerManager.WakeLock mWakeLock; 56 PowerManager powerManager = context.getSystemService(PowerManager.class); in TimeDetectorStrategyCallbackImpl() 58 powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG)); in TimeDetectorStrategyCallbackImpl()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/recoverysystem/ |
D | RecoverySystemServiceTestable.java | 20 import android.os.PowerManager; 27 private final PowerManager mPowerManager; 32 PowerManager powerManager, FileWriter uncryptPackageFileWriter, in MockInjector() 42 public PowerManager getPowerManager() { in getPowerManager() 82 PowerManager powerManager, FileWriter uncryptPackageFileWriter, in RecoverySystemServiceTestable()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/wakelock/ |
D | WakeLock.java | 20 import android.os.PowerManager; 65 static PowerManager.WakeLock createPartialInner(Context context, String tag) { in createPartialInner() 66 return context.getSystemService(PowerManager.class) in createPartialInner() 67 .newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, tag); in createPartialInner() 88 static WakeLock wrap(final PowerManager.WakeLock inner, long maxTimeout) {
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
D | BatteryControllerImpl.java | 26 import android.os.PowerManager; 63 private final PowerManager mPowerManager; 80 this(context, enhancedEstimates, context.getSystemService(PowerManager.class)); in BatteryControllerImpl() 85 PowerManager powerManager) { in BatteryControllerImpl() 99 filter.addAction(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED); in registerReceiver() 100 filter.addAction(PowerManager.ACTION_POWER_SAVE_MODE_CHANGING); in registerReceiver() 154 } else if (action.equals(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED)) { in onReceive() 156 } else if (action.equals(PowerManager.ACTION_POWER_SAVE_MODE_CHANGING)) { in onReceive() 157 setPowerSave(intent.getBooleanExtra(PowerManager.EXTRA_POWER_SAVE_MODE, false)); in onReceive() 278 PowerSaveState state = mPowerManager.getPowerSaveState(PowerManager.ServiceType.AOD); in setPowerSave()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/ |
D | SmsStorageMonitor.java | 27 import android.os.PowerManager; 56 private PowerManager.WakeLock mWakeLock; 137 PowerManager pm = (PowerManager)mContext.getSystemService(Context.POWER_SERVICE); in createWakelock() 138 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "SmsStorageMonitor"); in createWakelock()
|
D | WakeLockStateMachine.java | 24 import android.os.PowerManager; 43 private final PowerManager.WakeLock mWakeLock; 79 PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in WakeLockStateMachine() 80 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, debugTag); in WakeLockStateMachine()
|
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/wear/ |
D | WearPackageInstallerService.java | 40 import android.os.PowerManager; 111 private static volatile PowerManager.WakeLock lockStatic = null; 160 PowerManager.WakeLock lock = getLock(this.getApplicationContext()); in onStartCommand() 214 PowerManager.WakeLock lock = getLock(this.getApplicationContext()); in installPackage() 366 PowerManager.WakeLock lock = getLock(this.getApplicationContext()); in uninstallPackage() 479 private void finishService(PowerManager.WakeLock lock, int startId) { in finishService() 486 private synchronized PowerManager.WakeLock getLock(Context context) { in getLock() 488 PowerManager mgr = in getLock() 489 (PowerManager) context.getSystemService(Context.POWER_SERVICE); in getLock() 491 PowerManager.PARTIAL_WAKE_LOCK, context.getClass().getSimpleName()); in getLock() [all …]
|
/frameworks/base/tests/DozeTest/src/com/android/dreams/dozetest/ |
D | DozeTestDream.java | 26 import android.os.PowerManager; 56 private PowerManager mPowerManager; 57 private PowerManager.WakeLock mWakeLock; 75 mPowerManager = (PowerManager)getSystemService(Context.POWER_SERVICE); in onCreate() 76 mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG); in onCreate()
|
/frameworks/base/core/java/android/service/dreams/ |
D | Sandman.java | 22 import android.os.PowerManager; 93 PowerManager powerManager = in startDream() 94 context.getSystemService(PowerManager.class); in startDream() 96 PowerManager.WAKE_REASON_PLUGGED_IN, in startDream()
|
/frameworks/base/cmds/uiautomator/instrumentation/testrunner-src/com/android/uiautomator/core/ |
D | InstrumentationUiAutomatorBridge.java | 22 import android.os.PowerManager; 52 PowerManager pm = (PowerManager) in isScreenOn()
|
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/ |
D | MediaFrameworkTest.java | 27 import android.os.PowerManager; 69 private PowerManager.WakeLock mWakeLock = null; 96 PowerManager pm = (PowerManager) this.getSystemService(Context.POWER_SERVICE); in onCreate() 97 mWakeLock = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK, "MediaFrameworkTest"); in onCreate()
|
/frameworks/base/services/core/java/com/android/server/location/ |
D | NtpTimeHelper.java | 8 import android.os.PowerManager; 9 import android.os.PowerManager.WakeLock; 83 PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in NtpTimeHelper() 84 mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, WAKELOCK_KEY); in NtpTimeHelper()
|