From c7636b8a47b39a482414cf7a9695846956add963 Mon Sep 17 00:00:00 2001 From: Paul Westbrook Date: Mon, 5 Nov 2012 13:33:12 -0800 Subject: [PATCH] Add support to suppressing undo in Email Bug: 7465798 Change-Id: I5f07b7821bb72ef8c0766da82d335792b010a11c --- .../android/email/provider/EmailProvider.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/com/android/email/provider/EmailProvider.java b/src/com/android/email/provider/EmailProvider.java index 44bef775c..49e94378d 100644 --- a/src/com/android/email/provider/EmailProvider.java +++ b/src/com/android/email/provider/EmailProvider.java @@ -4080,12 +4080,16 @@ outer: if (undoValues == null || undoValues.size() == 0) { return -1; } - ContentProviderOperation op = - ContentProviderOperation.newUpdate(convertToEmailProviderUri( - uri, ourBaseUri, false)) - .withValues(undoValues) - .build(); - addToSequence(uri, op); + final Boolean suppressUndo = + values.getAsBoolean(UIProvider.ConversationOperations.Parameters.SUPPRESS_UNDO); + if (suppressUndo == null || !suppressUndo.booleanValue()) { + final ContentProviderOperation op = + ContentProviderOperation.newUpdate(convertToEmailProviderUri( + uri, ourBaseUri, false)) + .withValues(undoValues) + .build(); + addToSequence(uri, op); + } return update(ourUri, ourValues, null, null); }