Handle possible NPE in MessageListItem

* I don't know how the timestamp can be zero for a message, but we
  shouldn't crash, and it's late for adding new localizable text

Bug: 5410814
Change-Id: Idf1c8b0d4c0b7e0e2b2466643ea52e5244d1bb5f
This commit is contained in:
Marc Blank 2011-10-04 13:01:15 -07:00
parent 35d92429af
commit bcf5d5825f
1 changed files with 3 additions and 1 deletions

View File

@ -134,7 +134,9 @@ public class MessageListItem extends View {
private Drawable mWideUnreadSelector;
private CharSequence mFormattedSender;
private CharSequence mFormattedDate;
// We must initialize this to something, in case the timestamp of the message is zero (which
// should be very rare); this is otherwise set in setTimestamp
private CharSequence mFormattedDate = "";
private void init(Context context) {
mContext = context;