Home
last modified time | relevance | path

Searched refs:mWakeLock (Results 1 – 25 of 27) sorted by relevance

12

/packages/apps/Messaging/src/com/android/messaging/util/
DWakeLockHelper.java41 private PowerManager.WakeLock mWakeLock; field in WakeLockHelper
53 if (mWakeLock == null) { in acquire()
59 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, mWakeLockId); in acquire()
65 mWakeLock.acquire(); in acquire()
74 return (respectWakeLock && mWakeLock.isHeld()); in isHeld()
92 + " opcode: " + opcode + " sWakeLock: " + mWakeLock + " isHeld: " in ensure()
93 + ((mWakeLock == null) ? "(null)" : mWakeLock.isHeld())); in ensure()
110 mWakeLock.release(); in release()
113 + intent.getAction() + " opcode: " + opcode + " sWakeLock: " + mWakeLock in release()
114 + " isHeld: " + ((mWakeLock == null) ? "(null)" : mWakeLock.isHeld())); in release()
DNotificationPlayer.java243 private PowerManager.WakeLock mWakeLock; field in NotificationPlayer
340 if (mWakeLock != null || mThread != null) { in setUsesWakeLock()
343 throw new RuntimeException("assertion failed mWakeLock=" + mWakeLock in setUsesWakeLock()
348 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, mTag); in setUsesWakeLock()
352 if (mWakeLock != null) { in acquireWakeLock()
353 mWakeLock.acquire(); in acquireWakeLock()
358 if (mWakeLock != null) { in releaseWakeLock()
359 mWakeLock.release(); in releaseWakeLock()
/packages/apps/Bluetooth/src/com/android/bluetooth/pbap/
DBluetoothPbapService.java150 private PowerManager.WakeLock mWakeLock = null; field in BluetoothPbapService
462 if (mWakeLock != null) { in closeService()
463 mWakeLock.release(); in closeService()
464 mWakeLock = null; in closeService()
486 if (mWakeLock == null) { in startObexServerSession()
488 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, in startObexServerSession()
490 mWakeLock.setReferenceCounted(false); in startObexServerSession()
491 mWakeLock.acquire(); in startObexServerSession()
527 if (mWakeLock != null) { in stopObexServerSession()
528 mWakeLock.release(); in stopObexServerSession()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/sap/
DSapService.java78 private PowerManager.WakeLock mWakeLock = null; field in SapService
234 if (mWakeLock != null) { in closeService()
237 mWakeLock.release(); in closeService()
238 mWakeLock = null; in closeService()
250 if (mWakeLock == null) { in startSapServerSession()
252 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, in startSapServerSession()
254 mWakeLock.setReferenceCounted(false); in startSapServerSession()
255 mWakeLock.acquire(); in startSapServerSession()
288 if (mWakeLock != null) { in stopSapServerSession()
289 mWakeLock.release(); in stopSapServerSession()
[all …]
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
DInCallWakeLockControllerTest.java46 @Mock PowerManager.WakeLock mWakeLock; field in InCallWakeLockControllerTest
74 verify(mWakeLock).acquire(); in DONT_test_RingingCallAdded()
79 when(mWakeLock.isHeld()).thenReturn(false); in DONT_test_NonRingingCallAdded()
82 verify(mWakeLock, never()).acquire(); in DONT_test_NonRingingCallAdded()
88 verify(mWakeLock).acquire(); in DONT_test_RingingCallTransition()
93 when(mWakeLock.isHeld()).thenReturn(false); in DONT_test_RingingCallRemoved()
96 verify(mWakeLock, never()).acquire(); in DONT_test_RingingCallRemoved()
101 when(mWakeLock.isHeld()).thenReturn(true); in DONT_test_WakeLockReleased()
104 verify(mWakeLock).release(); in DONT_test_WakeLockReleased()
/packages/apps/Settings/src/com/android/settings/
DCryptKeeper.java123 PowerManager.WakeLock mWakeLock; field in CryptKeeper
382 if (mWakeLock.isHeld()) { in notifyUser()
386 mWakeLock.release(); in notifyUser()
436 mWakeLock = retained.wakelock; in onCreate()
548 NonConfigurationInstanceState state = new NonConfigurationInstanceState(mWakeLock); in onRetainNonConfigurationInstance()
550 mWakeLock = null; in onRetainNonConfigurationInstance()
558 if (mWakeLock != null) { in onDestroy()
560 mWakeLock.release(); in onDestroy()
561 mWakeLock = null; in onDestroy()
573 if (mWakeLock == null) { in encryptionProgressInit()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/map/
DBluetoothMapService.java108 private PowerManager.WakeLock mWakeLock = null; field in BluetoothMapService
183 if (mWakeLock != null) { in closeService()
184 mWakeLock.release(); in closeService()
186 mWakeLock = null; in closeService()
219 if (mWakeLock == null) { in startObexServerSessions()
221 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, in startObexServerSessions()
223 mWakeLock.setReferenceCounted(false); in startObexServerSessions()
224 mWakeLock.acquire(); in startObexServerSessions()
308 if (mWakeLock != null && lastMasInst) { in stopObexServerSessions()
311 mWakeLock.release(); in stopObexServerSessions()
[all …]
/packages/apps/Email/provider_src/com/android/email/
DEmailConnectivityManager.java60 private final WakeLock mWakeLock; field in EmailConnectivityManager
76 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, name); in EmailConnectivityManager()
176 mWakeLock.acquire(); in waitForConnectivity()
198 mWakeLock.release(); in waitForConnectivity()
205 mWakeLock.acquire(); in waitForConnectivity()
211 if (mWakeLock.isHeld()) { in waitForConnectivity()
212 mWakeLock.release(); in waitForConnectivity()
/packages/apps/ContactsCommon/TestCommon/src/com/android/contacts/common/test/
DIntegrationTestUtils.java51 @GuardedBy("mLock") private PowerManager.WakeLock mWakeLock; field in IntegrationTestUtils
112 Preconditions.checkState(mWakeLock == null, "mWakeLock was already held");
113 mWakeLock = ((PowerManager) context.getSystemService(Context.POWER_SERVICE))
116 mWakeLock.acquire();
130 if (mWakeLock != null) {
131 mWakeLock.release();
132 mWakeLock = null;
/packages/providers/CalendarProvider/src/com/android/providers/calendar/
DCalendarReceiver.java40 private PowerManager.WakeLock mWakeLock; field in CalendarReceiver
44 if (mWakeLock == null) { in onReceive()
46 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "CalendarReceiver_Provider"); in onReceive()
47 mWakeLock.setReferenceCounted(true); in onReceive()
49 mWakeLock.acquire(); in onReceive()
61 mWakeLock.release(); in onReceive()
/packages/services/Telephony/src/com/android/phone/
DCallerInfoCache.java90 private PowerManager.WakeLock mWakeLock; field in CallerInfoCache.CacheAsyncTask
100 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, LOG_TAG); in acquireWakeLockAndExecute()
101 mWakeLock.acquire(); in acquireWakeLockAndExecute()
127 if (mWakeLock != null && mWakeLock.isHeld()) { in releaseWakeLock()
128 mWakeLock.release(); in releaseWakeLock()
DPhoneGlobals.java186 private PowerManager.WakeLock mWakeLock; field in PhoneGlobals
361 mWakeLock = mPowerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK, LOG_TAG); in onCreate()
630 if (mWakeLock.isHeld()) { in requestWakeState()
631 mWakeLock.release(); in requestWakeState()
637 mWakeLock.acquire(); in requestWakeState()
645 if (mWakeLock.isHeld()) { in requestWakeState()
646 mWakeLock.release(); in requestWakeState()
/packages/apps/Settings/src/com/android/settings/wifi/
DWriteWifiConfigToNfcDialog.java62 private final PowerManager.WakeLock mWakeLock; field in WriteWifiConfigToNfcDialog
83 mWakeLock = ((PowerManager) context.getSystemService(Context.POWER_SERVICE)) in WriteWifiConfigToNfcDialog()
95 mWakeLock = ((PowerManager) context.getSystemService(Context.POWER_SERVICE)) in WriteWifiConfigToNfcDialog()
135 mWakeLock.acquire(); in onClick()
227 if (mWakeLock.isHeld()) { in dismiss()
228 mWakeLock.release(); in dismiss()
/packages/apps/Camera2/src/com/android/camera/processing/
DProcessingService.java90 private WakeLock mWakeLock; field in ProcessingService
109 mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG.toString()); in onCreate()
110 mWakeLock.acquire(); in onCreate()
127 if (mWakeLock.isHeld()) { in onDestroy()
128 mWakeLock.release(); in onDestroy()
/packages/apps/Bluetooth/src/com/android/bluetooth/opp/
DBluetoothOppObexServerSession.java96 private WakeLock mWakeLock; field in BluetoothOppObexServerSession
106 mWakeLock = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP in BluetoothOppObexServerSession()
300 mWakeLock.acquire(); in onPut()
311 if (mWakeLock.isHeld()) { in onPut()
314 mWakeLock.release(); in onPut()
591 if (mWakeLock.isHeld()) { in releaseWakeLocks()
592 mWakeLock.release(); in releaseWakeLocks()
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
DWakeLockHoldingProgressListener.java28 private PowerManager.WakeLock mWakeLock; field in WakeLockHoldingProgressListener
38 mWakeLock = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, label); in WakeLockHoldingProgressListener()
43 mWakeLock.release(); in onProgressComplete()
48 mWakeLock.acquire(); in onProgressStart()
/packages/apps/ContactsCommon/src/com/android/contacts/common/vcard/
DImportVCardActivity.java171 private PowerManager.WakeLock mWakeLock; field in ImportVCardActivity.VCardCacheThread
183 mWakeLock = powerManager.newWakeLock( in VCardCacheThread()
191 if (mWakeLock != null && mWakeLock.isHeld()) { in finalize()
193 mWakeLock.release(); in finalize()
205 mWakeLock.acquire(); in run()
329 mWakeLock.release(); in run()
/packages/apps/DeskClock/src/com/android/deskclock/stopwatch/
DStopwatchFragment.java68 private WakeLock mWakeLock; field in StopwatchFragment
819 if (mWakeLock == null) { in acquireWakeLock()
822 mWakeLock = pm.newWakeLock( in acquireWakeLock()
824 mWakeLock.setReferenceCounted(false); in acquireWakeLock()
826 mWakeLock.acquire(); in acquireWakeLock()
830 if (mWakeLock != null && mWakeLock.isHeld()) { in releaseWakeLock()
831 mWakeLock.release(); in releaseWakeLock()
/packages/apps/Gallery2/src/com/android/gallery3d/ingest/data/
DImportTask.java56 private PowerManager.WakeLock mWakeLock; field in ImportTask
64 mWakeLock = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, WAKELOCK_LABEL); in ImportTask()
73 mWakeLock.acquire(); in run()
102 mWakeLock.release(); in run()
/packages/apps/FMRadio/src/com/android/fmradio/
DFmService.java181 private WakeLock mWakeLock = null; field in FmService
595 if (!mWakeLock.isHeld()) { in powerUp()
596 mWakeLock.acquire(); in powerUp()
634 if (!mWakeLock.isHeld()) { in playFrequency()
635 mWakeLock.acquire(); in playFrequency()
685 if (mWakeLock.isHeld()) { in powerDown()
686 mWakeLock.release(); in powerDown()
699 if (mWakeLock.isHeld()) { in powerDown()
700 mWakeLock.release(); in powerDown()
1246 mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG); in onCreate()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/
DAdapterService.java188 private PowerManager.WakeLock mWakeLock; field in AdapterService
577 if (mWakeLock != null) { in cleanup()
578 mWakeLock.release(); in cleanup()
579 mWakeLock = null; in cleanup()
2029 if (mWakeLock != null) { in acquireWakeLock()
2036 if (mWakeLock.isHeld()) { in acquireWakeLock()
2042 mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, lockName); in acquireWakeLock()
2043 mWakeLock.acquire(); in acquireWakeLock()
2053 if (mWakeLock == null) { in releaseWakeLock()
2058 mWakeLock.release(); in releaseWakeLock()
[all …]
/packages/providers/MediaProvider/src/com/android/providers/media/
DMediaScannerService.java55 private PowerManager.WakeLock mWakeLock; field in MediaScannerService
90 mWakeLock.acquire(); in scan()
114 mWakeLock.release(); in scan()
122 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG); in onCreate()
/packages/apps/Browser/src/com/android/browser/
DController.java170 private WakeLock mWakeLock; field in Controller
535 if (mWakeLock != null && mWakeLock.isHeld()) { in startHandler()
536 mWakeLock.release(); in startHandler()
646 if (mWakeLock == null) { in onPause()
649 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "Browser"); in onPause()
651 mWakeLock.acquire(); in onPause()
718 if (mWakeLock != null && mWakeLock.isHeld()) { in releaseWakeLock()
720 mWakeLock.release(); in releaseWakeLock()
/packages/apps/SoundRecorder/src/com/android/soundrecorder/
DSoundRecorder.java211 WakeLock mWakeLock; field in SoundRecorder
278 mWakeLock = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, in onCreate()
825 mWakeLock.acquire(); // we don't want to go to sleep while recording or playing in onStateChanged()
827 if (mWakeLock.isHeld()) in onStateChanged()
828 mWakeLock.release(); in onStateChanged()
/packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/
DA2dpSinkStateMachine.java80 private final WakeLock mWakeLock; field in A2dpSinkStateMachine
136 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "BluetoothA2dpSinkService"); in A2dpSinkStateMachine()
686 mWakeLock.acquire(); in broadcastConnectionState()
778 mWakeLock.release(); in handleMessage()

12