Searched refs:wakeLock (Results 1 – 3 of 3) sorted by relevance
37 @Nullable private WakeLock wakeLock; field in WakeLockManager58 if (wakeLock == null) { in setEnabled()63 wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, WAKE_LOCK_TAG); in setEnabled()64 wakeLock.setReferenceCounted(false); in setEnabled()91 if (wakeLock == null) { in updateWakeLock()96 wakeLock.acquire(); in updateWakeLock()98 wakeLock.release(); in updateWakeLock()
46 WakeLock wakeLock = ShadowPowerManager.getLatestWakeLock(); in stayAwakeFalse_wakeLockIsNeverHeld() local47 assertThat(wakeLock.isHeld()).isFalse(); in stayAwakeFalse_wakeLockIsNeverHeld()51 assertThat(wakeLock.isHeld()).isFalse(); in stayAwakeFalse_wakeLockIsNeverHeld()60 WakeLock wakeLock = ShadowPowerManager.getLatestWakeLock(); in stayAwakeTrue_wakeLockIsOnlyHeldWhenEnabled() local62 assertThat(wakeLock.isHeld()).isTrue(); in stayAwakeTrue_wakeLockIsOnlyHeldWhenEnabled()66 assertThat(wakeLock.isHeld()).isFalse(); in stayAwakeTrue_wakeLockIsOnlyHeldWhenEnabled()
88 @Nullable private WakeLock wakeLock; field in HostActivity192 wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, LOCK_TAG); in onStart()193 wakeLock.acquire(); in onStart()211 if (wakeLock != null) { in onStop()212 wakeLock.release(); in onStop()213 wakeLock = null; in onStop()