Home
last modified time | relevance | path

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

123456

/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()
DPowerManagerVrTest.java22 import android.os.PowerManager;
37 private PowerManager mPm;
52 mPm = (PowerManager) getInstrumentation().getTargetContext().getSystemService( in setUp()
131 PowerManager.WakeLock wl = mPm.newWakeLock( in wakeUpDevice()
132 PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP in wakeUpDevice()
133 | PowerManager.ON_AFTER_RELEASE, "FULL_WAKE_LOCK"); in wakeUpDevice()
/frameworks/support/core-utils/java/android/support/v4/content/
DWakefulBroadcastReceiver.java23 import android.os.PowerManager;
73 private static final SparseArray<PowerManager.WakeLock> mActiveWakeLocks
74 = new SparseArray<PowerManager.WakeLock>();
105 PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE); in startWakefulService()
106 PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, in startWakefulService()
129 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/support/wear/tests/src/android/support/wear/widget/util/
DWakeLockRule.java20 import android.os.PowerManager;
21 import android.os.PowerManager.WakeLock;
34 PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP;
54 PowerManager power = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
/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/packages/SystemUI/src/com/android/systemui/util/wakelock/
DWakeLock.java20 import android.os.PowerManager;
40 static PowerManager.WakeLock createPartialInner(Context context, String tag) { in createPartialInner()
41 return context.getSystemService(PowerManager.class) in createPartialInner()
42 .newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, tag); in createPartialInner()
45 static WakeLock wrap(final PowerManager.WakeLock inner) { in wrap()
/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/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/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()
/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/services/core/java/com/android/server/power/
DPowerManagerService.java45 import android.os.PowerManager;
505 private int mDozeScreenBrightnessOverrideFromDreamManager = PowerManager.BRIGHTNESS_DEFAULT;
701 now, PowerManager.USER_ACTIVITY_EVENT_OTHER, 0, Process.SYSTEM_UID); in onBootPhase()
724 PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); in systemReady()
991 Intent intent = new Intent(PowerManager.ACTION_POWER_SAVE_MODE_CHANGING) in updateLowPowerModeLocked()
992 .putExtra(PowerManager.EXTRA_POWER_SAVE_MODE, mLowPowerModeEnabled) in updateLowPowerModeLocked()
1007 intent = new Intent(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED); in updateLowPowerModeLocked()
1011 intent = new Intent(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED_INTERNAL); in updateLowPowerModeLocked()
1082 switch (wakeLock.mFlags & PowerManager.WAKE_LOCK_LEVEL_MASK) { in isScreenLock()
1083 case PowerManager.FULL_WAKE_LOCK: in isScreenLock()
[all …]
DNotifier.java43 import android.os.PowerManager;
155 new Intent(PowerManager.ACTION_SCREEN_BRIGHTNESS_BOOST_CHANGED); in Notifier()
184 && (flags & PowerManager.UNIMPORTANT_FOR_LOGGING) != 0; in onWakeLockAcquired()
263 && (newFlags & PowerManager.UNIMPORTANT_FOR_LOGGING) != 0; in onWakeLockChanging()
309 switch (flags & PowerManager.WAKE_LOCK_LEVEL_MASK) { in getBatteryStatsWakeLockMonitorType()
310 case PowerManager.PARTIAL_WAKE_LOCK: in getBatteryStatsWakeLockMonitorType()
313 case PowerManager.SCREEN_DIM_WAKE_LOCK: in getBatteryStatsWakeLockMonitorType()
314 case PowerManager.SCREEN_BRIGHT_WAKE_LOCK: in getBatteryStatsWakeLockMonitorType()
317 case PowerManager.PROXIMITY_SCREEN_OFF_WAKE_LOCK: in getBatteryStatsWakeLockMonitorType()
323 case PowerManager.DRAW_WAKE_LOCK: in getBatteryStatsWakeLockMonitorType()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DBatteryControllerImpl.java26 import android.os.PowerManager;
46 private final PowerManager mPowerManager;
61 mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in BatteryControllerImpl()
70 filter.addAction(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED); in registerReceiver()
71 filter.addAction(PowerManager.ACTION_POWER_SAVE_MODE_CHANGING); in registerReceiver()
125 } else if (action.equals(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED)) { in onReceive()
127 } else if (action.equals(PowerManager.ACTION_POWER_SAVE_MODE_CHANGING)) { in onReceive()
128 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/cmds/uiautomator/instrumentation/testrunner-src/com/android/uiautomator/core/
DInstrumentationUiAutomatorBridge.java22 import android.os.PowerManager;
52 PowerManager pm = (PowerManager) in isScreenOn()
/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/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/packages/SystemUI/src/com/android/systemui/doze/
DDozeService.java19 import android.os.PowerManager;
77 PowerManager pm = getSystemService(PowerManager.class); in requestWakeUp()
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DLatencyTester.java24 import android.os.PowerManager;
66 PowerManager powerManager = mContext.getSystemService(PowerManager.class); in fakeTurnOnScreen()
/frameworks/base/media/java/android/media/
DAsyncPlayer.java23 import android.os.PowerManager;
133 private PowerManager.WakeLock mWakeLock;
258 PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE); in setUsesWakeLock()
259 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, mTag); in setUsesWakeLock()
/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/services/accessibility/java/com/android/server/accessibility/
DKeyEventDispatcher.java22 import android.os.PowerManager;
70 private final PowerManager mPowerManager;
84 int messageTypeForSendKeyEvent, Object lock, PowerManager powerManager) { in KeyEventDispatcher()
105 int messageTypeForSendKeyEvent, Object lock, PowerManager powerManager, in KeyEventDispatcher()
173 PowerManager.USER_ACTIVITY_EVENT_ACCESSIBILITY, 0); in setOnKeyEventResult()

123456