Merge "Refresh the UI after destructive notification actions" into jb-ub-mail-ur8
diff --git a/src/com/android/mail/providers/UIProvider.java b/src/com/android/mail/providers/UIProvider.java
index 8e8d49c..9b0b6cb 100644
--- a/src/com/android/mail/providers/UIProvider.java
+++ b/src/com/android/mail/providers/UIProvider.java
@@ -1915,6 +1915,12 @@
// Parameter used to indicate the sequence number for an undoable operation
public static final String SEQUENCE_QUERY_PARAMETER = "seq";
+ /**
+ * Parameter used to force UI notifications in an operation involving
+ * {@link ConversationOperations#OPERATION_KEY}.
+ */
+ public static final String FORCE_UI_NOTIFICATIONS_QUERY_PARAMETER = "forceUiNotifications";
+
public static final String AUTO_ADVANCE_MODE_OLDER = "older";
public static final String AUTO_ADVANCE_MODE_NEWER = "newer";
public static final String AUTO_ADVANCE_MODE_LIST = "list";
diff --git a/src/com/android/mail/utils/NotificationActionUtils.java b/src/com/android/mail/utils/NotificationActionUtils.java
index 5d6ae1b..f0aaf9d 100644
--- a/src/com/android/mail/utils/NotificationActionUtils.java
+++ b/src/com/android/mail/utils/NotificationActionUtils.java
@@ -678,7 +678,8 @@
final Folder folder = notificationAction.getFolder();
final ContentResolver contentResolver = context.getContentResolver();
- final Uri uri = conversation.uri;
+ final Uri uri = conversation.uri.buildUpon().appendQueryParameter(
+ UIProvider.FORCE_UI_NOTIFICATIONS_QUERY_PARAMETER, Boolean.TRUE.toString()).build();
switch (destructAction) {
case ARCHIVE_REMOVE_LABEL: {