From 85d2190552d05dbc06518bdc21674c6aabeb583b Mon Sep 17 00:00:00 2001 From: Martin Hibdon Date: Mon, 14 Oct 2013 17:40:44 -0700 Subject: [PATCH] Clear all "drafts" related flags from email when sending b/11224331 Change-Id: I1df8ea3e0e24b050cd391dea454124e06988bf7d --- src/com/android/email/provider/EmailProvider.java | 2 +- src/com/android/email/service/EmailServiceStub.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/com/android/email/provider/EmailProvider.java b/src/com/android/email/provider/EmailProvider.java index ba24ac1dc..a9bdbff5b 100644 --- a/src/com/android/email/provider/EmailProvider.java +++ b/src/com/android/email/provider/EmailProvider.java @@ -2221,7 +2221,7 @@ public class EmailProvider extends ContentProvider { private static final String MESSAGE_DRAFT_TYPE = "CASE WHEN (" + MessageColumns.FLAGS + "&" + Message.FLAG_TYPE_ORIGINAL + ") !=0 THEN " + UIProvider.DraftType.COMPOSE + - " WHEN (" + MessageColumns.FLAGS + "&" + (1<<20) + + " WHEN (" + MessageColumns.FLAGS + "&" + Message.FLAG_TYPE_REPLY_ALL + ") !=0 THEN " + UIProvider.DraftType.REPLY_ALL + " WHEN (" + MessageColumns.FLAGS + "&" + Message.FLAG_TYPE_REPLY + ") !=0 THEN " + UIProvider.DraftType.REPLY + diff --git a/src/com/android/email/service/EmailServiceStub.java b/src/com/android/email/service/EmailServiceStub.java index 3a7383fc2..8de7e66db 100644 --- a/src/com/android/email/service/EmailServiceStub.java +++ b/src/com/android/email/service/EmailServiceStub.java @@ -63,6 +63,7 @@ import com.android.emailcommon.service.SearchParams; import com.android.emailcommon.utility.AttachmentUtilities; import com.android.emailcommon.utility.Utility; import com.android.mail.providers.UIProvider; +import com.android.mail.providers.UIProvider.DraftType; import com.android.mail.utils.LogUtils; import java.util.HashSet; @@ -552,7 +553,10 @@ public abstract class EmailServiceStub extends IEmailService.Stub implements IEm messageId); } final int flags = msg.mFlags & ~(EmailContent.Message.FLAG_TYPE_REPLY | - EmailContent.Message.FLAG_TYPE_FORWARD); + EmailContent.Message.FLAG_TYPE_FORWARD | + EmailContent.Message.FLAG_TYPE_REPLY_ALL | + EmailContent.Message.FLAG_TYPE_ORIGINAL); + moveToSentValues.put(EmailContent.MessageColumns.FLAGS, flags); resolver.update(syncedUri, moveToSentValues, null, null); } else {