|
|
|
@ -304,9 +304,7 @@ public class NotificationManager {
|
|
|
|
? NotificationCompat.GROUP_ALERT_SUMMARY
|
|
|
|
? NotificationCompat.GROUP_ALERT_SUMMARY
|
|
|
|
: NotificationCompat.GROUP_ALERT_CHILDREN);
|
|
|
|
: NotificationCompat.GROUP_ALERT_CHILDREN);
|
|
|
|
|
|
|
|
|
|
|
|
Intent snoozeIntent = new Intent(context, SnoozeActivity.class);
|
|
|
|
Intent snoozeIntent = SnoozeActivity.newIntent(context, taskIds);
|
|
|
|
snoozeIntent.setFlags(FLAG_ACTIVITY_NEW_TASK);
|
|
|
|
|
|
|
|
snoozeIntent.putExtra(SnoozeActivity.EXTRA_TASK_IDS, taskIds);
|
|
|
|
|
|
|
|
builder.addAction(
|
|
|
|
builder.addAction(
|
|
|
|
R.drawable.ic_snooze_white_24dp,
|
|
|
|
R.drawable.ic_snooze_white_24dp,
|
|
|
|
context.getString(R.string.snooze_all),
|
|
|
|
context.getString(R.string.snooze_all),
|
|
|
|
@ -410,9 +408,7 @@ public class NotificationManager {
|
|
|
|
completePendingIntent)
|
|
|
|
completePendingIntent)
|
|
|
|
.build();
|
|
|
|
.build();
|
|
|
|
|
|
|
|
|
|
|
|
Intent snoozeIntent = new Intent(context, SnoozeActivity.class);
|
|
|
|
Intent snoozeIntent = SnoozeActivity.newIntent(context, id);
|
|
|
|
snoozeIntent.setFlags(FLAG_ACTIVITY_NEW_TASK);
|
|
|
|
|
|
|
|
snoozeIntent.putExtra(SnoozeActivity.EXTRA_TASK_ID, id);
|
|
|
|
|
|
|
|
PendingIntent snoozePendingIntent =
|
|
|
|
PendingIntent snoozePendingIntent =
|
|
|
|
PendingIntent.getActivity(
|
|
|
|
PendingIntent.getActivity(
|
|
|
|
context, (int) id, snoozeIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
|
|
|
context, (int) id, snoozeIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
|
|
|
@ -422,10 +418,8 @@ public class NotificationManager {
|
|
|
|
wearableExtender.addAction(completeAction);
|
|
|
|
wearableExtender.addAction(completeAction);
|
|
|
|
for (final SnoozeOption snoozeOption : SnoozeDialog.getSnoozeOptions(preferences)) {
|
|
|
|
for (final SnoozeOption snoozeOption : SnoozeDialog.getSnoozeOptions(preferences)) {
|
|
|
|
final long timestamp = snoozeOption.getDateTime().getMillis();
|
|
|
|
final long timestamp = snoozeOption.getDateTime().getMillis();
|
|
|
|
Intent wearableIntent = new Intent(context, SnoozeActivity.class);
|
|
|
|
Intent wearableIntent = SnoozeActivity.newIntent(context, id);
|
|
|
|
wearableIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
|
|
|
|
|
|
wearableIntent.setAction(String.format("snooze-%s-%s", id, timestamp));
|
|
|
|
wearableIntent.setAction(String.format("snooze-%s-%s", id, timestamp));
|
|
|
|
wearableIntent.putExtra(SnoozeActivity.EXTRA_TASK_ID, id);
|
|
|
|
|
|
|
|
wearableIntent.putExtra(SnoozeActivity.EXTRA_SNOOZE_TIME, timestamp);
|
|
|
|
wearableIntent.putExtra(SnoozeActivity.EXTRA_SNOOZE_TIME, timestamp);
|
|
|
|
PendingIntent wearablePendingIntent =
|
|
|
|
PendingIntent wearablePendingIntent =
|
|
|
|
PendingIntent.getActivity(
|
|
|
|
PendingIntent.getActivity(
|
|
|
|
|