Gmail crashes when switching to Promotion tab
b/17534190
Recently, mHeader.styleNames usage changed.
Before: A new ArrayList was built and assigned to this field on each
pass through calculateTextsAndBitmaps.
After: It was changed to build the ArrayList once and .clear() it on
each pass.
This bug was caused by an obsolete NULL check of mHeader.styleNames
that would always be true post-change.
Change-Id: I9b794a96093027a2eee7b7c38b0452d273184968
diff --git a/src/com/android/mail/browse/ConversationItemView.java b/src/com/android/mail/browse/ConversationItemView.java
index cc5305d..223ed8a 100644
--- a/src/com/android/mail/browse/ConversationItemView.java
+++ b/src/com/android/mail/browse/ConversationItemView.java
@@ -1007,7 +1007,7 @@
sPaint.setTextSize(mCoordinates.sendersFontSize);
sPaint.setTypeface(Typeface.DEFAULT);
- if (mHeader.styledNames != null) {
+ if (!mHeader.styledNames.isEmpty()) {
final SpannableStringBuilder participantText = elideParticipants(mHeader.styledNames);
layoutParticipantText(participantText);
} else {