Home
last modified time | relevance | path

Searched refs:PowerManager (Results 1 – 25 of 160) sorted by relevance

1234567

/frameworks/base/core/tests/coretests/src/android/os/
DPowerManagerTest.java25 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/core-utils/java/android/support/v4/content/
DWakefulBroadcastReceiver.java23 import android.os.PowerManager;
64 private static final SparseArray<PowerManager.WakeLock> mActiveWakeLocks
65 = new SparseArray<PowerManager.WakeLock>();
96 PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE); in startWakefulService()
97 PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, in startWakefulService()
120 PowerManager.WakeLock wl = mActiveWakeLocks.get(id); in completeWakefulIntent()
/frameworks/opt/net/voip/src/java/com/android/server/sip/
DSipWakeLock.java19 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/
DPowerTest.java26 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/
DDeviceIdleJobsController.java23 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/
DWakeUpController.java20 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/
DPowerManagerService.java43 import android.os.PowerManager;
458 private int mDozeScreenBrightnessOverrideFromDreamManager = PowerManager.BRIGHTNESS_DEFAULT;
558 now, PowerManager.USER_ACTIVITY_EVENT_OTHER, 0, Process.SYSTEM_UID); in onBootPhase()
581 PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); in systemReady()
830 Intent intent = new Intent(PowerManager.ACTION_POWER_SAVE_MODE_CHANGING) in updateLowPowerModeLocked()
831 .putExtra(PowerManager.EXTRA_POWER_SAVE_MODE, mLowPowerModeEnabled) in updateLowPowerModeLocked()
842 intent = new Intent(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED); in updateLowPowerModeLocked()
847 PowerManager.ACTION_POWER_SAVE_MODE_CHANGED_INTERNAL), UserHandle.ALL, in updateLowPowerModeLocked()
908 switch (wakeLock.mFlags & PowerManager.WAKE_LOCK_LEVEL_MASK) { in isScreenLock()
909 case PowerManager.FULL_WAKE_LOCK: in isScreenLock()
[all …]
DNotifier.java41 import android.os.PowerManager;
151 new Intent(PowerManager.ACTION_SCREEN_BRIGHTNESS_BOOST_CHANGED); in Notifier()
180 && (flags & PowerManager.UNIMPORTANT_FOR_LOGGING) != 0; in onWakeLockAcquired()
259 && (newFlags & PowerManager.UNIMPORTANT_FOR_LOGGING) != 0; in onWakeLockChanging()
305 switch (flags & PowerManager.WAKE_LOCK_LEVEL_MASK) { in getBatteryStatsWakeLockMonitorType()
306 case PowerManager.PARTIAL_WAKE_LOCK: in getBatteryStatsWakeLockMonitorType()
309 case PowerManager.SCREEN_DIM_WAKE_LOCK: in getBatteryStatsWakeLockMonitorType()
310 case PowerManager.SCREEN_BRIGHT_WAKE_LOCK: in getBatteryStatsWakeLockMonitorType()
313 case PowerManager.PROXIMITY_SCREEN_OFF_WAKE_LOCK: in getBatteryStatsWakeLockMonitorType()
319 case PowerManager.DRAW_WAKE_LOCK: in getBatteryStatsWakeLockMonitorType()
[all …]
DShutdownThread.java37 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/
DConsumerIrService.java22 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()
DDockObserver.java30 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/
DWakeUpCall.java27 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/
DBatteryControllerImpl.java26 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()
122 } else if (action.equals(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED)) { in onReceive()
124 } else if (action.equals(PowerManager.ACTION_POWER_SAVE_MODE_CHANGING)) { in onReceive()
125 setPowerSave(intent.getBooleanExtra(PowerManager.EXTRA_POWER_SAVE_MODE, false)); in onReceive()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DSmsStorageMonitor.java26 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()
DWakeLockStateMachine.java24 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/
DDozeTestDream.java26 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/cmds/uiautomator/instrumentation/testrunner-src/com/android/uiautomator/core/
DInstrumentationUiAutomatorBridge.java22 import android.os.PowerManager;
52 PowerManager pm = (PowerManager) in isScreenOn()
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/
DMediaFrameworkTest.java27 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/tests/BatteryWaster/src/com/android/batterywaster/
DBatteryWaster.java26 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/
DAsyncPlayer.java22 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/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DFingerprintUnlockController.java21 import android.os.PowerManager;
86 private PowerManager mPowerManager;
88 private PowerManager.WakeLock mWakeLock;
106 mPowerManager = context.getSystemService(PowerManager.class); in FingerprintUnlockController()
148 PowerManager.PARTIAL_WAKE_LOCK, FINGERPRINT_WAKE_LOCK_NAME); in onFingerprintAcquired()
/frameworks/base/core/java/android/service/dreams/
DSandman.java22 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/
DSoundTriggerTestActivity.java38 import android.os.PowerManager;
70 private PowerManager.WakeLock mScreenWakelock;
201 PowerManager pm = ((PowerManager)getSystemService(POWER_SERVICE)); in screenWakeup()
203 PowerManager.SCREEN_DIM_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP, TAG); in screenWakeup()
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/model/
DNotificationController.java33 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/core/java/android/hardware/display/
DDisplayManagerInternal.java21 import android.os.PowerManager;
220 screenBrightness = PowerManager.BRIGHTNESS_ON; in DisplayPowerRequest()
224 dozeScreenBrightness = PowerManager.BRIGHTNESS_DEFAULT; in DisplayPowerRequest()

1234567