Home
last modified time | relevance | path

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

123

/frameworks/base/services/tests/mockingservicestests/src/com/android/server/utils/
DAlarmQueueTest.java68 private AlarmManager mAlarmManager; field in AlarmQueueTest
90 when(mContext.getSystemService(AlarmManager.class)).thenReturn(mAlarmManager); in setUp()
128 InOrder inOrder = inOrder(mAlarmManager);
131 inOrder.verify(mAlarmManager, timeout(1000).times(1))
134 inOrder.verify(mAlarmManager, never())
137 inOrder.verify(mAlarmManager, never())
146 InOrder inOrder = inOrder(mAlarmManager);
149 inOrder.verify(mAlarmManager, timeout(1000).times(1)).setExact(
152 inOrder.verify(mAlarmManager, timeout(1000).times(1)).setExact(
155 inOrder.verify(mAlarmManager, timeout(1000).times(1)).setExact(
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/controllers/
DTimeControllerTest.java81 private AlarmManager mAlarmManager; field in TimeControllerTest
101 when(mContext.getSystemService(Context.ALARM_SERVICE)).thenReturn(mAlarmManager); in setUp()
159 verify(mAlarmManager, never()) in testMaybeStartTrackingJobLocked_AlreadySatisfied()
180 InOrder inOrder = inOrder(mAlarmManager); in runTestMaybeStartTrackingJobLocked_DelayInOrder()
183 inOrder.verify(mAlarmManager, times(1)) in runTestMaybeStartTrackingJobLocked_DelayInOrder()
187 inOrder.verify(mAlarmManager, never()) in runTestMaybeStartTrackingJobLocked_DelayInOrder()
190 inOrder.verify(mAlarmManager, never()) in runTestMaybeStartTrackingJobLocked_DelayInOrder()
212 InOrder inOrder = inOrder(mAlarmManager); in testMaybeStartTrackingJobLocked_DelayInOrder_SomeNotReady()
215 inOrder.verify(mAlarmManager, times(1)) in testMaybeStartTrackingJobLocked_DelayInOrder_SomeNotReady()
219 inOrder.verify(mAlarmManager, never()) in testMaybeStartTrackingJobLocked_DelayInOrder_SomeNotReady()
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/controllers/idle/
DDeviceIdlenessTrackerTest.java79 private AlarmManager mAlarmManager; field in DeviceIdlenessTrackerTest
103 when(mContext.getSystemService(Context.ALARM_SERVICE)).thenReturn(mAlarmManager); in setUp()
180 InOrder inOrder = inOrder(mAlarmManager); in testAlarmSkippedIfAlreadyIdle()
181 inOrder.verify(mAlarmManager) in testAlarmSkippedIfAlreadyIdle()
198 inOrder.verify(mAlarmManager, never()) in testAlarmSkippedIfAlreadyIdle()
215 InOrder inOrder = inOrder(mAlarmManager); in testAlarmSkippedIfNoThresholdChange()
216 inOrder.verify(mAlarmManager) in testAlarmSkippedIfNoThresholdChange()
225 inOrder.verify(mAlarmManager, never()) in testAlarmSkippedIfNoThresholdChange()
231 inOrder.verify(mAlarmManager, never()) in testAlarmSkippedIfNoThresholdChange()
249 InOrder inOrder = inOrder(mAlarmManager); in testThresholdChangeWithStablePowerChange()
[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/services/tests/mockingservicestests/src/com/android/server/
DDeviceIdleControllerTest.java129 private AlarmManager mAlarmManager; field in DeviceIdleControllerTest
171 return mAlarmManager; in getAlarmManager()
344 doNothing().when(mAlarmManager).set(anyInt(), anyLong(), anyString(), any(), any()); in setUp()
345 doNothing().when(mAlarmManager).setExact(anyInt(), anyLong(), anyString(), any(), any()); in setUp()
346 doNothing().when(mAlarmManager) in setUp()
660 verify(mAlarmManager).setWindow( in testStateActiveToStateInactive_DoNotUseMotionSensor()
685 verify(mAlarmManager, never()).setWindow( in testStateActiveToStateInactive_MissingMotionSensor()
688 verify(mAlarmManager, never()).set( in testStateActiveToStateInactive_MissingMotionSensor()
698 .when(mAlarmManager).getNextWakeFromIdleTime(); in testStateActiveToStateInactive_UpcomingAlarm()
840 InOrder alarmManagerInOrder = inOrder(mAlarmManager); in testStepIdleStateLocked_ValidStates_MissingMotionSensor()
[all …]
/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/services/tests/servicestests/src/com/android/server/locksettings/
DLockSettingsStrongAuthTest.java77 private AlarmManager mAlarmManager; field in LockSettingsStrongAuthTest
85 when(mInjector.getAlarmManager(mContext)).thenReturn(mAlarmManager); in setUp()
156 verify(mAlarmManager).cancel(any(NonStrongBiometricIdleTimeoutAlarmListener.class)); in testReportSuccessfulBiometricUnlock_nonStrongBiometric_cancelIdleTimeout()
207 verify(mAlarmManager).cancel(alarm); in testReportSuccessfulStrongAuthUnlock_testRefreshStrongAuthTimeout()
232 verify(mAlarmManager, never()).cancel(any(NonStrongBiometricTimeoutAlarmListener.class)); in testFallbackTimeout_convenienceBiometric_weakBiometric()
237 verify(mAlarmManager).setExact( in verifyAlarm()
265 verify(mAlarmManager).cancel(any(NonStrongBiometricTimeoutAlarmListener.class)); in verifyAlarmsCancelledAndNonStrongBiometricAllowed()
269 verify(mAlarmManager).cancel(any(NonStrongBiometricIdleTimeoutAlarmListener.class)); in verifyAlarmsCancelledAndNonStrongBiometricAllowed()
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/
DWakeupMessageTest.java64 @Mock AlarmManager mAlarmManager; field in WakeupMessageTest
105 when(mContext.getSystemService(Context.ALARM_SERVICE)).thenReturn(mAlarmManager); in setUp()
107 doNothing().when(mAlarmManager).setExact(anyInt(), anyLong(), any(String.class), in setUp()
124 verify(mAlarmManager).setExact(eq(AlarmManager.ELAPSED_REALTIME_WAKEUP), eq(when), in scheduleAndVerifyAlarm()
195 verify(mAlarmManager).setExact(eq(AlarmManager.ELAPSED_REALTIME_WAKEUP), eq(when), in scheduleRunnable()
/frameworks/base/services/core/java/com/android/server/powerstats/
DTimerTrigger.java38 private final AlarmManager mAlarmManager; field in TimerTrigger
60 mAlarmManager.set(AlarmManager.ELAPSED_REALTIME, nextAlarmMs, in run()
74 mAlarmManager = mContext.getSystemService(AlarmManager.class); in TimerTrigger()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/utils/quota/
DCountQuotaTrackerTest.java103 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()).setWindow( in testMaybeScheduleStartAlarmLocked()
598 verify(mAlarmManager, never()).setWindow( in testMaybeScheduleStartAlarmLocked()
606 verify(mAlarmManager, never()).setWindow( in testMaybeScheduleStartAlarmLocked()
613 verify(mAlarmManager, never()).setWindow( in testMaybeScheduleStartAlarmLocked()
619 verify(mAlarmManager, timeout(1000).times(1)).setWindow( in testMaybeScheduleStartAlarmLocked()
[all …]
/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.java61 private AlarmManager mAlarmManager; field in DozeUiTest
87 mDozeUi = new DozeUi(mContext, mAlarmManager, mWakeLock, mHost, mHandler, in setUp()
106 clearInvocations(mAlarmManager); in pausingAndUnpausingAod_registersTimeTickAfterUnpausing()
110 verify(mAlarmManager).setExact(anyInt(), anyLong(), eq("doze_time_tick"), any(), any()); in pausingAndUnpausingAod_registersTimeTickAfterUnpausing()
/frameworks/base/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/
DLockoutFrameworkImpl.java76 private final AlarmManager mAlarmManager; field in LockoutFrameworkImpl
106 mAlarmManager = context.getSystemService(AlarmManager.class); in LockoutFrameworkImpl()
162 mAlarmManager.cancel(mLockoutResetIntent.apply(userId)); in cancelLockoutResetForUser()
167 mAlarmManager.setExact(AlarmManager.ELAPSED_REALTIME_WAKEUP, in scheduleLockoutResetForUser()
/frameworks/base/services/core/java/com/android/server/timedetector/
DGnssTimeUpdateService.java116 private final AlarmManager mAlarmManager; field in GnssTimeUpdateService
133 mAlarmManager = Objects.requireNonNull(alarmManager); in GnssTimeUpdateService()
182 mAlarmManager.cancel(mAlarmListener); in startGnssListeningInternal()
232 mAlarmManager.cancel(mAlarmListener); in handleLocationAvailable()
239 mAlarmManager.set( in handleLocationAvailable()
/frameworks/base/services/core/java/com/android/server/locksettings/
DLockSettingsStrongAuth.java107 private final AlarmManager mAlarmManager; field in LockSettingsStrongAuth
118 mAlarmManager = mInjector.getAlarmManager(context); in LockSettingsStrongAuth()
257 mAlarmManager.cancel(alarm); in rescheduleStrongAuthTimeoutAlarm()
268 mAlarmManager.setExact(AlarmManager.ELAPSED_REALTIME_WAKEUP, nextAlarmTime, in rescheduleStrongAuthTimeoutAlarm()
310 mAlarmManager.setExact(AlarmManager.ELAPSED_REALTIME_WAKEUP, nextAlarmTime, in handleScheduleNonStrongBiometricTimeout()
334 mAlarmManager.cancel(alarm); in cancelNonStrongBiometricAlarmListener()
348 mAlarmManager.cancel(alarm); in cancelNonStrongBiometricIdleAlarmListener()
394 mAlarmManager.cancel(alarm); in handleScheduleNonStrongBiometricIdleTimeout()
401 mAlarmManager.setExact(AlarmManager.ELAPSED_REALTIME_WAKEUP, nextAlarmTime, in handleScheduleNonStrongBiometricIdleTimeout()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DNextAlarmControllerImpl.java52 private AlarmManager mAlarmManager; field in NextAlarmControllerImpl
73 mAlarmManager = alarmManager; in NextAlarmControllerImpl()
122 mNextAlarm = mAlarmManager.getNextAlarmClock(mUserTracker.getUserId()); in updateNextAlarm()
/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/services/core/java/com/android/server/twilight/
DTwilightService.java65 protected AlarmManager mAlarmManager; field in TwilightService
123 mAlarmManager = (AlarmManager) c.getSystemService(Context.ALARM_SERVICE); in onBootPhase()
204 mAlarmManager.cancel(this); in stopListening()
238 mAlarmManager.setExact(AlarmManager.RTC, triggerAtMillis, TAG, this, mHandler); in updateTwilightState()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/keyguard/
DKeyguardSliceProviderTest.java82 private AlarmManager mAlarmManager; field in KeyguardSliceProviderTest
185 verify(mAlarmManager).setExact(eq(AlarmManager.RTC), eq(triggerAt), anyString(), any(), in schedulesAlarm12hBefore()
260 verify(mAlarmManager).cancel(any(AlarmManager.OnAlarmListener.class)); in onDestroy_unregisterListeners()
271 mAlarmManager = KeyguardSliceProviderTest.this.mAlarmManager; in TestableKeyguardSliceProvider()
/frameworks/base/services/core/java/com/android/server/pm/permission/
DOneTimePermissionUserManager.java57 private final @NonNull AlarmManager mAlarmManager; field in OneTimePermissionUserManager
88 mAlarmManager = context.getSystemService(AlarmManager.class); in OneTimePermissionUserManager()
341 mAlarmManager.setExact(AlarmManager.RTC_WAKEUP, revokeTime, LOG_TAG, this, in setAlarmLocked()
360 mAlarmManager.cancel(this); in cancelAlarmLocked()
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/
DPolicyWarningUIControllerTest.java83 private AlarmManager mAlarmManager; field in PolicyWarningUIControllerTest
99 mContext.addMockSystemService(AlarmManager.class, mAlarmManager); in setUp()
203 verify(mAlarmManager).set(eq(RTC_WAKEUP), anyLong(), in onNonA11yCategoryServiceBound_setAlarm()
214 verify(mAlarmManager).cancel( in onNonA11yCategoryServiceUnbound_cancelAlarm()
/frameworks/base/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/hidl/
DHidlToAidlSensorAdapterTest.java100 private AlarmManager mAlarmManager; field in HidlToAidlSensorAdapterTest
127 mContext.addMockSystemService(AlarmManager.class, mAlarmManager); in setUp()
158 verify(mAlarmManager).setExact(anyInt(), anyLong(), any()); in lockoutTimedResetViaClient()
206 verify(mAlarmManager, atLeast(1)).setExact(anyInt(), anyLong(), any()); in lockoutPermanentResetViaClient()
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/
DNetworkLoggingHandler.java74 private final AlarmManager mAlarmManager; field in NetworkLoggingHandler
128 this.mAlarmManager = mDpm.mInjector.getAlarmManager(); in NetworkLoggingHandler()
163 mAlarmManager.setWindow(AlarmManager.ELAPSED_REALTIME_WAKEUP, when, in scheduleBatchFinalization()

123