Revert "Messaging: Add "Mark as read" quick action for message notifications"

This reverts commit f19e916a0d.

Reason for revert: Reverting per Taesu Lee's comments, because it doesn't work and has issues.

Change-Id: I778362b628f4c3ae076dd943e77dee415984fba0
This commit is contained in:
Raman Tenneti
2020-05-19 18:29:03 +00:00
parent 3de360b933
commit eb1e0417eb
8 changed files with 4 additions and 85 deletions

View File

@@ -833,8 +833,7 @@ public class BugleNotifications {
maybeAddWearableConversationLog(wearableExtender,
(MultiMessageNotificationState) notificationState);
addDownloadMmsAction(notifBuilder, wearableExtender, notificationState);
addReplyAction(notifBuilder, wearableExtender, notificationState);
addReadAction(notifBuilder, wearableExtender, notificationState);
addWearableVoiceReplyAction(wearableExtender, notificationState);
}
// Apply the wearable options and build & post the notification
@@ -876,7 +875,7 @@ public class BugleNotifications {
}
}
private static void addReplyAction(final NotificationCompat.Builder notifBuilder,
private static void addWearableVoiceReplyAction(
final WearableExtender wearableExtender, final NotificationState notificationState) {
if (!(notificationState instanceof MultiMessageNotificationState)) {
return;
@@ -913,25 +912,9 @@ public class BugleNotifications {
setChoices(choices)
.build();
actionBuilder.addRemoteInput(remoteInput);
notifBuilder.addAction(actionBuilder.build());
// Support the action on a wearable device as well
wearableExtender.addAction(actionBuilder.build());
}
private static void addReadAction(final NotificationCompat.Builder notifBuilder,
final WearableExtender wearableExtender, final NotificationState notificationState) {
final Context context = Factory.get().getApplicationContext();
final PendingIntent readPendingIntent = notificationState.getReadIntent();
final NotificationCompat.Action.Builder readActionBuilder =
new NotificationCompat.Action.Builder(R.drawable.ic_wear_read,
context.getString(R.string.notification_mark_as_read), readPendingIntent);
notifBuilder.addAction(readActionBuilder.build());
// Support the action on a wearable device as well
wearableExtender.addAction(readActionBuilder.build());
}
private static void addDownloadMmsAction(final NotificationCompat.Builder notifBuilder,
final WearableExtender wearableExtender, final NotificationState notificationState) {
if (!(notificationState instanceof MultiMessageNotificationState)) {