Home | History | Annotate | Download | only in alarms

Lines Matching refs:notification

19 import android.app.Notification;
27 import android.service.notification.StatusBarNotification;
68 * This value is coordinated with notification ids from
74 * This value is coordinated with notification ids from
80 * This value is coordinated with notification ids from
87 LogUtils.v("Displaying low priority notification for alarm instance: " + instance.mId);
107 // Setup up hide notification
129 final Notification notification = builder.build();
130 nm.notify(id, notification);
131 updateUpcomingAlarmGroupNotification(context, -1, notification);
136 LogUtils.v("Displaying high priority notification for alarm instance: " + instance.mId);
170 final Notification notification = builder.build();
171 nm.notify(id, notification);
172 updateUpcomingAlarmGroupNotification(context, -1, notification);
176 private static boolean isGroupSummary(Notification n) {
177 return (n.flags & Notification.FLAG_GROUP_SUMMARY) == Notification.FLAG_GROUP_SUMMARY;
181 * Method which returns the first active notification for a given group. If a notification was
182 * just posted, provide it to make sure it is included as a potential result. If a notification
189 * @param canceledNotificationId The id of the just-canceled notification (-1 if none)
190 * @param postedNotification The notification that was just posted
191 * @return The first active notification for the group
194 private static Notification getFirstActiveNotification(Context context, String group,
195 int canceledNotificationId, Notification postedNotification) {
199 Notification firstActiveNotification = postedNotification;
201 final Notification n = statusBarNotification.getNotification();
215 private static Notification getActiveGroupSummaryNotification(Context context, String group) {
220 final Notification n = statusBarNotification.getNotification();
229 int canceledNotificationId, Notification postedNotification) {
236 final Notification firstUpcoming = getFirstActiveNotification(context, UPCOMING_GROUP_KEY,
243 Notification summary = getActiveGroupSummaryNotification(context, UPCOMING_GROUP_KEY);
263 int canceledNotificationId, Notification postedNotification) {
270 final Notification firstMissed = getFirstActiveNotification(context, MISSED_GROUP_KEY,
277 Notification summary = getActiveGroupSummaryNotification(context, MISSED_GROUP_KEY);
298 LogUtils.v("Displaying snoozed notification for alarm instance: " + instance.mId);
333 final Notification notification = builder.build();
334 nm.notify(id, notification);
335 updateUpcomingAlarmGroupNotification(context, -1, notification);
340 LogUtils.v("Displaying missed notification for alarm instance: " + instance.mId);
378 final Notification notification = builder.build();
379 nm.notify(id, notification);
380 updateMissedAlarmGroupNotification(context, -1, notification);
384 LogUtils.v("Displaying alarm notification for alarm instance: " + instance.mId);
387 NotificationCompat.Builder notification = new NotificationCompat.Builder(service)
406 notification.addAction(R.drawable.ic_snooze_24dp,
415 notification.addAction(R.drawable.ic_alarm_off_24dp,
422 notification.setContentIntent(PendingIntent.getActivity(service,
432 notification.setFullScreenIntent(PendingIntent.getActivity(service,
435 notification.setPriority(NotificationCompat.PRIORITY_MAX);
438 service.startForeground(ALARM_FIRING_NOTIFICATION_ID, notification.build());
451 * Updates the notification for an existing alarm. Use if the label has changed.
468 LogUtils.d("No notification to update");
484 * @param instance the alarm instance for which the notification is generated
485 * @return the sort key that specifies the order of this alarm notification