Merge "Avoid NPE when subject/snippet are null."

This commit is contained in:
Ben Komalo 2011-08-08 11:30:38 -07:00 committed by Android (Google) Code Review
commit e9dad11e1a

View File

@ -190,11 +190,11 @@ public class MessageListItem extends View {
if (!Objects.equal(mSnippet, snippet)) {
mSnippet = snippet;
mSnippetLineCount = MessageListItem.NEEDS_LAYOUT;
mSnippetLineCount = NEEDS_LAYOUT;
changed = true;
}
if (changed) {
if (changed || (mSubject == null && mSnippet == null) /* first time */) {
SpannableStringBuilder ssb = new SpannableStringBuilder();
boolean hasSubject = false;
if (!TextUtils.isEmpty(mSubject)) {