summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJin Cao <jinyan@google.com>2014-10-14 19:11:07 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-10-14 19:11:08 +0000
commit3f7ed0b4efd466a0acbb30a87e06a78cb94efc02 (patch)
treef752c44492e6d387aef33987a0432cfb89620ed9 /src
parent1e550a0f91e1050d124a6713b89b82c641281705 (diff)
parent0d9a37e03c2b4cb0329863a97e4ce52c1a2c5a44 (diff)
downloadandroid_packages_apps_UnifiedEmail-3f7ed0b4efd466a0acbb30a87e06a78cb94efc02.tar.gz
android_packages_apps_UnifiedEmail-3f7ed0b4efd466a0acbb30a87e06a78cb94efc02.tar.bz2
android_packages_apps_UnifiedEmail-3f7ed0b4efd466a0acbb30a87e06a78cb94efc02.zip
Merge "Fix html conversion failure check to use trim" into ub-gmail-ur14-dev
Diffstat (limited to 'src')
-rw-r--r--src/com/android/mail/compose/ComposeActivity.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/mail/compose/ComposeActivity.java b/src/com/android/mail/compose/ComposeActivity.java
index 84de483a9..b7bab7546 100644
--- a/src/com/android/mail/compose/ComposeActivity.java
+++ b/src/com/android/mail/compose/ComposeActivity.java
@@ -1139,7 +1139,8 @@ public class ComposeActivity extends ActionBarActivity
message.bodyText = body.toString();
// Fallback to use the text version if html conversion fails for whatever the reason.
final String htmlInPlainText = Utils.convertHtmlToPlainText(message.bodyHtml);
- if (!TextUtils.isEmpty(message.bodyText) && TextUtils.isEmpty(htmlInPlainText)) {
+ if (message.bodyText != null && message.bodyText.trim().length() > 0 &&
+ TextUtils.isEmpty(htmlInPlainText)) {
LogUtils.w(LOG_TAG, "FAILED HTML CONVERSION: from %d to %d", message.bodyText.length(),
htmlInPlainText.length());
Analytics.getInstance().sendEvent("errors", "failed_html_conversion", null, 0);