/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() 189 InOrder inOrder = inOrder(mAlarmManager); in runTestMaybeStartTrackingJobLocked_DelayInOrder() 192 inOrder.verify(mAlarmManager, times(1)) in runTestMaybeStartTrackingJobLocked_DelayInOrder() 196 inOrder.verify(mAlarmManager, never()) in runTestMaybeStartTrackingJobLocked_DelayInOrder() 199 inOrder.verify(mAlarmManager, never()) in runTestMaybeStartTrackingJobLocked_DelayInOrder() 223 InOrder inOrder = inOrder(mAlarmManager); in testMaybeStartTrackingJobLocked_DelayInOrder_WithSkipping_SomeNotReady() 226 inOrder.verify(mAlarmManager, times(1)) in testMaybeStartTrackingJobLocked_DelayInOrder_WithSkipping_SomeNotReady() 230 inOrder.verify(mAlarmManager, never()) in testMaybeStartTrackingJobLocked_DelayInOrder_WithSkipping_SomeNotReady() [all …]
|
D | QuotaControllerTest.java | 118 private AlarmManager mAlarmManager; field in QuotaControllerTest 152 when(mContext.getSystemService(Context.ALARM_SERVICE)).thenReturn(mAlarmManager); in setUp() 1334 verify(mAlarmManager, never()).set(anyInt(), anyLong(), eq(TAG_CLEANUP), any(), any()); in testMaybeScheduleCleanupAlarmLocked() 1342 verify(mAlarmManager, times(1)) in testMaybeScheduleCleanupAlarmLocked() 1351 verify(mAlarmManager, times(1)) in testMaybeScheduleCleanupAlarmLocked() 1369 verify(mAlarmManager, never()).set(anyInt(), anyLong(), eq(TAG_QUOTA_CHECK), any(), any()); in testMaybeScheduleStartAlarmLocked_Active() 1383 verify(mAlarmManager, never()).set(anyInt(), anyLong(), eq(TAG_QUOTA_CHECK), any(), any()); in testMaybeScheduleStartAlarmLocked_Active() 1389 verify(mAlarmManager, never()).set(anyInt(), anyLong(), eq(TAG_QUOTA_CHECK), any(), any()); in testMaybeScheduleStartAlarmLocked_Active() 1402 verify(mAlarmManager, times(1)).set(anyInt(), eq(expectedAlarmTime), eq(TAG_QUOTA_CHECK), in testMaybeScheduleStartAlarmLocked_Active() 1418 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 | 101 verify(mAlarmManager.getAlarmManager(), never()).cancel(any(PendingIntent.class)); in externalScanResultsDoNotCauseSpuriousTimerCancellationOrCrash() 102 verify(mAlarmManager.getAlarmManager(), never()) in externalScanResultsDoNotCauseSpuriousTimerCancellationOrCrash() 104 verify(mAlarmManager.getAlarmManager(), never()).cancel(isNull(PendingIntent.class)); in externalScanResultsDoNotCauseSpuriousTimerCancellationOrCrash() 105 verify(mAlarmManager.getAlarmManager(), never()) in externalScanResultsDoNotCauseSpuriousTimerCancellationOrCrash() 126 verify(mAlarmManager.getAlarmManager(), never()).cancel(any(PendingIntent.class)); in externalScanResultsAfterOurScanDoNotCauseSpuriousTimerCancellationOrCrash() 127 verify(mAlarmManager.getAlarmManager(), times(1)) in externalScanResultsAfterOurScanDoNotCauseSpuriousTimerCancellationOrCrash() 129 verify(mAlarmManager.getAlarmManager(), never()).cancel(isNull(PendingIntent.class)); in externalScanResultsAfterOurScanDoNotCauseSpuriousTimerCancellationOrCrash() 130 verify(mAlarmManager.getAlarmManager(), never()) in externalScanResultsAfterOurScanDoNotCauseSpuriousTimerCancellationOrCrash() 150 mAlarmManager.dispatch(WificondScannerImpl.TIMEOUT_ALARM_TAG); in lateScanResultsDoNotCauseSpuriousTimerCancellationOrCrash() 157 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/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/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | WifiNetworkFactoryTest.java | 122 @Mock AlarmManager mAlarmManager; field in WifiNetworkFactoryTest 192 mNetworkCapabilities, mActivityManager, mAlarmManager, mAppOpsManager, mClock, in setUp() 655 verify(mAlarmManager).cancel(any(OnAlarmListener.class)); in testPeriodicScanCancelOnReleaseNetworkRequestWithSpecifier() 1067 verify(mAlarmManager).cancel(any(OnAlarmListener.class)); in testNetworkSpecifierHandleUserSelectionConnectToNetwork() 1179 verify(mAlarmManager).cancel(any(OnAlarmListener.class)); in testNetworkSpecifierHandleUserSelectionConnectToExistingSavedNetwork() 1330 verify(mAlarmManager).cancel(any(OnAlarmListener.class)); in testNetworkSpecifierHandleUserSelectionReject() 1355 mInOrder = inOrder(mAlarmManager, mClientModeImpl); in testNetworkSpecifierHandleConnectionTimeout() 1384 mInOrder = inOrder(mAlarmManager, mClientModeImpl); in testNetworkSpecifierHandleConnectionTriggerFailure() 1393 mInOrder.verify(mAlarmManager).cancel( in testNetworkSpecifierHandleConnectionTriggerFailure() 1418 mInOrder = inOrder(mAlarmManager, mClientModeImpl); in testNetworkSpecifierHandleConnectionFailure() [all …]
|
D | SoftApManagerTest.java | 109 private TestAlarmManager mAlarmManager; field in SoftApManagerTest 137 mAlarmManager = new TestAlarmManager(); in setUp() 139 .thenReturn(mAlarmManager.getAlarmManager()); in setUp() 945 verify(mAlarmManager.getAlarmManager()).cancel(any(WakeupMessage.class)); in testCallbackForClientUpdateToZeroWhenLeaveSoftapStarted() 954 verify(mAlarmManager.getAlarmManager(), times(2)).cancel(any(WakeupMessage.class)); in testCallbackForClientUpdateToZeroWhenLeaveSoftapStarted() 964 verify(mAlarmManager.getAlarmManager()).setExact(anyInt(), anyLong(), in schedulesTimeoutTimerOnStart() 977 verify(mAlarmManager.getAlarmManager()).cancel(any(WakeupMessage.class)); in cancelsTimeoutTimerOnStop() 990 verify(mAlarmManager.getAlarmManager()).cancel(any(WakeupMessage.class)); in cancelsTimeoutTimerOnNewClientsConnect() 1007 verify(mAlarmManager.getAlarmManager()).cancel(any(WakeupMessage.class)); in schedulesTimeoutTimerWhenAllClientsDisconnect() 1017 verify(mAlarmManager.getAlarmManager(), times(2)).setExact(anyInt(), anyLong(), in schedulesTimeoutTimerWhenAllClientsDisconnect() [all …]
|
D | WifiConnectivityManagerTest.java | 88 mAlarmManager = new TestAlarmManager(); in setUp() 127 private TestAlarmManager mAlarmManager; field in WifiConnectivityManagerTest 189 mAlarmManager.getAlarmManager()); in mockContext() 612 mAlarmManager.dispatch(WifiConnectivityManager.WATCHDOG_TIMER_TAG); in watchdogBitePnoBadIncrementsMetrics() 639 mAlarmManager.dispatch(WifiConnectivityManager.WATCHDOG_TIMER_TAG); in watchdogBitePnoGoodIncrementsMetrics() 928 long firstIntervalMs = mAlarmManager in checkPeriodicScanIntervalWhenDisconnected() 937 mAlarmManager.dispatch(WifiConnectivityManager.PERIODIC_SCAN_TIMER_TAG); in checkPeriodicScanIntervalWhenDisconnected() 941 long secondIntervalMs = mAlarmManager in checkPeriodicScanIntervalWhenDisconnected() 954 mAlarmManager.dispatch(WifiConnectivityManager.PERIODIC_SCAN_TIMER_TAG); in checkPeriodicScanIntervalWhenDisconnected() 956 intervalMs = mAlarmManager in checkPeriodicScanIntervalWhenDisconnected() [all …]
|
D | WifiConfigStoreTest.java | 161 private TestAlarmManager mAlarmManager; field in WifiConfigStoreTest 183 mAlarmManager = new TestAlarmManager(); in setupMocks() 186 .thenReturn(mAlarmManager.getAlarmManager()); in setupMocks() 258 assertFalse(mAlarmManager.isPending(WifiConfigStore.BUFFERED_WRITE_ALARM_TAG)); in testForceWrite() 279 assertTrue(mAlarmManager.isPending(WifiConfigStore.BUFFERED_WRITE_ALARM_TAG)); in testBufferedWrite() 285 mAlarmManager.dispatch(WifiConfigStore.BUFFERED_WRITE_ALARM_TAG); in testBufferedWrite() 312 assertTrue(mAlarmManager.isPending(WifiConfigStore.BUFFERED_WRITE_ALARM_TAG)); in testForceWriteAfterBufferedWrite() 322 assertFalse(mAlarmManager.isPending(WifiConfigStore.BUFFERED_WRITE_ALARM_TAG)); in testForceWriteAfterBufferedWrite() 350 assertTrue(mAlarmManager.isPending(WifiConfigStore.BUFFERED_WRITE_ALARM_TAG)); in testForceWriteWithNoNewDataAfterBufferedWrite() 359 assertFalse(mAlarmManager.isPending(WifiConfigStore.BUFFERED_WRITE_ALARM_TAG)); in testForceWriteWithNoNewDataAfterBufferedWrite()
|
/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() 150 mAlarmManager.setExact(AlarmManager.RTC_WAKEUP, now + 60000, mAlarmIntent); in performTimeUpdate() 173 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 82 mDozeUi = new DozeUi(mContext, mAlarmManager, mMachine, mWakeLock, mHost, mHandler, in setUp() 99 clearInvocations(mAlarmManager); in pausingAndUnpausingAod_registersTimeTickAfterUnpausing() 103 verify(mAlarmManager).setExact(anyInt(), anyLong(), eq("doze_time_tick"), any(), any()); in pausingAndUnpausingAod_registersTimeTickAfterUnpausing() 137 mDozeUi = new DozeUi(mContext, mAlarmManager, mMachine, mWakeLock, mHost, mHandler, in neverAnimateScreenOff_whenNotSupported()
|
D | DozeTriggersTest.java | 63 private AlarmManager mAlarmManager; field in DozeTriggersTest 75 mAlarmManager = mock(AlarmManager.class); in setUp() 84 mTriggers = new DozeTriggers(mContext, mMachine, mHost, mAlarmManager, mConfig, mParameters, in setUp()
|
/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/services/tests/mockingservicestests/src/com/android/server/ |
D | DeviceIdleControllerTest.java | 119 private AlarmManager mAlarmManager; field in DeviceIdleControllerTest 152 return mAlarmManager; in getAlarmManager() 306 doNothing().when(mAlarmManager).set(anyInt(), anyLong(), anyString(), any(), any()); in setUp() 1471 reset(mAlarmManager); in testExitNotifiesDependencies_WaitForUnlockOn_KeyguardOn_ScreenThenMotion() 1484 verify(mAlarmManager).cancel(eq(mDeviceIdleController.mDeepAlarmListener)); in testExitNotifiesDependencies_WaitForUnlockOn_KeyguardOn_ScreenThenMotion() 1493 reset(mAlarmManager); in testExitNotifiesDependencies_WaitForUnlockOn_KeyguardOff_ScreenThenMotion() 1502 verify(mAlarmManager).cancel(eq(mDeviceIdleController.mDeepAlarmListener)); in testExitNotifiesDependencies_WaitForUnlockOn_KeyguardOff_ScreenThenMotion() 1511 reset(mAlarmManager); in testExitNotifiesDependencies_WaitForUnlockOn_KeyguardOn_MotionThenScreen() 1514 InOrder alarmManagerInOrder = inOrder(mAlarmManager); in testExitNotifiesDependencies_WaitForUnlockOn_KeyguardOn_MotionThenScreen() 1522 alarmManagerInOrder.verify(mAlarmManager) in testExitNotifiesDependencies_WaitForUnlockOn_KeyguardOn_MotionThenScreen() [all …]
|
/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/services/core/java/com/android/server/locksettings/ |
D | LockSettingsStrongAuth.java | 64 private AlarmManager mAlarmManager; field in LockSettingsStrongAuth 69 mAlarmManager = context.getSystemService(AlarmManager.class); in LockSettingsStrongAuth() 127 mAlarmManager.cancel(alarm); in handleScheduleStrongAuthTimeout() 133 mAlarmManager.set(AlarmManager.ELAPSED_REALTIME, when, STRONG_AUTH_TIMEOUT_ALARM_TAG, in handleScheduleStrongAuthTimeout()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/rtt/ |
D | RttServiceImplTest.java | 107 private TestAlarmManager mAlarmManager; field in RttServiceImplTest 191 mAlarmManager = new TestAlarmManager(); in setUp() 200 .thenReturn(mAlarmManager.getAlarmManager()); in setUp() 201 mInOrder = inOrder(mAlarmManager.getAlarmManager(), mockContext); in setUp() 300 mAlarmManager.getAlarmManager()); in testRangingFlow() 368 mAlarmManager.getAlarmManager()); in testRangingFlowUsingAwarePeerHandles() 433 mAlarmManager.getAlarmManager()); in testRangingFlowNativeFailure() 470 mAlarmManager.getAlarmManager()); in testRangingRequestWithoutRuntimePermission() 550 mAlarmManager.getAlarmManager()); in testBinderDeathOfRangingApp() 589 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/packages/SystemUI/tests/src/com/android/systemui/keyguard/ |
D | KeyguardSliceProviderTest.java | 76 private AlarmManager mAlarmManager; field in KeyguardSliceProviderTest 168 verify(mAlarmManager).setExact(eq(AlarmManager.RTC), eq(triggerAt), anyString(), any(), in schedulesAlarm12hBefore() 238 verify(mAlarmManager).cancel(any(AlarmManager.OnAlarmListener.class)); in onDestroy_unregisterListeners() 253 mAlarmManager = KeyguardSliceProviderTest.this.mAlarmManager; in onCreateSliceProvider()
|
/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/services/core/java/com/android/server/twilight/ |
D | TwilightService.java | 63 protected AlarmManager mAlarmManager; field in TwilightService 121 mAlarmManager = (AlarmManager) c.getSystemService(Context.ALARM_SERVICE); in onBootPhase() 197 mAlarmManager.cancel(this); in stopListening() 236 mAlarmManager.setExact(AlarmManager.RTC, triggerAtMillis, TAG, this, mHandler); in updateTwilightState()
|
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/ |
D | NetworkLoggingHandler.java | 74 private final AlarmManager mAlarmManager; field in NetworkLoggingHandler 126 this.mAlarmManager = mDpm.mInjector.getAlarmManager(); in NetworkLoggingHandler() 160 mAlarmManager.setWindow(AlarmManager.ELAPSED_REALTIME_WAKEUP, when, in scheduleBatchFinalization()
|