Merge "b/14075613. Treat empty strings the same as null strings." into ub-mail-master

This commit is contained in:
Anthony Lee 2014-04-22 21:21:48 +00:00 committed by Android (Google) Code Review
commit 1355b30577
1 changed files with 2 additions and 2 deletions

View File

@ -367,11 +367,11 @@ public class Rfc822Output {
throws IOException {
boolean html = false;
String text = bodyText[INDEX_BODY_TEXT];
if (text == null) {
if (TextUtils.isEmpty(text)) {
text = bodyText[INDEX_BODY_HTML];
html = true;
}
if (text == null) {
if (TextUtils.isEmpty(text)) {
writer.write("\r\n"); // a truly empty message
} else {
// first multipart element is the body