From a00eb291f1428a9aaf3eb9becb60f59ebf8598a8 Mon Sep 17 00:00:00 2001 From: Mihai Preda Date: Fri, 5 Jun 2009 11:36:17 -0700 Subject: [PATCH] AI 149607: Add relevant title to attachment file chooser. Delete the original source message only when the message is in Drafts folder. If the original message is in the other folder than Drafts, it should be retained. Integrates 149194,149306,149459 from DocomoEmail. BUG=1860250,1887835 Automated import of CL 149607 --- res/values/strings.xml | 2 ++ src/com/android/email/activity/MessageCompose.java | 11 +++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index d5d489481..5cc749069 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -80,6 +80,8 @@ Add attachment Dump settings + + Choose attachment Account options diff --git a/src/com/android/email/activity/MessageCompose.java b/src/com/android/email/activity/MessageCompose.java index 0734261e2..7f823c1ec 100644 --- a/src/com/android/email/activity/MessageCompose.java +++ b/src/com/android/email/activity/MessageCompose.java @@ -713,11 +713,12 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus else { /* * Send the message - * TODO Is it possible for us to be editing a draft with a null source message? Don't - * think so. Could probably remove below check. + * If the source message is in other folder than draft, it should not be deleted while + * sending message. */ if (ACTION_EDIT_DRAFT.equals(getIntent().getAction()) - && mSourceMessageUid != null) { + && mSourceMessageUid != null + && mFolder.equals(mAccount.getDraftsFolderName())) { /* * We're sending a previously saved draft, so delete the old draft first. */ @@ -785,7 +786,9 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus Intent i = new Intent(Intent.ACTION_GET_CONTENT); i.addCategory(Intent.CATEGORY_OPENABLE); i.setType(Email.ACCEPTABLE_ATTACHMENT_SEND_TYPES[0]); - startActivityForResult(Intent.createChooser(i, null), ACTIVITY_REQUEST_PICK_ATTACHMENT); + startActivityForResult( + Intent.createChooser(i, getString(R.string.choose_attachment_dialog_title)), + ACTIVITY_REQUEST_PICK_ATTACHMENT); } private void addAttachment(Uri uri) {