Home
last modified time | relevance | path

Searched refs:AlarmManager (Results 1 – 25 of 120) sorted by relevance

12345

/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
DAlarmTimeout.java19 import android.app.AlarmManager;
27 public class AlarmTimeout implements AlarmManager.OnAlarmListener {
33 private final AlarmManager mAlarmManager;
34 private final AlarmManager.OnAlarmListener mListener;
39 public AlarmTimeout(AlarmManager alarmManager, AlarmManager.OnAlarmListener listener, in AlarmTimeout()
68 mAlarmManager.setExact(AlarmManager.ELAPSED_REALTIME_WAKEUP, in schedule()
/frameworks/base/tests/utils/testutils/java/android/app/test/
DTestAlarmManager.java26 import android.app.AlarmManager;
44 private final AlarmManager mAlarmManager;
50 mAlarmManager = mock(AlarmManager.class); in TestAlarmManager()
52 any(AlarmManager.OnAlarmListener.class), any(Handler.class)); in TestAlarmManager()
54 anyString(), any(AlarmManager.OnAlarmListener.class), any(Handler.class)); in TestAlarmManager()
56 .when(mAlarmManager).cancel(any(AlarmManager.OnAlarmListener.class)); in TestAlarmManager()
59 public AlarmManager getAlarmManager() { in getAlarmManager()
140 AlarmManager.OnAlarmListener listener, Handler handler) { in answer()
147 public void answer(AlarmManager.OnAlarmListener listener) { in answer()
163 private final AlarmManager.OnAlarmListener mListener;
[all …]
/frameworks/support/compat/src/main/java/androidx/core/app/
DAlarmManagerCompat.java19 import android.app.AlarmManager;
57 public static void setAlarmClock(@NonNull AlarmManager alarmManager, long triggerTime, in setAlarmClock()
60 alarmManager.setAlarmClock(new AlarmManager.AlarmClockInfo(triggerTime, showIntent), in setAlarmClock()
63 AlarmManagerCompat.setExact(alarmManager, AlarmManager.RTC_WAKEUP, triggerTime, in setAlarmClock()
115 public static void setAndAllowWhileIdle(@NonNull AlarmManager alarmManager, int type, in setAndAllowWhileIdle()
160 public static void setExact(@NonNull AlarmManager alarmManager, int type, long triggerAtMillis, in setExact()
220 public static void setExactAndAllowWhileIdle(@NonNull AlarmManager alarmManager, int type, in setExactAndAllowWhileIdle()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/
DBluetoothDiscoverableTimeoutReceiver.java20 import android.app.AlarmManager;
42 AlarmManager alarmManager = in setDiscoverableAlarm()
43 (AlarmManager) context.getSystemService (Context.ALARM_SERVICE); in setDiscoverableAlarm()
53 alarmManager.set(AlarmManager.RTC_WAKEUP, alarmTime, pending); in setDiscoverableAlarm()
65 AlarmManager alarmManager = in cancelDiscoverableAlarm()
66 (AlarmManager) context.getSystemService (Context.ALARM_SERVICE); in cancelDiscoverableAlarm()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DNextAlarmControllerImpl.java19 import android.app.AlarmManager;
37 private AlarmManager mAlarmManager;
38 private AlarmManager.AlarmClockInfo mNextAlarm;
41 mAlarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); in NextAlarmControllerImpl()
44 filter.addAction(AlarmManager.ACTION_NEXT_ALARM_CLOCK_CHANGED); in NextAlarmControllerImpl()
66 || action.equals(AlarmManager.ACTION_NEXT_ALARM_CLOCK_CHANGED)) { in onReceive()
DNextAlarmController.java17 import android.app.AlarmManager;
25 void onNextAlarmChanged(AlarmManager.AlarmClockInfo nextAlarm); in onNextAlarmChanged()
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/
DWakeupMessageTest.java22 import android.app.AlarmManager;
51 @Mock AlarmManager mAlarmManager;
56 ArgumentCaptor<AlarmManager.OnAlarmListener> mListenerCaptor =
57 ArgumentCaptor.forClass(AlarmManager.OnAlarmListener.class);
109 verify(mAlarmManager).setExact(eq(AlarmManager.ELAPSED_REALTIME_WAKEUP), eq(when), in scheduleAndVerifyAlarm()
110 eq(TEST_CMD_NAME), any(AlarmManager.OnAlarmListener.class), eq(mHandler)); in scheduleAndVerifyAlarm()
180 verify(mAlarmManager).setExact(eq(AlarmManager.ELAPSED_REALTIME_WAKEUP), eq(when), in scheduleRunnable()
181 eq(TEST_CMD_NAME), any(AlarmManager.OnAlarmListener.class), eq(mHandler)); in scheduleRunnable()
/frameworks/base/core/java/com/android/internal/util/
DWakeupMessage.java19 import android.app.AlarmManager;
39 public class WakeupMessage implements AlarmManager.OnAlarmListener {
40 private final AlarmManager mAlarmManager;
89 private static AlarmManager getAlarmManager(Context context) { in getAlarmManager()
90 return (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); in getAlarmManager()
101 AlarmManager.ELAPSED_REALTIME_WAKEUP, when, mCmdName, this, mHandler); in schedule()
/frameworks/support/work/workmanager/src/main/java/androidx/work/impl/background/systemalarm/
DAlarms.java19 import static android.app.AlarmManager.RTC_WAKEUP;
21 import android.app.AlarmManager;
102 AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); in cancelExactAlarm()
121 AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); in setExactAlarm()
/frameworks/base/tests/utils/SleepUtils/AlarmService/src/com/android/testing/alarmservice/
DAlarmImpl.java19 import android.app.AlarmManager;
51 AlarmManager am = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE); in setAlarmAndWait()
55 am.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, atTime, pi); in setAlarmAndWait()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/keyguard/
DKeyguardSliceProviderTest.java28 import android.app.AlarmManager;
68 private AlarmManager mAlarmManager;
114AlarmManager.AlarmClockInfo alarmClockInfo = new AlarmManager.AlarmClockInfo(in16Hours, null); in schedulesAlarm12hBefore()
119 verify(mAlarmManager).setExact(eq(AlarmManager.RTC), eq(triggerAt), anyString(), any(), in schedulesAlarm12hBefore()
126AlarmManager.AlarmClockInfo alarmClockInfo = new AlarmManager.AlarmClockInfo(in16Hours, null); in updatingNextAlarmInvalidatesSlice()
/frameworks/support/samples/Support4Demos/src/main/java/com/example/android/supportv4/content/
DSimpleWakefulController.java20 import android.app.AlarmManager;
64 AlarmManager am = (AlarmManager)getSystemService(ALARM_SERVICE);
65 am.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), sender);
/frameworks/support/work/workmanager-firebase/src/main/java/androidx/work/impl/background/firebase/
DFirebaseJobScheduler.java19 import android.app.AlarmManager;
53 private AlarmManager mAlarmManager;
93 mAlarmManager = (AlarmManager) mAppContext.getSystemService(Context.ALARM_SERVICE); in scheduleLater()
105 mAlarmManager.setExact(AlarmManager.RTC_WAKEUP, triggerAtMillis, pendingIntent); in scheduleLater()
107 mAlarmManager.set(AlarmManager.RTC_WAKEUP, triggerAtMillis, pendingIntent); in scheduleLater()
/frameworks/base/core/java/android/app/
DIAlarmManager.aidl19 import android.app.AlarmManager;
34 … String listenerTag, in WorkSource workSource, in AlarmManager.AlarmClockInfo alarmClock); in set()
39 AlarmManager.AlarmClockInfo getNextAlarmClock(int userId); in getNextAlarmClock()
/frameworks/base/tests/utils/SleepUtils/WakeLoopService/src/android/test/wakeuploop/
DWakeLoopService.java19 import android.app.AlarmManager;
77 AlarmManager am = (AlarmManager)getSystemService(Context.ALARM_SERVICE); in onStartCommand()
86 am.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, atTime, pi); in onStartCommand()
DWakeUpCall.java19 import android.app.AlarmManager;
46 AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); in onReceive()
82 am.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, atTime, pi); in onReceive()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/scanner/
DWificondScannerTest.java25 import android.app.AlarmManager;
102 .cancel(any(AlarmManager.OnAlarmListener.class)); in externalScanResultsDoNotCauseSpuriousTimerCancellationOrCrash()
105 .cancel(isNull(AlarmManager.OnAlarmListener.class)); in externalScanResultsDoNotCauseSpuriousTimerCancellationOrCrash()
127 .cancel(any(AlarmManager.OnAlarmListener.class)); in externalScanResultsAfterOurScanDoNotCauseSpuriousTimerCancellationOrCrash()
130 .cancel(isNull(AlarmManager.OnAlarmListener.class)); in externalScanResultsAfterOurScanDoNotCauseSpuriousTimerCancellationOrCrash()
158 .cancel(any(AlarmManager.OnAlarmListener.class)); in lateScanResultsDoNotCauseSpuriousTimerCancellationOrCrash()
161 .cancel(isNull(AlarmManager.OnAlarmListener.class)); in lateScanResultsDoNotCauseSpuriousTimerCancellationOrCrash()
/frameworks/base/core/tests/coretests/src/android/app/activity/
DSetTimeZonePermissionsTest.java19 import android.app.AlarmManager;
30 private AlarmManager mAlarm;
38 mAlarm = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE); in setUp()
/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/
DKeyguardSliceProvider.java20 import android.app.AlarmManager;
80 private final AlarmManager.OnAlarmListener mUpdateNextAlarm = this::updateNextAlarm;
88 protected AlarmManager mAlarmManager;
90 private AlarmManager.AlarmClockInfo mNextAlarmInfo;
189 mAlarmManager = getContext().getSystemService(AlarmManager.class); in onCreateSliceProvider()
223 private boolean withinNHours(AlarmManager.AlarmClockInfo alarmClockInfo, int hours) { in withinNHours()
281 public void onNextAlarmChanged(AlarmManager.AlarmClockInfo nextAlarm) { in onNextAlarmChanged()
288 mAlarmManager.setExact(AlarmManager.RTC, triggerAt, "lock_screen_next_alarm", in onNextAlarmChanged()
/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/
DDozeFactory.java19 import android.app.AlarmManager;
47 AlarmManager alarmManager = context.getSystemService(AlarmManager.class); in assembleMachine()
88 DozeHost host, AlarmManager alarmManager, AmbientDisplayConfiguration config, in createDozeTriggers()
96 DozeMachine machine, Handler handler, AlarmManager alarmManager, in createDozeUi()
/frameworks/base/cmds/statsd/tools/loadtest/src/com/android/statsd/loadtest/
DPerfData.java21 import android.app.AlarmManager;
49 private AlarmManager mAlarmMgr;
75 mAlarmMgr = (AlarmManager) loadtestActivity.getSystemService(Context.ALARM_SERVICE); in PerfData()
90 mAlarmMgr.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, -1 /* now */, in startRecording()
/frameworks/base/tests/DozeTest/src/com/android/dreams/dozetest/
DDozeTestDream.java19 import android.app.AlarmManager;
58 private AlarmManager mAlarmManager;
78 mAlarmManager = (AlarmManager)getSystemService(Context.ALARM_SERVICE); in onCreate()
150 mAlarmManager.setExact(AlarmManager.RTC_WAKEUP, now + 60000, mAlarmIntent); in performTimeUpdate()
/frameworks/base/services/core/java/com/android/server/notification/
DScheduleConditionProvider.java20 import android.app.AlarmManager;
70 private AlarmManager mAlarmManager;
163 mAlarmManager = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE); in evaluateSubscriptions()
220 final AlarmManager alarms = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE); in updateAlarm()
231 alarms.setExact(AlarmManager.RTC_WAKEUP, time, pendingIntent); in updateAlarm()
238 final AlarmManager.AlarmClockInfo info = mAlarmManager.getNextAlarmClock( in getNextAlarm()
256 filter.addAction(AlarmManager.ACTION_NEXT_ALARM_CLOCK_CHANGED); in setRegistered()
/frameworks/support/work/workmanager/src/main/java/androidx/work/impl/utils/
DForceStopRunnable.java19 import static android.app.AlarmManager.RTC_WAKEUP;
24 import android.app.AlarmManager;
141 AlarmManager alarmManager = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE); in setAlarm()
/frameworks/base/services/core/java/com/android/server/locksettings/
DLockSettingsStrongAuth.java22 import android.app.AlarmManager;
23 import android.app.AlarmManager.OnAlarmListener;
64 private AlarmManager mAlarmManager;
70 mAlarmManager = context.getSystemService(AlarmManager.class); in LockSettingsStrongAuth()
141 mAlarmManager.set(AlarmManager.ELAPSED_REALTIME, when, STRONG_AUTH_TIMEOUT_ALARM_TAG, in handleScheduleStrongAuthTimeout()

12345