b/14075613. Treat empty strings the same as null strings.
Found this issue when addressing the root problem for this bug and testing with various mixes of text and html content in emails. Change-Id: I875fd9fac85b07484c27db383e3ac4a3cb935ee6
This commit is contained in:
parent
7e4d99c6d4
commit
dc6bb6aa41
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue