/frameworks/base/core/tests/coretests/src/android/os/ |
D | PowerManagerTest.java | 25 private PowerManager mPm; 33 mPm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); in setUp() 53 PowerManager.WakeLock wl = mPm.newWakeLock(PowerManager.FULL_WAKE_LOCK, "FULL_WAKE_LOCK"); in testNewWakeLock() 56 wl = mPm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, "SCREEN_BRIGHT_WAKE_LOCK"); in testNewWakeLock() 59 wl = mPm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "SCREEN_DIM_WAKE_LOCK"); in testNewWakeLock() 62 wl = mPm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "PARTIAL_WAKE_LOCK"); in testNewWakeLock() 79 final int badFlags = PowerManager.SCREEN_BRIGHT_WAKE_LOCK in testBadNewWakeLock() 80 | PowerManager.SCREEN_DIM_WAKE_LOCK; in testBadNewWakeLock() 83 PowerManager.WakeLock wl = mPm.newWakeLock(badFlags, "foo"); in testBadNewWakeLock() 95 private void doTestWakeLock(PowerManager.WakeLock wl) { in doTestWakeLock()
|
/frameworks/support/v4/java/android/support/v4/content/ |
D | WakefulBroadcastReceiver.java | 23 import android.os.PowerManager; 62 private static final SparseArray<PowerManager.WakeLock> mActiveWakeLocks 63 = new SparseArray<PowerManager.WakeLock>(); 94 PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE); in startWakefulService() 95 PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, in startWakefulService() 118 PowerManager.WakeLock wl = mActiveWakeLocks.get(id); in completeWakefulIntent()
|
/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/services/core/java/com/android/server/job/controllers/ |
D | DeviceIdleJobsController.java | 23 import android.os.PowerManager; 50 private final PowerManager mPowerManager; 83 if (PowerManager.ACTION_LIGHT_DEVICE_IDLE_MODE_CHANGED.equals(action) 84 || PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED.equals(action)) { 89 } else if (PowerManager.ACTION_POWER_SAVE_WHITELIST_CHANGED.equals(action)) { 101 mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); in DeviceIdleJobsController() 105 filter.addAction(PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED); in DeviceIdleJobsController() 106 filter.addAction(PowerManager.ACTION_LIGHT_DEVICE_IDLE_MODE_CHANGED); in DeviceIdleJobsController() 107 filter.addAction(PowerManager.ACTION_POWER_SAVE_WHITELIST_CHANGED); in DeviceIdleJobsController()
|
/frameworks/base/tests/utils/SleepUtils/AlarmService/src/com/android/testing/alarmservice/ |
D | WakeUpController.java | 20 import android.os.PowerManager; 21 import android.os.PowerManager.WakeLock; 48 PowerManager pm = in getWakeLock() 49 (PowerManager) AlarmService.sContext.getSystemService(Context.POWER_SERVICE); in getWakeLock() 50 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "testing-alarmservice"); in getWakeLock()
|
/frameworks/base/services/core/java/com/android/server/power/ |
D | PowerManagerService.java | 43 import android.os.PowerManager; 445 private int mDozeScreenBrightnessOverrideFromDreamManager = PowerManager.BRIGHTNESS_DEFAULT; 545 now, PowerManager.USER_ACTIVITY_EVENT_OTHER, 0, Process.SYSTEM_UID); in onBootPhase() 568 PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); in systemReady() 817 Intent intent = new Intent(PowerManager.ACTION_POWER_SAVE_MODE_CHANGING) in updateLowPowerModeLocked() 818 .putExtra(PowerManager.EXTRA_POWER_SAVE_MODE, mLowPowerModeEnabled) in updateLowPowerModeLocked() 829 intent = new Intent(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED); in updateLowPowerModeLocked() 834 PowerManager.ACTION_POWER_SAVE_MODE_CHANGED_INTERNAL), UserHandle.ALL, in updateLowPowerModeLocked() 895 switch (wakeLock.mFlags & PowerManager.WAKE_LOCK_LEVEL_MASK) { in isScreenLock() 896 case PowerManager.FULL_WAKE_LOCK: in isScreenLock() [all …]
|
D | Notifier.java | 40 import android.os.PowerManager; 148 new Intent(PowerManager.ACTION_SCREEN_BRIGHTNESS_BOOST_CHANGED); in Notifier() 177 && (flags & PowerManager.UNIMPORTANT_FOR_LOGGING) != 0; in onWakeLockAcquired() 214 && (newFlags & PowerManager.UNIMPORTANT_FOR_LOGGING) != 0; in onWakeLockChanging() 260 switch (flags & PowerManager.WAKE_LOCK_LEVEL_MASK) { in getBatteryStatsWakeLockMonitorType() 261 case PowerManager.PARTIAL_WAKE_LOCK: in getBatteryStatsWakeLockMonitorType() 264 case PowerManager.SCREEN_DIM_WAKE_LOCK: in getBatteryStatsWakeLockMonitorType() 265 case PowerManager.SCREEN_BRIGHT_WAKE_LOCK: in getBatteryStatsWakeLockMonitorType() 268 case PowerManager.PROXIMITY_SCREEN_OFF_WAKE_LOCK: in getBatteryStatsWakeLockMonitorType() 274 case PowerManager.DRAW_WAKE_LOCK: in getBatteryStatsWakeLockMonitorType() [all …]
|
D | ShutdownThread.java | 37 import android.os.PowerManager; 112 private PowerManager mPowerManager; 113 private PowerManager.WakeLock mCpuWakeLock; 114 private PowerManager.WakeLock mScreenWakeLock; 276 if (PowerManager.REBOOT_RECOVERY_UPDATE.equals(mReason)) { in beginShutdownSequence() 295 } else if (PowerManager.REBOOT_RECOVERY.equals(mReason)) { in beginShutdownSequence() 313 sInstance.mPowerManager = (PowerManager)context.getSystemService(Context.POWER_SERVICE); in beginShutdownSequence() 319 PowerManager.PARTIAL_WAKE_LOCK, TAG + "-cpu"); in beginShutdownSequence() 332 PowerManager.FULL_WAKE_LOCK, TAG + "-screen"); in beginShutdownSequence()
|
/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 | DockObserver.java | 30 import android.os.PowerManager; 54 private final PowerManager mPowerManager; 55 private final PowerManager.WakeLock mWakeLock; 73 mPowerManager = (PowerManager)context.getSystemService(Context.POWER_SERVICE); in DockObserver() 74 mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG); in DockObserver()
|
/frameworks/base/tests/utils/SleepUtils/WakeLoopService/src/android/test/wakeuploop/ |
D | WakeUpCall.java | 27 import android.os.PowerManager; 28 import android.os.PowerManager.WakeLock; 106 PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE); in screenOn() 108 WakeLock wl = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK | in screenOn() 109 PowerManager.ACQUIRE_CAUSES_WAKEUP, LOG_TAG); in screenOn()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
D | BatteryControllerImpl.java | 26 import android.os.PowerManager; 46 private final PowerManager mPowerManager; 60 mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in BatteryControllerImpl() 69 filter.addAction(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED); in registerReceiver() 70 filter.addAction(PowerManager.ACTION_POWER_SAVE_MODE_CHANGING); in registerReceiver() 118 } else if (action.equals(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED)) { in onReceive() 120 } else if (action.equals(PowerManager.ACTION_POWER_SAVE_MODE_CHANGING)) { in onReceive() 121 setPowerSave(intent.getBooleanExtra(PowerManager.EXTRA_POWER_SAVE_MODE, false)); in onReceive()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/ |
D | SmsStorageMonitor.java | 26 import android.os.PowerManager; 54 private PowerManager.WakeLock mWakeLock; 134 PowerManager pm = (PowerManager)mContext.getSystemService(Context.POWER_SERVICE); in createWakelock() 135 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "SmsStorageMonitor"); in createWakelock()
|
D | WakeLockStateMachine.java | 24 import android.os.PowerManager; 40 private final PowerManager.WakeLock mWakeLock; 70 PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in WakeLockStateMachine() 71 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, debugTag); in WakeLockStateMachine()
|
/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/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/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/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
D | FingerprintUnlockController.java | 21 import android.os.PowerManager; 85 private PowerManager mPowerManager; 87 private PowerManager.WakeLock mWakeLock; 105 mPowerManager = context.getSystemService(PowerManager.class); in FingerprintUnlockController() 146 PowerManager.PARTIAL_WAKE_LOCK, FINGERPRINT_WAKE_LOCK_NAME); in onFingerprintAcquired()
|
/frameworks/base/tests/BatteryWaster/src/com/android/batterywaster/ |
D | BatteryWaster.java | 26 import android.os.PowerManager; 42 PowerManager.WakeLock mPartialWakeLock; 67 PowerManager pm = (PowerManager)getSystemService(POWER_SERVICE); in onCreate() 68 mPartialWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "BatteryWaster"); in onCreate()
|
/frameworks/base/media/java/android/media/ |
D | AsyncPlayer.java | 22 import android.os.PowerManager; 132 private PowerManager.WakeLock mWakeLock; 256 PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE); in setUsesWakeLock() 257 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, mTag); in setUsesWakeLock()
|
/frameworks/base/core/java/android/service/dreams/ |
D | Sandman.java | 22 import android.os.PowerManager; 93 PowerManager powerManager = in startDream() 94 (PowerManager)context.getSystemService(Context.POWER_SERVICE); in startDream()
|
/frameworks/base/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/ |
D | TestSoundTriggerActivity.java | 39 import android.os.PowerManager; 67 private PowerManager.WakeLock mScreenWakelock; 212 PowerManager pm = ((PowerManager)getSystemService(POWER_SERVICE)); in screenWakeup() 214 mScreenWakelock = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "TAG"); in screenWakeup() 220 PowerManager pm = ((PowerManager)getSystemService(POWER_SERVICE)); in screenRelease()
|
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/model/ |
D | NotificationController.java | 33 import android.os.PowerManager; 34 import android.os.PowerManager.WakeLock; 386 PowerManager powerManager = (PowerManager) in handleCancelPrintJob() 388 final WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, in handleCancelPrintJob() 425 PowerManager powerManager = (PowerManager) in handleRestartPrintJob() 427 final WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, in handleRestartPrintJob()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/ |
D | NotificationPlayer.java | 27 import android.os.PowerManager; 262 private PowerManager.WakeLock mWakeLock; 386 PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE); in setUsesWakeLock() 387 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, mTag); in setUsesWakeLock()
|