Home
last modified time | relevance | path

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

12

/packages/modules/ImsMedia/tests/unit/src/com/android/telephony/imsmedia/
DWakeLockManagerTest.java47 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(true); in testOneSession_MediaDirectionChanges()
52 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(false); in testOneSession_MediaDirectionChanges()
57 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(true); in testOneSession_MediaDirectionChanges()
62 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(false); in testOneSession_MediaDirectionChanges()
67 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(true); in testOneSession_MediaDirectionChanges()
72 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(false); in testOneSession_MediaDirectionChanges()
77 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(true); in testOneSession_MediaDirectionChanges()
82 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(false); in testOneSession_MediaDirectionChanges()
87 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(true); in testOneSession_MediaDirectionChanges()
91 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(true); in testOneSession_MediaDirectionChanges()
[all …]
DTextSessionTest.java118 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(false); in testOpenSession()
126 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(false); in testCloseSession()
136 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(true); in testModifySession()
222 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(false); in testOpenSessionSuccess()
234 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(false); in testOpenSessionFailure()
DVideoSessionTest.java132 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(false); in testOpenSession()
140 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(false); in testCloseSession()
150 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(true); in testModifySession()
311 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(false); in testOpenSessionSuccess()
323 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(false); in testOpenSessionFailure()
335 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(false); in testSessionClosed()
DAudioSessionTest.java131 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(false); in testOpenSession()
139 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(false); in testCloseSession()
149 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(true); in testModifySession()
379 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(false); in testOpenSessionSuccess()
391 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(false); in testOpenSessionFailure()
403 assertThat(mWakeLockManager.mWakeLock.isHeld()).isEqualTo(false); in testSessionClosed()
/packages/services/Telecomm/src/com/android/server/telecom/
DTelecomWakeLock.java30 private PowerManager.WakeLock mWakeLock; field in TelecomWakeLock.WakeLockAdapter
33 mWakeLock = wakeLock; in WakeLockAdapter()
37 mWakeLock.acquire(); in acquire()
41 return mWakeLock.isHeld(); in isHeld()
45 mWakeLock.release(flags); in release()
49 mWakeLock.setReferenceCounted(isReferencedCounted); in setReferenceCounted()
59 private WakeLockAdapter mWakeLock; field in TelecomWakeLock
65 mWakeLock = getWakeLockFromPowerManager(); in TelecomWakeLock()
74 mWakeLock = wakeLockAdapter; in TelecomWakeLock()
88 return mWakeLock != null && mWakeLock.isHeld(); in isHeld()
[all …]
/packages/modules/ImsMedia/service/src/com/android/telephony/imsmedia/
DWakeLockManager.java40 protected PowerManager.WakeLock mWakeLock; field in WakeLockManager
49 mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, WAKELOCK_TAG); in WakeLockManager()
52 mWakeLock.setReferenceCounted(true); in WakeLockManager()
53 Log.d(TAG, "WakeLockManager - initialized. Wakelock:" + mWakeLock.toString()); in WakeLockManager()
76 if (mWakeLock != null) { in acquireLock()
77 mWakeLock.acquire(); in acquireLock()
78 Log.d(TAG, "acquireLock. " + mWakeLock.toString()); in acquireLock()
89 if (mWakeLock != null && mWakeLock.isHeld()) { in releaseLock()
90 mWakeLock.release(); in releaseLock()
91 Log.d(TAG, "releaseLock. " + mWakeLock.toString()); in releaseLock()
[all …]
/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/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
DWakeLockStateMachine.java49 private final PowerManager.WakeLock mWakeLock; field in WakeLockStateMachine
80 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, debugTag); in WakeLockStateMachine()
82 mWakeLock.acquire(); in WakeLockStateMachine()
91 if (mWakeLock.isHeld()) { in releaseWakeLock()
92 mWakeLock.release(); in releaseWakeLock()
95 if (mWakeLock.isHeld()) { in releaseWakeLock()
110 while (mWakeLock.isHeld()) { in onQuitting()
111 mWakeLock.release(); in onQuitting()
157 mWakeLock.acquire(); in exit()
/packages/providers/CalendarProvider/src/com/android/providers/calendar/
DCalendarReceiver.java45 private PowerManager.WakeLock mWakeLock; field in CalendarReceiver
59 if (mWakeLock == null) { in onReceive()
61 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "CalendarReceiver_Provider"); in onReceive()
62 mWakeLock.setReferenceCounted(true); in onReceive()
64 mWakeLock.acquire(); in onReceive()
73 mWakeLock.release(); in onReceive()
/packages/apps/Contacts/tests/src/com/android/contacts/test/
DIntegrationTestUtils.java47 @GuardedBy("mLock") private PowerManager.WakeLock mWakeLock; field in IntegrationTestUtils
108 Preconditions.checkState(mWakeLock == null, "mWakeLock was already held");
109 mWakeLock = ((PowerManager) context.getSystemService(Context.POWER_SERVICE))
112 mWakeLock.acquire();
126 if (mWakeLock != null) {
127 mWakeLock.release();
128 mWakeLock = null;
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/
DIkeLocalRequestScheduler.java153 private WakeLock mWakeLock; field in IkeLocalRequestScheduler.LocalRequest
182 if (mWakeLock != null && mWakeLock.isHeld()) { in acquireWakeLock()
187 mWakeLock = in acquireWakeLock()
191 mWakeLock.setReferenceCounted(false); in acquireWakeLock()
192 mWakeLock.acquire(); in acquireWakeLock()
197 if (mWakeLock != null) { in releaseWakeLock()
198 mWakeLock.release(); in releaseWakeLock()
199 mWakeLock = null; in releaseWakeLock()
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/sap/
DSapService.java85 private PowerManager.WakeLock mWakeLock = null; field in SapService
257 if (mWakeLock != null) { in closeService()
260 mWakeLock.release(); in closeService()
261 mWakeLock = null; in closeService()
273 if (mWakeLock == null) { in startSapServerSession()
275 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "StartingSapTransaction"); in startSapServerSession()
276 mWakeLock.setReferenceCounted(false); in startSapServerSession()
277 mWakeLock.acquire(); in startSapServerSession()
312 if (mWakeLock != null) { in stopSapServerSession()
313 mWakeLock.release(); in stopSapServerSession()
[all …]
/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/DocumentsUI/src/com/android/documentsui/services/
DFileOperationService.java137 private PowerManager.WakeLock mWakeLock; // the wake lock, if held. field in FileOperationService
237 if (mWakeLock == null) { in handleOperation()
238 mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG); in handleOperation()
263 mWakeLock.acquire(); in handleOperation()
324 mWakeLock.release(); in deleteJob()
325 if (!mWakeLock.isHeld()) { in deleteJob()
326 mWakeLock = null; in deleteJob()
345 assert(mWakeLock == null); in shutdown()
361 return mWakeLock != null && mWakeLock.isHeld(); in holdsWakeLock()
/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/
DNoWakeLockPermissionTest.java38 private PowerManager.WakeLock mWakeLock; field in NoWakeLockPermissionTest
44 mWakeLock = mPowerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK, "tag"); in setUp()
97 mWakeLock.acquire(); in testPowerManagerWakeLockAcquire()
113 mWakeLock.acquire(1); in testPowerManagerWakeLockAcquire2()
/packages/apps/Test/connectivity/PMC/src/com/android/pmc/
DWifiConnScanReceiver.java24 private PowerManager.WakeLock mWakeLock; field in WifiConnScanReceiver
50 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "WIFITEST"); in onReceive()
52 mWakeLock.acquire(); in onReceive()
118 mWakeLock.release(); in onCancelled()
135 mWakeLock.release(); in onPostExecute()
DWifiGScanReceiver.java27 private PowerManager.WakeLock mWakeLock; field in WifiGScanReceiver
57 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "WIFITEST"); in onReceive()
59 mWakeLock.acquire(); in onReceive()
124 mWakeLock.release(); in onCancelled()
140 mWakeLock.release(); in onPostExecute()
DWifiDownloadReceiver.java29 private PowerManager.WakeLock mWakeLock; field in WifiDownloadReceiver
58 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "WIFITEST"); in onReceive()
60 mWakeLock.acquire(); in onReceive()
141 mWakeLock.release(); in onCancelled()
158 mWakeLock.release(); in onPostExecute()
DPMCMainActivity.java81 private PowerManager.WakeLock mWakeLock; field in PMCMainActivity
340 if (mWakeLock == null) { in turnScreenOn()
342 mWakeLock = pm.newWakeLock( in turnScreenOn()
345 if (mWakeLock != null && !mWakeLock.isHeld()) { in turnScreenOn()
347 mWakeLock.acquire(); in turnScreenOn()
352 if (mWakeLock != null && mWakeLock.isHeld()) { in turnScreenOff()
354 mWakeLock.release(); in turnScreenOff()
DIperfClient.java42 private PowerManager.WakeLock mWakeLock; field in IperfClient
84 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "WIFITEST"); in startClient()
86 mWakeLock.acquire(); in startClient()
109 mWakeLock.release(); in stopClient()
/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/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/modules/Bluetooth/android/app/src/com/android/bluetooth/pbap/
DBluetoothPbapService.java127 private PowerManager.WakeLock mWakeLock; field in BluetoothPbapService
340 if (mWakeLock != null) { in closeService()
341 mWakeLock.release(); in closeService()
342 mWakeLock = null; in closeService()
527 if (mWakeLock == null) { in handleMessage()
529 mWakeLock = in handleMessage()
533 mWakeLock.setReferenceCounted(false); in handleMessage()
534 mWakeLock.acquire(); in handleMessage()
549 if (mWakeLock != null) { in handleMessage()
550 mWakeLock.release(); in handleMessage()
[all …]
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/map/
DBluetoothMapService.java111 private PowerManager.WakeLock mWakeLock = null; field in BluetoothMapService
185 if (mWakeLock != null) { in closeService()
186 mWakeLock.release(); in closeService()
188 mWakeLock = null; in closeService()
236 if (mWakeLock == null) { in startObexServerSessions()
238 mWakeLock = in startObexServerSessions()
240 mWakeLock.setReferenceCounted(false); in startObexServerSessions()
241 mWakeLock.acquire(); in startObexServerSessions()
343 if (mWakeLock != null && lastMasInst) { in stopObexServerSessions()
346 mWakeLock.release(); in stopObexServerSessions()
[all …]

12