Home
last modified time | relevance | path

Searched refs:mAlarmManager (Results 1 – 25 of 70) sorted by relevance

123

/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/controllers/
DTimeControllerTest.java79 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 …]
DQuotaControllerTest.java118 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/
DWificondScannerTest.java101 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/
DAlarmTimeout.java33 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/
DWakeupMessage.java40 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/
DTestAlarmManager.java44 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/
DWakeupMessageTest.java51 @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/
DWifiNetworkFactoryTest.java122 @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 …]
DSoftApManagerTest.java109 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 …]
DWifiConnectivityManagerTest.java88 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 …]
DWifiConfigStoreTest.java161 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/
DDozeTestDream.java58 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/
DDozeUiTest.java59 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()
DDozeTriggersTest.java63 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/
DTimeDetectorStrategyCallbackImpl.java50 @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/
DDeviceIdleControllerTest.java119 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/
DNextAlarmControllerImpl.java42 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/
DLockSettingsStrongAuth.java64 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/
DRttServiceImplTest.java107 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/
DSipWakeupTimer.java42 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/
DBurnInProtectionHelper.java81 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/
DKeyguardSliceProviderTest.java76 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/
DNetworkTimeUpdateService.java76 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/
DTwilightService.java63 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/
DNetworkLoggingHandler.java74 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()

123