Merge "Avoid NPE when subject/snippet are null."
This commit is contained in:
commit
e9dad11e1a
@ -190,11 +190,11 @@ public class MessageListItem extends View {
|
|||||||
|
|
||||||
if (!Objects.equal(mSnippet, snippet)) {
|
if (!Objects.equal(mSnippet, snippet)) {
|
||||||
mSnippet = snippet;
|
mSnippet = snippet;
|
||||||
mSnippetLineCount = MessageListItem.NEEDS_LAYOUT;
|
mSnippetLineCount = NEEDS_LAYOUT;
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changed) {
|
if (changed || (mSubject == null && mSnippet == null) /* first time */) {
|
||||||
SpannableStringBuilder ssb = new SpannableStringBuilder();
|
SpannableStringBuilder ssb = new SpannableStringBuilder();
|
||||||
boolean hasSubject = false;
|
boolean hasSubject = false;
|
||||||
if (!TextUtils.isEmpty(mSubject)) {
|
if (!TextUtils.isEmpty(mSubject)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user