When starting with a draft message, the existingdraftaccount is whatever account compose what opened with.
Fixes b/7503661 Message stuck in Drafts if I change From: address
Change-Id: I0147c4c7498dc4305d1e785a8215dda633468f05
diff --git a/src/com/android/mail/compose/ComposeActivity.java b/src/com/android/mail/compose/ComposeActivity.java
index e25b9f5..6bdaf2e 100644
--- a/src/com/android/mail/compose/ComposeActivity.java
+++ b/src/com/android/mail/compose/ComposeActivity.java
@@ -492,6 +492,13 @@
initActionBar(action);
initFromSpinner(savedInstanceState != null ? savedInstanceState : intent.getExtras(),
action);
+
+ // If this is a draft message, the draft account is whatever account was
+ // used to open the draft message in Compose.
+ if (mDraft != null) {
+ mDraftAccount = mReplyFromAccount;
+ }
+
initChangeListeners();
updateHideOrShowCcBcc();
updateHideOrShowQuotedText(showQuotedText);