Lines Matching defs:alarm

36     /** If the alarm is older than STALE_WINDOW, ignore.  It
56 // The alarm has been killed, update the notification
62 Alarm alarm = null;
64 // Get the alarm out of the Intent
65 alarm = intent.getParcelableExtra(Alarms.ALARM_INTENT_EXTRA);
68 if (alarm != null) {
69 Alarms.disableSnoozeAlert(context, alarm.id);
72 // Don't know what snoozed alarm to cancel, so cancel them all. This
77 // Inform any active UI that alarm snooze was cancelled
85 Alarm alarm = null;
86 // Grab the alarm from the intent. Since the remote AlarmManagerService
95 alarm = Alarm.CREATOR.createFromParcel(in);
98 if (alarm == null) {
99 Log.wtf("Failed to parse the alarm from the intent");
105 // Disable the snooze alert if this alarm is the snooze.
106 Alarms.disableSnoozeAlert(context, alarm.id);
107 // Disable this alarm if it does not repeat.
108 if (!alarm.daysOfWeek.isRepeatSet()) {
109 Alarms.enableAlarm(context, alarm.id, false);
116 // Intentionally verbose: always log the alarm time to provide useful
119 Log.v("Received alarm set for id=" + alarm.id + " " + Log.formatTime(alarm.time));
122 if (now > alarm.time + STALE_WINDOW) {
123 Log.v("Ignoring stale alarm");
146 // Play the alarm alert and vibrate the device.
148 playAlarm.putExtra(Alarms.ALARM_INTENT_EXTRA, alarm);
151 // Trigger a notification that, when clicked, will show the alarm alert
155 notify.putExtra(Alarms.ALARM_INTENT_EXTRA, alarm);
157 alarm.id, notify, 0);
161 snoozeIntent.putExtra(Alarms.ALARM_INTENT_EXTRA, alarm);
163 alarm.id, snoozeIntent, 0);
165 dismissIntent.putExtra(Alarms.ALARM_INTENT_EXTRA, alarm);
167 alarm.id, dismissIntent, 0);
170 cal.setTimeInMillis(alarm.time);
173 // Use the alarm's label or the default label main text of the notification.
174 String label = alarm.getLabelOrDefault(context);
197 alarmAlert.putExtra(Alarms.ALARM_INTENT_EXTRA, alarm);
200 n.fullScreenIntent = PendingIntent.getActivity(context, alarm.id, alarmAlert, 0);
202 // Send the notification using the alarm id to easily identify the
205 nm.notify(alarm.id, n);
213 private void updateNotification(Context context, Alarm alarm, int timeout) {
216 // If the alarm is null, just cancel the notification.
217 if (alarm == null) {
226 viewAlarm.putExtra(Alarms.ALARM_INTENT_EXTRA, alarm);
228 PendingIntent.getActivity(context, alarm.id, viewAlarm, 0);
232 String label = alarm.getLabelOrDefault(context);
234 label, alarm.time);
242 nm.cancel(alarm.id);
243 nm.notify(alarm.id, n);