Add support to suppressing undo in Email

Bug: 7465798
Change-Id: I5f07b7821bb72ef8c0766da82d335792b010a11c
This commit is contained in:
Paul Westbrook 2012-11-05 13:33:12 -08:00
parent 2e411dc68e
commit c7636b8a47

View File

@ -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);
}