diff options
author | Tony Mantler <nicoya@google.com> | 2013-12-03 11:22:56 -0800 |
---|---|---|
committer | Tony Mantler <nicoya@google.com> | 2013-12-03 13:21:05 -0800 |
commit | a954f9914a8fc6c65587db4f1d4660d60319d909 (patch) | |
tree | 6614e07db2fd35268e5b84a743701438bf1bccea /src | |
parent | a21a4643f8d5f4818cccc9620d094f1518fe07e4 (diff) | |
download | android_packages_apps_UnifiedEmail-a954f9914a8fc6c65587db4f1d4660d60319d909.tar.gz android_packages_apps_UnifiedEmail-a954f9914a8fc6c65587db4f1d4660d60319d909.tar.bz2 android_packages_apps_UnifiedEmail-a954f9914a8fc6c65587db4f1d4660d60319d909.zip |
Use "Re: (no subject)" when replying to an email with no subject
b/11810597
Change-Id: I5e608cb1109c88b12189d2d19b7fe787c498acf8
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/mail/compose/ComposeActivity.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/com/android/mail/compose/ComposeActivity.java b/src/com/android/mail/compose/ComposeActivity.java index 720ab35e9..2945f29cd 100644 --- a/src/com/android/mail/compose/ComposeActivity.java +++ b/src/com/android/mail/compose/ComposeActivity.java @@ -1899,9 +1899,10 @@ public class ComposeActivity extends Activity implements OnClickListener, OnNavi * Returns a formatted subject string with the appropriate prefix for the action type. * E.g., "FWD: " is prepended if action is {@link ComposeActivity#FORWARD}. */ - public static String buildFormattedSubject(Resources res, String subject, int action) { - String prefix; - String correctedSubject = null; + public static String buildFormattedSubject(final Resources res, final String subject, + final int action) { + final String prefix; + final String correctedSubject; if (action == ComposeActivity.COMPOSE) { prefix = ""; } else if (action == ComposeActivity.FORWARD) { @@ -1915,8 +1916,12 @@ public class ComposeActivity extends Activity implements OnClickListener, OnNavi && subject.toLowerCase().startsWith(prefix.toLowerCase())) { correctedSubject = subject; } else { - correctedSubject = String.format( - res.getString(R.string.formatted_subject), prefix, subject); + final String subjectOrNoSubject = TextUtils.isEmpty(subject) ? + res.getString(R.string.no_subject) : + subject; + + correctedSubject = + res.getString(R.string.formatted_subject, prefix, subjectOrNoSubject); } return correctedSubject; |