Fix NPE that happens only in some unit tests

Bug: 14922410
Change-Id: Ica801e102d302e9faa7c24721b37634f1e812af3
main
Tadashi G. Takaoka 2014-05-14 18:55:14 +09:00
parent 83da26422c
commit 268bf2cdfe
1 changed files with 3 additions and 1 deletions

View File

@ -153,7 +153,9 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
textView.setText(mEmojiCategory.getCategoryLabel(categoryId));
textView.setTypeface(Typeface.DEFAULT_BOLD);
textView.setContentDescription(mEmojiCategory.getAccessibilityDescription(categoryId));
textView.setTextColor(mTabLabelColor);
if (mTabLabelColor != null) {
textView.setTextColor(mTabLabelColor);
}
tspec.setIndicator(textView);
}
host.addTab(tspec);