From a94804c49e964ffa3139c655376b9b1dc2b33a36 Mon Sep 17 00:00:00 2001 From: Todd Kennedy Date: Tue, 8 Mar 2011 09:49:50 -0800 Subject: [PATCH] Only delete attachments from drafts We should only be deleting attachments from draft messages and not all messages. bug 3489176 Change-Id: Ia1bd2894f3aabc1bfbfb36e2f5c486b47d6edf4f --- src/com/android/email/activity/MessageCompose.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/email/activity/MessageCompose.java b/src/com/android/email/activity/MessageCompose.java index 4b279a182..aa3f075a0 100644 --- a/src/com/android/email/activity/MessageCompose.java +++ b/src/com/android/email/activity/MessageCompose.java @@ -1243,7 +1243,7 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus Attachment attachment = (Attachment) attachmentView.getTag(); mAttachments.removeView(attachmentView); updateAttachmentContainer(); - if (attachment.isSaved()) { + if (attachment.mMessageKey == mDraft.mId && attachment.isSaved()) { // The following async task for deleting attachments: // - can be started multiple times in parallel (to delete multiple attachments). // - need not be interrupted on activity exit, instead should run to completion.