Searched refs:powerManager (Results 1 – 4 of 4) sorted by relevance
26 private PowerManager powerManager; field in ShadowPowerManagerTest32 powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in before()33 shadowPowerManager = shadowOf(powerManager); in before()38 PowerManager.WakeLock lock = powerManager.newWakeLock(0, "TAG"); in acquire_shouldAcquireAndReleaseReferenceCountedLock()55 assertThat(powerManager.isWakeLockLevelSupported(PowerManager.PARTIAL_WAKE_LOCK)).isFalse(); in isWakeLockLevelSupported()59 assertThat(powerManager.isWakeLockLevelSupported(PowerManager.PARTIAL_WAKE_LOCK)).isTrue(); in isWakeLockLevelSupported()63 assertThat(powerManager.isWakeLockLevelSupported(PowerManager.PARTIAL_WAKE_LOCK)).isFalse(); in isWakeLockLevelSupported()71 PowerManager.WakeLock lock = powerManager.newWakeLock(0, "TAG"); in acquire_shouldLogLatestWakeLock()90 assertThat(powerManager.newWakeLock(0, "TAG")).isNotNull(); in newWakeLock_shouldCreateWakeLock()95 PowerManager.WakeLock lock = powerManager.newWakeLock(0, "TAG"); in newWakeLock_shouldAcquireAndReleaseNonReferenceCountedLock()[all …]
36 @Nullable private final PowerManager powerManager; field in WakeLockManager42 powerManager = in WakeLockManager()59 if (powerManager == null) { in setEnabled()63 wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, WAKE_LOCK_TAG); in setEnabled()
159 PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in isDeviceIdle() local161 ? powerManager.isDeviceIdleMode() in isDeviceIdle()162 : Util.SDK_INT >= 20 ? !powerManager.isInteractive() : !powerManager.isScreenOn(); in isDeviceIdle()
189 PowerManager powerManager = in onStart() local192 wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, LOCK_TAG); in onStart()