From 85d718cb0735de9069673fbf9834fa64459c2178 Mon Sep 17 00:00:00 2001 From: Mihai Preda Date: Fri, 2 Oct 2009 18:31:10 +0200 Subject: [PATCH] MessageCompose: quote plain-text body if available, otherwise quote HTML body. Bug 2082852. --- src/com/android/email/activity/MessageCompose.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/android/email/activity/MessageCompose.java b/src/com/android/email/activity/MessageCompose.java index 9373394ed..18d121589 100644 --- a/src/com/android/email/activity/MessageCompose.java +++ b/src/com/android/email/activity/MessageCompose.java @@ -1235,7 +1235,11 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus // used by processSourceMessage() private void displayQuotedText(String textBody, String htmlBody) { - boolean plainTextFlag = htmlBody == null; + /* Use plain-text body if available, otherwise use HTML body. + * This matches the desired behavior for IMAP/POP where we only send plain-text, + * and for EAS which sends HTML and has no plain-text body. + */ + boolean plainTextFlag = textBody != null; String text = plainTextFlag ? textBody : htmlBody; if (text != null) { text = plainTextFlag ? EmailHtmlUtil.escapeCharacterToDisplay(text) : text;