/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/controllers/ |
D | TimeControllerTest.java | 79 private AlarmManager mAlarmManager; field in TimeControllerTest 99 when(mContext.getSystemService(Context.ALARM_SERVICE)).thenReturn(mAlarmManager); in setUp() 157 verify(mAlarmManager, never()) in testMaybeStartTrackingJobLocked_AlreadySatisfied() 178 InOrder inOrder = inOrder(mAlarmManager); in runTestMaybeStartTrackingJobLocked_DelayInOrder() 181 inOrder.verify(mAlarmManager, times(1)) in runTestMaybeStartTrackingJobLocked_DelayInOrder() 185 inOrder.verify(mAlarmManager, never()) in runTestMaybeStartTrackingJobLocked_DelayInOrder() 188 inOrder.verify(mAlarmManager, never()) in runTestMaybeStartTrackingJobLocked_DelayInOrder() 210 InOrder inOrder = inOrder(mAlarmManager); in testMaybeStartTrackingJobLocked_DelayInOrder_SomeNotReady() 213 inOrder.verify(mAlarmManager, times(1)) in testMaybeStartTrackingJobLocked_DelayInOrder_SomeNotReady() 217 inOrder.verify(mAlarmManager, never()) in testMaybeStartTrackingJobLocked_DelayInOrder_SomeNotReady() [all …]
|
D | QuotaControllerTest.java | 120 private AlarmManager mAlarmManager; field in QuotaControllerTest 151 when(mContext.getSystemService(Context.ALARM_SERVICE)).thenReturn(mAlarmManager); in setUp() 1445 verify(mAlarmManager, never()).set(anyInt(), anyLong(), eq(TAG_CLEANUP), any(), any()); in testMaybeScheduleCleanupAlarmLocked() 1453 verify(mAlarmManager, times(1)) in testMaybeScheduleCleanupAlarmLocked() 1462 verify(mAlarmManager, times(1)) in testMaybeScheduleCleanupAlarmLocked() 1480 verify(mAlarmManager, never()).set(anyInt(), anyLong(), eq(TAG_QUOTA_CHECK), any(), any()); in testMaybeScheduleStartAlarmLocked_Active() 1494 verify(mAlarmManager, never()).set(anyInt(), anyLong(), eq(TAG_QUOTA_CHECK), any(), any()); in testMaybeScheduleStartAlarmLocked_Active() 1500 verify(mAlarmManager, never()).set(anyInt(), anyLong(), eq(TAG_QUOTA_CHECK), any(), any()); in testMaybeScheduleStartAlarmLocked_Active() 1513 verify(mAlarmManager, times(1)).set(anyInt(), eq(expectedAlarmTime), eq(TAG_QUOTA_CHECK), in testMaybeScheduleStartAlarmLocked_Active() 1529 verify(mAlarmManager, never()).set(anyInt(), anyLong(), eq(TAG_QUOTA_CHECK), any(), any()); in testMaybeScheduleStartAlarmLocked_WorkingSet() [all …]
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/scanner/ |
D | WificondScannerTest.java | 111 verify(mAlarmManager.getAlarmManager(), never()).cancel(any(PendingIntent.class)); in externalScanResultsDoNotCauseSpuriousTimerCancellationOrCrash() 112 verify(mAlarmManager.getAlarmManager(), never()) in externalScanResultsDoNotCauseSpuriousTimerCancellationOrCrash() 114 verify(mAlarmManager.getAlarmManager(), never()).cancel(isNull(PendingIntent.class)); in externalScanResultsDoNotCauseSpuriousTimerCancellationOrCrash() 115 verify(mAlarmManager.getAlarmManager(), never()) in externalScanResultsDoNotCauseSpuriousTimerCancellationOrCrash() 136 verify(mAlarmManager.getAlarmManager(), never()).cancel(any(PendingIntent.class)); in externalScanResultsAfterOurScanDoNotCauseSpuriousTimerCancellationOrCrash() 137 verify(mAlarmManager.getAlarmManager(), times(1)) in externalScanResultsAfterOurScanDoNotCauseSpuriousTimerCancellationOrCrash() 139 verify(mAlarmManager.getAlarmManager(), never()).cancel(isNull(PendingIntent.class)); in externalScanResultsAfterOurScanDoNotCauseSpuriousTimerCancellationOrCrash() 140 verify(mAlarmManager.getAlarmManager(), never()) in externalScanResultsAfterOurScanDoNotCauseSpuriousTimerCancellationOrCrash() 160 mAlarmManager.dispatch(WificondScannerImpl.TIMEOUT_ALARM_TAG); in lateScanResultsDoNotCauseSpuriousTimerCancellationOrCrash() 167 verify(mAlarmManager.getAlarmManager(), never()).cancel(any(PendingIntent.class)); in lateScanResultsDoNotCauseSpuriousTimerCancellationOrCrash() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/ |
D | AlarmTimeout.java | 33 private final AlarmManager mAlarmManager; field in AlarmTimeout 41 mAlarmManager = alarmManager; in AlarmTimeout() 76 mAlarmManager.setExact(AlarmManager.ELAPSED_REALTIME_WAKEUP, in schedule() 88 mAlarmManager.cancel(this); in cancel()
|
/frameworks/base/core/java/com/android/internal/util/ |
D | WakeupMessage.java | 40 private final AlarmManager mAlarmManager; field in WakeupMessage 55 mAlarmManager = getAlarmManager(context); in WakeupMessage() 79 mAlarmManager = getAlarmManager(context); in WakeupMessage() 100 mAlarmManager.setExact( in schedule() 111 mAlarmManager.cancel(this); in cancel()
|
/frameworks/base/tests/utils/testutils/java/android/app/test/ |
D | TestAlarmManager.java | 44 private final AlarmManager mAlarmManager; field in TestAlarmManager 50 mAlarmManager = mock(AlarmManager.class); in TestAlarmManager() 51 doAnswer(new SetListenerAnswer()).when(mAlarmManager).set(anyInt(), anyLong(), anyString(), in TestAlarmManager() 53 doAnswer(new SetListenerAnswer()).when(mAlarmManager).setExact(anyInt(), anyLong(), in TestAlarmManager() 56 .when(mAlarmManager).cancel(any(AlarmManager.OnAlarmListener.class)); in TestAlarmManager() 60 return mAlarmManager; in getAlarmManager()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/ |
D | LockSettingsStrongAuthTest.java | 72 private AlarmManager mAlarmManager; field in LockSettingsStrongAuthTest 80 when(mInjector.getAlarmManager(mContext)).thenReturn(mAlarmManager); in setUp() 151 verify(mAlarmManager).cancel(any(NonStrongBiometricIdleTimeoutAlarmListener.class)); in testReportSuccessfulBiometricUnlock_nonStrongBiometric_cancelIdleTimeout() 202 verify(mAlarmManager).cancel(alarm); in testReportSuccessfulStrongAuthUnlock_testRefreshStrongAuthTimeout() 227 verify(mAlarmManager, never()).cancel(any(NonStrongBiometricTimeoutAlarmListener.class)); in testFallbackTimeout_convenienceBiometric_weakBiometric() 232 verify(mAlarmManager).set( in verifyAlarm() 260 verify(mAlarmManager).cancel(any(NonStrongBiometricTimeoutAlarmListener.class)); in verifyAlarmsCancelledAndNonStrongBiometricAllowed() 264 verify(mAlarmManager).cancel(any(NonStrongBiometricIdleTimeoutAlarmListener.class)); in verifyAlarmsCancelledAndNonStrongBiometricAllowed()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | WifiHealthMonitorTest.java | 114 private TestAlarmManager mAlarmManager; field in WifiHealthMonitorTest 164 mAlarmManager = new TestAlarmManager(); in setUp() 166 .thenReturn(mAlarmManager.getAlarmManager()); in setUp() 329 mAlarmManager.dispatch(WifiHealthMonitor.POST_BOOT_DETECTION_TIMER_TAG); in makeSerializedExample() 371 mAlarmManager.dispatch(WifiHealthMonitor.POST_BOOT_DETECTION_TIMER_TAG); in testReadWriteAndSWChange() 405 mAlarmManager.dispatch(WifiHealthMonitor.POST_BOOT_DETECTION_TIMER_TAG); in testSerializationDeserialization() 439 long waitTimeMs = mAlarmManager in testTimerMultiDayRun() 445 mAlarmManager.dispatch(WifiHealthMonitor.DAILY_DETECTION_TIMER_TAG); in testTimerMultiDayRun() 447 waitTimeMs = mAlarmManager in testTimerMultiDayRun() 454 mAlarmManager.dispatch(WifiHealthMonitor.DAILY_DETECTION_TIMER_TAG); in testTimerMultiDayRun() [all …]
|
D | WifiNetworkFactoryTest.java | 123 @Mock AlarmManager mAlarmManager; field in WifiNetworkFactoryTest 199 mNetworkCapabilities, mActivityManager, mAlarmManager, mAppOpsManager, in setUp() 643 verify(mAlarmManager).cancel(any(OnAlarmListener.class)); in testPeriodicScanCancelOnReleaseNetworkRequestWithSpecifier() 671 verify(mAlarmManager).cancel(mPeriodicScanListenerArgumentCaptor.getValue()); in testPeriodicScanCancelOnUserSelectNetwork() 1117 verify(mAlarmManager).cancel(any(OnAlarmListener.class)); in testNetworkSpecifierHandleUserSelectionConnectToNetwork() 1222 verify(mAlarmManager).cancel(any(OnAlarmListener.class)); in testNetworkSpecifierHandleUserSelectionConnectToExistingSavedNetwork() 1351 verify(mAlarmManager).cancel(any(OnAlarmListener.class)); in testNetworkSpecifierHandleUserSelectionReject() 1376 mInOrder = inOrder(mAlarmManager, mClientModeImpl); in testNetworkSpecifierHandleConnectionTimeout() 1404 mInOrder = inOrder(mAlarmManager, mClientModeImpl); in testNetworkSpecifierHandleConnectionTriggerFailure() 1413 mInOrder.verify(mAlarmManager).cancel( in testNetworkSpecifierHandleConnectionTriggerFailure() [all …]
|
D | WifiConnectivityManagerTest.java | 99 mAlarmManager = new TestAlarmManager(); in setUp() 180 private TestAlarmManager mAlarmManager; field in WifiConnectivityManagerTest 259 mAlarmManager.getAlarmManager()); in mockContext() 744 mAlarmManager.dispatch(WifiConnectivityManager.WATCHDOG_TIMER_TAG); in watchdogBitePnoBadIncrementsMetrics() 770 mAlarmManager.dispatch(WifiConnectivityManager.WATCHDOG_TIMER_TAG); in watchdogBitePnoGoodIncrementsMetrics() 848 mAlarmManager.dispatch(WifiConnectivityManager.DELAYED_PARTIAL_SCAN_TIMER_TAG); in testHighMovementTriggerPartialScan() 1173 long firstIntervalMs = mAlarmManager in checkWorkingWithDefaultSchedule() 1182 mAlarmManager.dispatch(WifiConnectivityManager.PERIODIC_SCAN_TIMER_TAG); in checkWorkingWithDefaultSchedule() 1186 long secondIntervalMs = mAlarmManager in checkWorkingWithDefaultSchedule() 1199 mAlarmManager.dispatch(WifiConnectivityManager.PERIODIC_SCAN_TIMER_TAG); in checkWorkingWithDefaultSchedule() [all …]
|
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/ |
D | WakeupMessageTest.java | 51 @Mock AlarmManager mAlarmManager; field in WakeupMessageTest 90 when(mContext.getSystemService(Context.ALARM_SERVICE)).thenReturn(mAlarmManager); in setUp() 92 doNothing().when(mAlarmManager).setExact(anyInt(), anyLong(), any(String.class), in setUp() 109 verify(mAlarmManager).setExact(eq(AlarmManager.ELAPSED_REALTIME_WAKEUP), eq(when), in scheduleAndVerifyAlarm() 180 verify(mAlarmManager).setExact(eq(AlarmManager.ELAPSED_REALTIME_WAKEUP), eq(when), in scheduleRunnable()
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/utils/quota/ |
D | CountQuotaTrackerTest.java | 103 private AlarmManager mAlarmManager; field in CountQuotaTrackerTest 148 when(mContext.getSystemService(AlarmManager.class)).thenReturn(mAlarmManager); in setUp() 560 verify(mAlarmManager, never()).set(anyInt(), anyLong(), eq(TAG_CLEANUP), any(), any()); in testMaybeScheduleCleanupAlarmLocked() 566 verify(mAlarmManager, timeout(1000).times(1)) in testMaybeScheduleCleanupAlarmLocked() 573 verify(mAlarmManager, times(1)) in testMaybeScheduleCleanupAlarmLocked() 591 verify(mAlarmManager, never()).set(anyInt(), anyLong(), eq(TAG_QUOTA_CHECK), any(), any()); in testMaybeScheduleStartAlarmLocked() 597 verify(mAlarmManager, never()).set(anyInt(), anyLong(), eq(TAG_QUOTA_CHECK), any(), any()); in testMaybeScheduleStartAlarmLocked() 604 verify(mAlarmManager, never()).set(anyInt(), anyLong(), eq(TAG_QUOTA_CHECK), any(), any()); in testMaybeScheduleStartAlarmLocked() 610 verify(mAlarmManager, never()).set(anyInt(), anyLong(), eq(TAG_QUOTA_CHECK), any(), any()); in testMaybeScheduleStartAlarmLocked() 615 verify(mAlarmManager, timeout(1000).times(1)) in testMaybeScheduleStartAlarmLocked() [all …]
|
/frameworks/base/tests/DozeTest/src/com/android/dreams/dozetest/ |
D | DozeTestDream.java | 58 private AlarmManager mAlarmManager; field in DozeTestDream 78 mAlarmManager = (AlarmManager)getSystemService(Context.ALARM_SERVICE); in onCreate() 149 mAlarmManager.setExact(AlarmManager.RTC_WAKEUP, now + 60000, mAlarmIntent); in performTimeUpdate() 172 mAlarmManager.cancel(mAlarmIntent); in cancelTimeUpdate()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/ |
D | DozeUiTest.java | 59 private AlarmManager mAlarmManager; field in DozeUiTest 84 mDozeUi = new DozeUi(mContext, mAlarmManager, mMachine, mWakeLock, mHost, mHandler, in setUp() 101 clearInvocations(mAlarmManager); in pausingAndUnpausingAod_registersTimeTickAfterUnpausing() 105 verify(mAlarmManager).setExact(anyInt(), anyLong(), eq("doze_time_tick"), any(), any()); in pausingAndUnpausingAod_registersTimeTickAfterUnpausing() 139 mDozeUi = new DozeUi(mContext, mAlarmManager, mMachine, mWakeLock, mHost, mHandler, in neverAnimateScreenOff_whenNotSupported()
|
/frameworks/base/services/core/java/com/android/server/timedetector/ |
D | TimeDetectorStrategyCallbackImpl.java | 50 @NonNull private final AlarmManager mAlarmManager; field in TimeDetectorStrategyCallbackImpl 60 mAlarmManager = Objects.requireNonNull(context.getSystemService(AlarmManager.class)); in TimeDetectorStrategyCallbackImpl() 102 mAlarmManager.setTime(newTimeMillis); in setSystemClock()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
D | NextAlarmControllerImpl.java | 42 private AlarmManager mAlarmManager; field in NextAlarmControllerImpl 49 mAlarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); in NextAlarmControllerImpl() 80 mNextAlarm = mAlarmManager.getNextAlarmClock(UserHandle.USER_CURRENT); in updateNextAlarm()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/ |
D | DozeFactory.java | 52 private final AlarmManager mAlarmManager; field in DozeFactory 80 mAlarmManager = alarmManager; in DozeFactory() 110 new DozePauser(mHandler, machine, mAlarmManager, mDozeParameters.getPolicy()), in assembleMachine() 113 mAlarmManager, config, mDozeParameters, wakeLock, in assembleMachine() 116 mAlarmManager, mDozeParameters, mDozeLog), in assembleMachine()
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/ |
D | DeviceIdleControllerTest.java | 123 private AlarmManager mAlarmManager; field in DeviceIdleControllerTest 157 return mAlarmManager; in getAlarmManager() 315 doNothing().when(mAlarmManager).set(anyInt(), anyLong(), anyString(), any(), any()); in setUp() 572 .when(mAlarmManager).getNextWakeFromIdleTime(); in testStateActiveToStateInactive_UpcomingAlarm() 1587 reset(mAlarmManager); in testExitNotifiesDependencies_WaitForUnlockOn_KeyguardOn_ScreenThenMotion() 1600 verify(mAlarmManager).cancel(eq(mDeviceIdleController.mDeepAlarmListener)); in testExitNotifiesDependencies_WaitForUnlockOn_KeyguardOn_ScreenThenMotion() 1609 reset(mAlarmManager); in testExitNotifiesDependencies_WaitForUnlockOn_KeyguardOff_ScreenThenMotion() 1618 verify(mAlarmManager).cancel(eq(mDeviceIdleController.mDeepAlarmListener)); in testExitNotifiesDependencies_WaitForUnlockOn_KeyguardOff_ScreenThenMotion() 1627 reset(mAlarmManager); in testExitNotifiesDependencies_WaitForUnlockOn_KeyguardOn_MotionThenScreen() 1630 InOrder alarmManagerInOrder = inOrder(mAlarmManager); in testExitNotifiesDependencies_WaitForUnlockOn_KeyguardOn_MotionThenScreen() [all …]
|
/frameworks/base/services/core/java/com/android/server/locksettings/ |
D | LockSettingsStrongAuth.java | 104 private final AlarmManager mAlarmManager; field in LockSettingsStrongAuth 115 mAlarmManager = mInjector.getAlarmManager(context); in LockSettingsStrongAuth() 254 mAlarmManager.cancel(alarm); in rescheduleStrongAuthTimeoutAlarm() 265 mAlarmManager.set(AlarmManager.ELAPSED_REALTIME, nextAlarmTime, in rescheduleStrongAuthTimeoutAlarm() 306 mAlarmManager.set(AlarmManager.ELAPSED_REALTIME, nextAlarmTime, in handleScheduleNonStrongBiometricTimeout() 330 mAlarmManager.cancel(alarm); in cancelNonStrongBiometricAlarmListener() 344 mAlarmManager.cancel(alarm); in cancelNonStrongBiometricIdleAlarmListener() 390 mAlarmManager.cancel(alarm); in handleScheduleNonStrongBiometricIdleTimeout() 397 mAlarmManager.set(AlarmManager.ELAPSED_REALTIME, nextAlarmTime, in handleScheduleNonStrongBiometricIdleTimeout()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/rtt/ |
D | RttServiceImplTest.java | 110 private TestAlarmManager mAlarmManager; field in RttServiceImplTest 200 mAlarmManager = new TestAlarmManager(); in setUp() 202 .thenReturn(mAlarmManager.getAlarmManager()); in setUp() 203 mInOrder = inOrder(mAlarmManager.getAlarmManager(), mockContext); in setUp() 309 mAlarmManager.getAlarmManager()); in testRangingFlow() 383 mAlarmManager.getAlarmManager()); in testRangingFlowUsingAwarePeerHandles() 450 mAlarmManager.getAlarmManager()); in testRangingFlowNativeFailure() 487 mAlarmManager.getAlarmManager()); in testRangingRequestWithoutRuntimePermission() 569 mAlarmManager.getAlarmManager()); in testBinderDeathOfRangingApp() 608 mAlarmManager.getAlarmManager()); in testBinderDeathWithWorkSource() [all …]
|
/frameworks/opt/net/voip/src/java/com/android/server/sip/ |
D | SipWakeupTimer.java | 42 private AlarmManager mAlarmManager; field in SipWakeupTimer 54 mAlarmManager = (AlarmManager) in SipWakeupTimer() 68 mAlarmManager.cancel(mPendingIntent); in stop() 85 mAlarmManager.cancel(mPendingIntent); in cancelAlarm() 220 mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, in scheduleNext()
|
/frameworks/base/services/core/java/com/android/server/policy/ |
D | BurnInProtectionHelper.java | 81 private final AlarmManager mAlarmManager; field in BurnInProtectionHelper 110 mAlarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); in BurnInProtectionHelper() 173 mAlarmManager.setExact(AlarmManager.ELAPSED_REALTIME, nextElapsed, in updateBurnInProtection() 176 mAlarmManager.cancel(mBurnInProtectionIntent); in updateBurnInProtection()
|
/frameworks/base/services/core/java/com/android/server/twilight/ |
D | TwilightService.java | 64 protected AlarmManager mAlarmManager; field in TwilightService 122 mAlarmManager = (AlarmManager) c.getSystemService(Context.ALARM_SERVICE); in onBootPhase() 203 mAlarmManager.cancel(this); in stopListening() 237 mAlarmManager.setExact(AlarmManager.RTC, triggerAtMillis, TAG, this, mHandler); in updateTwilightState()
|
/frameworks/base/services/core/java/com/android/server/ |
D | NetworkTimeUpdateService.java | 76 private final AlarmManager mAlarmManager; field in NetworkTimeUpdateService 101 mAlarmManager = mContext.getSystemService(AlarmManager.class); in NetworkTimeUpdateService() 193 mAlarmManager.cancel(mPendingPollIntent); in resetAlarm() 196 mAlarmManager.set(AlarmManager.ELAPSED_REALTIME, next, mPendingPollIntent); in resetAlarm()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/keyguard/ |
D | KeyguardSliceProviderTest.java | 78 private AlarmManager mAlarmManager; field in KeyguardSliceProviderTest 177 verify(mAlarmManager).setExact(eq(AlarmManager.RTC), eq(triggerAt), anyString(), any(), in schedulesAlarm12hBefore() 249 verify(mAlarmManager).cancel(any(AlarmManager.OnAlarmListener.class)); in onDestroy_unregisterListeners() 263 mAlarmManager = KeyguardSliceProviderTest.this.mAlarmManager; in inject()
|