|
|
|
@ -97,7 +97,6 @@ public class Notifier {
|
|
|
|
builder.setLargeIcon(contactImage);
|
|
|
|
builder.setLargeIcon(contactImage);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (preferences.useNotificationActions()) {
|
|
|
|
|
|
|
|
Intent callNow = new Intent(context, MissedCallActivity.class);
|
|
|
|
Intent callNow = new Intent(context, MissedCallActivity.class);
|
|
|
|
callNow.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
|
|
callNow.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
|
|
callNow.putExtra(MissedCallActivity.EXTRA_NUMBER, number);
|
|
|
|
callNow.putExtra(MissedCallActivity.EXTRA_NUMBER, number);
|
|
|
|
@ -114,7 +113,6 @@ public class Notifier {
|
|
|
|
builder
|
|
|
|
builder
|
|
|
|
.addAction(R.drawable.ic_phone_white_24dp, context.getString(R.string.MCA_return_call), PendingIntent.getActivity(context, callNow.hashCode(), callNow, PendingIntent.FLAG_UPDATE_CURRENT))
|
|
|
|
.addAction(R.drawable.ic_phone_white_24dp, context.getString(R.string.MCA_return_call), PendingIntent.getActivity(context, callNow.hashCode(), callNow, PendingIntent.FLAG_UPDATE_CURRENT))
|
|
|
|
.addAction(R.drawable.ic_add_white_24dp, context.getString(R.string.MCA_add_task), PendingIntent.getActivity(context, callLater.hashCode(), callLater, PendingIntent.FLAG_UPDATE_CURRENT));
|
|
|
|
.addAction(R.drawable.ic_add_white_24dp, context.getString(R.string.MCA_add_task), PendingIntent.getActivity(context, callLater.hashCode(), callLater, PendingIntent.FLAG_UPDATE_CURRENT));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
activateNotification(1, number.hashCode(), builder.build(), null);
|
|
|
|
activateNotification(1, number.hashCode(), builder.build(), null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -248,10 +246,9 @@ public class Notifier {
|
|
|
|
.setLights(preferences.getLEDColor(), preferences.isLEDNotificationEnabled() ? 700 : 0, 5000)
|
|
|
|
.setLights(preferences.getLEDColor(), preferences.isLEDNotificationEnabled() ? 700 : 0, 5000)
|
|
|
|
.setPriority(preferences.getNotificationPriority())
|
|
|
|
.setPriority(preferences.getNotificationPriority())
|
|
|
|
.setContentIntent(PendingIntent.getActivity(context, (int) id, intent, PendingIntent.FLAG_UPDATE_CURRENT));
|
|
|
|
.setContentIntent(PendingIntent.getActivity(context, (int) id, intent, PendingIntent.FLAG_UPDATE_CURRENT));
|
|
|
|
if (!Strings.isNullOrEmpty(taskDescription) && preferences.getBoolean(R.string.p_rmd_show_description, true)) {
|
|
|
|
if (!Strings.isNullOrEmpty(taskDescription)) {
|
|
|
|
builder.setStyle(new NotificationCompat.BigTextStyle().bigText(taskDescription));
|
|
|
|
builder.setStyle(new NotificationCompat.BigTextStyle().bigText(taskDescription));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (preferences.useNotificationActions()) {
|
|
|
|
|
|
|
|
Intent completeIntent = new Intent(context, CompleteTaskReceiver.class);
|
|
|
|
Intent completeIntent = new Intent(context, CompleteTaskReceiver.class);
|
|
|
|
completeIntent.putExtra(CompleteTaskReceiver.TASK_ID, id);
|
|
|
|
completeIntent.putExtra(CompleteTaskReceiver.TASK_ID, id);
|
|
|
|
PendingIntent completePendingIntent = PendingIntent.getBroadcast(context, (int) id, completeIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
|
|
|
PendingIntent completePendingIntent = PendingIntent.getBroadcast(context, (int) id, completeIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
|
|
|
@ -282,7 +279,6 @@ public class Notifier {
|
|
|
|
builder.addAction(completeAction)
|
|
|
|
builder.addAction(completeAction)
|
|
|
|
.addAction(R.drawable.ic_snooze_white_24dp, context.getResources().getString(R.string.rmd_NoA_snooze), snoozePendingIntent)
|
|
|
|
.addAction(R.drawable.ic_snooze_white_24dp, context.getResources().getString(R.string.rmd_NoA_snooze), snoozePendingIntent)
|
|
|
|
.extend(wearableExtender);
|
|
|
|
.extend(wearableExtender);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
activateNotification(ringTimes, (int) id, builder.build(), taskTitle);
|
|
|
|
activateNotification(ringTimes, (int) id, builder.build(), taskTitle);
|
|
|
|
|
|
|
|
|
|
|
|
|