Merge changes Ie56161b0,I3de36411 into jb-ub-mail
* changes:
Fixup setting the correct draft type when editing a draft.
Forwards should not have the option to remove quoted text
diff --git a/src/com/android/mail/compose/ComposeActivity.java b/src/com/android/mail/compose/ComposeActivity.java
index d038a7b..9c5ec5e 100644
--- a/src/com/android/mail/compose/ComposeActivity.java
+++ b/src/com/android/mail/compose/ComposeActivity.java
@@ -527,7 +527,7 @@
message.bodyText = mBodyView.getText().toString();
message.embedsExternalResources = false;
message.refMessageId = mRefMessage != null ? mRefMessage.uri.toString() : null;
- message.draftType = mode;
+ message.draftType = getDraftType(mode);
message.appendRefMessageContent = mQuotedTextView.getQuotedTextIfIncluded() != null;
ArrayList<Attachment> attachments = mAttachmentsView.getAttachments();
message.hasAttachments = attachments != null && attachments.size() > 0;
@@ -824,7 +824,7 @@
mBodyView.setText(bodyText);
}
if (quotedTextIndex > -1 && quotedText != null) {
- mQuotedTextView.setQuotedTextFromDraft(quotedText);
+ mQuotedTextView.setQuotedTextFromDraft(quotedText, mForward);
}
}
diff --git a/src/com/android/mail/compose/QuotedTextView.java b/src/com/android/mail/compose/QuotedTextView.java
index 1966945..69c8296 100644
--- a/src/com/android/mail/compose/QuotedTextView.java
+++ b/src/com/android/mail/compose/QuotedTextView.java
@@ -294,10 +294,10 @@
allowRespondInline(true);
}
- public void setQuotedTextFromDraft(CharSequence htmlText) {
+ public void setQuotedTextFromDraft(CharSequence htmlText, boolean forward) {
setVisibility(View.VISIBLE);
setQuotedText(htmlText);
- allowQuotedText(true);
+ allowQuotedText(!forward);
// If there is quoted text, we always allow respond inline, since this
// may be a forward.
allowRespondInline(true);