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
This commit is contained in:
Mihai Preda 2009-06-05 11:36:17 -07:00 committed by The Android Open Source Project
parent 7eb313fb00
commit a00eb291f1
2 changed files with 9 additions and 4 deletions

View File

@ -80,6 +80,8 @@
<string name="add_attachment_action">Add attachment</string>
<!-- Menu item (debug screen) -->
<string name="dump_settings_action">Dump settings</string>
<!-- Appears in choose attachment dialog title -->
<string name="choose_attachment_dialog_title">Choose attachment</string>
<!-- Title of account context menu -->
<string name="accounts_context_menu_title">Account options</string>
<!-- Appears in message list view while messages are being loaded -->

View File

@ -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) {