Fix possible NPE for messages with no subjects
Bug: 5038097 Change-Id: I0952158017c0d512998f423ecd38722a5b6b8afc
This commit is contained in:
parent
9c3741640b
commit
7f876c0375
@ -16,9 +16,6 @@
|
||||
|
||||
package com.android.email.activity;
|
||||
|
||||
import com.android.email.R;
|
||||
import com.android.emailcommon.utility.TextUtilities;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
@ -42,6 +39,10 @@ import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.accessibility.AccessibilityEvent;
|
||||
|
||||
import com.android.email.R;
|
||||
import com.android.emailcommon.utility.TextUtilities;
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
/**
|
||||
* This custom View is the list item for the MessageList activity, and serves two purposes:
|
||||
* 1. It's a container to store message metadata (e.g. the ids of the message, mailbox, & account)
|
||||
@ -185,7 +186,7 @@ public class MessageListItem extends View {
|
||||
* Sets message subject safely, ensuring the cache is invalidated.
|
||||
*/
|
||||
public void setSubject(String subject) {
|
||||
if (!subject.equals(mSubject)) {
|
||||
if (!Objects.equal(mSubject, subject)) {
|
||||
mSubject = subject;
|
||||
mSubjectAndDescription = null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user