Home
last modified time | relevance | path

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

123

/frameworks/opt/net/voip/src/java/com/android/server/sip/
DSipWakeLock.java28 private PowerManager.WakeLock mWakeLock; field in SipWakeLock
53 if (mWakeLock == null) { in acquire()
54 mWakeLock = mPowerManager.newWakeLock( in acquire()
57 if (!mWakeLock.isHeld()) mWakeLock.acquire(); in acquire()
63 if ((mWakeLock != null) && mHolders.isEmpty() in release()
64 && mWakeLock.isHeld()) { in release()
65 mWakeLock.release(); in release()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DWakeLockStateMachine.java43 private final PowerManager.WakeLock mWakeLock; field in WakeLockStateMachine
77 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, debugTag); in WakeLockStateMachine()
78 mWakeLock.acquire(); // wake lock released after we enter idle state in WakeLockStateMachine()
96 while (mWakeLock.isHeld()) { in onQuitting()
97 mWakeLock.release(); in onQuitting()
143 mWakeLock.acquire(); in exit()
158 mWakeLock.release(); in processMessage()
160 if (mWakeLock.isHeld()) { in processMessage()
194 mWakeLock.release(); // decrement wakelock from previous entry to Idle in processMessage()
195 if (!mWakeLock.isHeld()) { in processMessage()
DSmsStorageMonitor.java55 private PowerManager.WakeLock mWakeLock; field in SmsStorageMonitor
137 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "SmsStorageMonitor"); in createWakelock()
138 mWakeLock.setReferenceCounted(true); in createWakelock()
149 mWakeLock.acquire(WAKE_LOCK_TIMEOUT); in handleIccFull()
DOldNitzStateMachine.java91 private final PowerManager.WakeLock mWakeLock; field in OldNitzStateMachine
109 mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, WAKELOCK_TAG); in OldNitzStateMachine()
326 mWakeLock.acquire(); in updateTimeFromNitz()
389 mWakeLock.release(); in updateTimeFromNitz()
411 if (!mWakeLock.isHeld()) { in setAndBroadcastNetworkSetTime()
433 mWakeLock.acquire(); in handleAutoTimeEnabled()
443 mWakeLock.release(); in handleAutoTimeEnabled()
472 pw.println(" mWakeLock=" + mWakeLock); in dumpState()
/frameworks/base/services/core/java/com/android/server/timedetector/
DTimeDetectorStrategyCallbackImpl.java51 @NonNull private final PowerManager.WakeLock mWakeLock; field in TimeDetectorStrategyCallbackImpl
59 mWakeLock = Objects.requireNonNull( in TimeDetectorStrategyCallbackImpl()
85 if (mWakeLock.isHeld()) { in acquireWakeLock()
86 Slog.wtf(TAG, "WakeLock " + mWakeLock + " already held"); in acquireWakeLock()
88 mWakeLock.acquire(); in acquireWakeLock()
112 mWakeLock.release(); in releaseWakeLock()
121 if (!mWakeLock.isHeld()) { in checkWakeLockHeld()
122 Slog.wtf(TAG, "WakeLock " + mWakeLock + " not held"); in checkWakeLockHeld()
/frameworks/av/media/libmediaplayer2/nuplayer2/
DJWakeLock.cpp29 mWakeLock(NULL), in JWakeLock()
38 if (mWakeLock == NULL) { in acquire()
56 mWakeLock = new JObjectHolder(javaWakeLock); in acquire()
60 if (mWakeLock != NULL) { in acquire()
64 env->CallVoidMethod(mWakeLock->getJObject(), jAcquire); in acquire()
84 if (mWakeLock != NULL) { in release()
88 env->CallVoidMethod(mWakeLock->getJObject(), jRelease); in release()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/util/wakelock/
DWakeLockTest.java39 WakeLock mWakeLock; field in WakeLockTest
45 mWakeLock = WakeLock.wrap(mInner, 20000); in setUp()
61 mWakeLock.acquire(WHY); in wakeLock_acquire()
67 mWakeLock.acquire(WHY); in wakeLock_release()
68 mWakeLock.release(WHY); in wakeLock_release()
76 Runnable wrapped = mWakeLock.wrap(() -> { in wakeLock_wrap()
DKeepAwakeAnimationListenerTest.java43 @Mock WakeLock mWakeLock; field in KeepAwakeAnimationListenerTest
50 KeepAwakeAnimationListener.sWakeLock = mWakeLock; in setup()
57 verify(mWakeLock).acquire(anyString()); in onAnimationStart_holdsWakeLock()
58 verify(mWakeLock, never()).release(anyString()); in onAnimationStart_holdsWakeLock()
61 verify(mWakeLock).release(anyString()); in onAnimationStart_holdsWakeLock()
/frameworks/base/media/java/android/media/
DAsyncPlayer.java134 private PowerManager.WakeLock mWakeLock; field in AsyncPlayer
254 if (mWakeLock != null || mThread != null) { in setUsesWakeLock()
257 throw new RuntimeException("assertion failed mWakeLock=" + mWakeLock in setUsesWakeLock()
261 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, mTag); in setUsesWakeLock()
265 if (mWakeLock != null) { in acquireWakeLock()
266 mWakeLock.acquire(); in acquireWakeLock()
271 if (mWakeLock != null) { in releaseWakeLock()
272 mWakeLock.release(); in releaseWakeLock()
/frameworks/base/services/core/java/com/android/server/hdmi/
DHdmiCecLocalDevicePlayback.java58 private ActiveWakeLock mWakeLock; field in HdmiCecLocalDevicePlayback
200 if (mWakeLock == null) { in getWakeLock()
202 mWakeLock = new SystemWakeLock(); in getWakeLock()
206 mWakeLock = new ActiveWakeLock() { in getWakeLock()
217 return mWakeLock; in getWakeLock()
378 private final WakeLock mWakeLock; field in HdmiCecLocalDevicePlayback.SystemWakeLock
380 mWakeLock = mService.getPowerManager().newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG); in SystemWakeLock()
381 mWakeLock.setReferenceCounted(false); in SystemWakeLock()
386 mWakeLock.acquire(); in acquire()
392 mWakeLock.release(); in release()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/
DDozeScreenState.java53 private SettableWakeLock mWakeLock; field in DozeScreenState
60 mWakeLock = new SettableWakeLock(wakeLock, TAG); in DozeScreenState()
73 mWakeLock.setAcquired(false); in transitionTo()
97 mWakeLock.setAcquired(true); in transitionTo()
129 mWakeLock.setAcquired(false); in applyScreenState()
DDozeMachine.java119 private final WakeLock mWakeLock; field in DozeMachine
132 mWakeLock = wakeLock; in DozeMachine()
176 mWakeLock.acquire(REASON_CHANGE_STATE); in requestState()
183 mWakeLock.release(REASON_CHANGE_STATE); in requestState()
325 mWakeLock.release(REASON_HELD_FOR_STATE); in updateWakeLockState()
328 mWakeLock.acquire(REASON_HELD_FOR_STATE); in updateWakeLockState()
350 pw.print(" wakeLock="); pw.println(mWakeLock); in dump()
DDozeUi.java46 private final WakeLock mWakeLock; field in DozeUi
70 mWakeLock = wakeLock; in DozeUi()
124 mHandler.postDelayed(mWakeLock.wrap(mHost::dozeTimeTick), 500); in transitionTo()
214 mHandler.post(mWakeLock.wrap(() -> {})); in onTimeTick()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/
DDozeScreenStateTest.java61 WakeLockFake mWakeLock; field in DozeScreenStateTest
70 mWakeLock = new WakeLockFake(); in setUp()
71 mScreen = new DozeScreenState(mServiceFake, mHandlerFake, mDozeParameters, mWakeLock); in setUp()
163 assertThat(mWakeLock.isHeld(), is(true)); in test_holdsWakeLockWhenGoingToLowPowerDelayed()
166 assertThat(mWakeLock.isHeld(), is(false)); in test_holdsWakeLockWhenGoingToLowPowerDelayed()
180 assertThat(mWakeLock.isHeld(), is(true)); in test_releasesWakeLock_abortingLowPowerDelayed()
183 assertThat(mWakeLock.isHeld(), is(false)); in test_releasesWakeLock_abortingLowPowerDelayed()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/
DScrimControllerTest.java76 private WakeLock mWakeLock; field in ScrimControllerTest
86 mWakeLock = mock(WakeLock.class); in setup()
451 verify(mWakeLock).acquire(anyString()); in testHoldsWakeLock_whenAOD()
452 verify(mWakeLock, never()).release(anyString()); in testHoldsWakeLock_whenAOD()
454 verify(mWakeLock).release(anyString()); in testHoldsWakeLock_whenAOD()
461 verifyZeroInteractions(mWakeLock); in testDoesNotHoldWakeLock_whenUnlocking()
478 reset(mWakeLock); in testHoldsAodWallpaperAnimationLock()
481 verify(mWakeLock).acquire(anyString()); in testHoldsAodWallpaperAnimationLock()
482 verify(mWakeLock, never()).release(anyString()); in testHoldsAodWallpaperAnimationLock()
484 verify(mWakeLock).release(anyString()); in testHoldsAodWallpaperAnimationLock()
[all …]
/frameworks/base/services/core/java/com/android/server/location/
DNtpTimeHelper.java57 private final WakeLock mWakeLock; field in NtpTimeHelper
84 mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, WAKELOCK_KEY); in NtpTimeHelper()
123 mWakeLock.acquire(WAKELOCK_TIMEOUT_MILLIS); in retrieveAndInjectNtpTime()
186 mWakeLock.release(); in blockingGetNtpTimeAndInject()
/frameworks/base/services/core/java/com/android/server/
DConsumerIrService.java37 private final PowerManager.WakeLock mWakeLock; field in ConsumerIrService
45 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG); in ConsumerIrService()
46 mWakeLock.setReferenceCounted(true); in ConsumerIrService()
DAnyMotionDetector.java87 private PowerManager.WakeLock mWakeLock; field in AnyMotionDetector
122 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG); in AnyMotionDetector()
123 mWakeLock.setReferenceCounted(false); in AnyMotionDetector()
163 mWakeLock.acquire(); in checkForAnyMotion()
188 if (mWakeLock.isHeld()) { in stop()
191 mWakeLock.release(); in stop()
238 if (mWakeLock.isHeld()) { in stopOrientationMeasurementLocked()
241 mWakeLock.release(); in stopOrientationMeasurementLocked()
DNativeDaemonConnector.java68 private final PowerManager.WakeLock mWakeLock; field in NativeDaemonConnector
97 mWakeLock = wl; in NativeDaemonConnector()
98 if (mWakeLock != null) { in NativeDaemonConnector()
99 mWakeLock.setReferenceCounted(true); in NativeDaemonConnector()
166 if (mCallbacks.onCheckHoldWakeLock(msg.what) && mWakeLock != null) { in handleMessage()
167 mWakeLock.release(); in handleMessage()
241 && mWakeLock != null) { in listenToSocket()
242 mWakeLock.acquire(); in listenToSocket()
257 mWakeLock.release(); in listenToSocket()
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/
DNotificationPlayer.java335 private PowerManager.WakeLock mWakeLock; field in NotificationPlayer
463 if (mWakeLock != null || mThread != null) { in setUsesWakeLock()
466 throw new RuntimeException("assertion failed mWakeLock=" + mWakeLock in setUsesWakeLock()
470 mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, mTag); in setUsesWakeLock()
476 if (mWakeLock != null) { in acquireWakeLock()
477 mWakeLock.acquire(); in acquireWakeLock()
483 if (mWakeLock != null) { in releaseWakeLock()
484 mWakeLock.release(); in releaseWakeLock()
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/
DMediaFrameworkTest.java69 private PowerManager.WakeLock mWakeLock = null; field in MediaFrameworkTest
97 mWakeLock = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK, "MediaFrameworkTest"); in onCreate()
98 mWakeLock.acquire(); in onCreate()
104 mWakeLock.release(); in onDestroy()
/frameworks/av/media/libmediaplayerservice/nuplayer/
DAWakeLock.h46 explicit PMDeathRecipient(AWakeLock *wakeLock) : mWakeLock(wakeLock) {} in PMDeathRecipient()
56 AWakeLock *mWakeLock; variable
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DBiometricUnlockController.java119 private PowerManager.WakeLock mWakeLock; field in BiometricUnlockController
211 if (mWakeLock != null) { in releaseBiometricWakeLock()
216 mWakeLock.release(); in releaseBiometricWakeLock()
217 mWakeLock = null; in releaseBiometricWakeLock()
233 mWakeLock = mPowerManager.newWakeLock( in onBiometricAcquired()
236 mWakeLock.acquire(); in onBiometricAcquired()
499 pw.print(" mWakeLock="); pw.println(mWakeLock); in dump()
/frameworks/base/services/core/java/com/android/server/dreams/
DDreamController.java291 public PowerManager.WakeLock mWakeLock; field in DreamController.DreamRecord
306 mWakeLock = wakeLock; in DreamRecord()
309 mWakeLock.acquire(); in DreamRecord()
359 if (mWakeLock != null) { in releaseWakeLockIfNeeded()
360 mWakeLock.release(); in releaseWakeLockIfNeeded()
361 mWakeLock = null; in releaseWakeLockIfNeeded()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/
DKeyguardIndicationControllerTest.java98 private WakeLockFake mWakeLock; field in KeyguardIndicationControllerTest
117 mWakeLock = new WakeLockFake(); in setUp()
125 mLockPatternUtils, mWakeLock, mShadeController, mAccessibilityController, in createController()
202 assertTrue(mWakeLock.isHeld()); in transientIndication_holdsWakeLock_whenDozing()
213 assertFalse(mWakeLock.isHeld()); in transientIndication_releasesWakeLock_afterHiding()
229 held[0] = mWakeLock.isHeld(); in transientIndication_releasesWakeLock_afterHidingDelayed()

123