From b4626d151c1b63a48f7a2fea104fbdb62abcbcee Mon Sep 17 00:00:00 2001 From: Andrew Stadler Date: Fri, 18 Sep 2009 22:54:30 -0700 Subject: [PATCH] Fix bug that caused Cc field to be displayed when empty. The IMAP & POP messages are being stored with cc="" instead of null, which is taken care of by testing the output of toFriendly() instead of the raw field from the DB. Change-Id: I9460e7ae098ac5cd0ccd527381ffd4e6d9defae4 --- src/com/android/email/activity/MessageView.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/android/email/activity/MessageView.java b/src/com/android/email/activity/MessageView.java index 19711989c..6a412fa5c 100644 --- a/src/com/android/email/activity/MessageView.java +++ b/src/com/android/email/activity/MessageView.java @@ -1168,8 +1168,9 @@ public class MessageView extends Activity implements OnClickListener { mTimeView.setText(mTimeFormat.format(date)); mDateView.setText(Utility.isDateToday(date) ? null : mDateFormat.format(date)); mToView.setText(Address.toFriendly(Address.unpack(message.mTo))); - mCcView.setText(Address.toFriendly(Address.unpack(message.mCc))); - mCcContainerView.setVisibility((message.mCc != null) ? View.VISIBLE : View.GONE); + String friendlyCc = Address.toFriendly(Address.unpack(message.mCc)); + mCcView.setText(friendlyCc); + mCcContainerView.setVisibility((friendlyCc != null) ? View.VISIBLE : View.GONE); mAttachmentIcon.setVisibility(message.mAttachments != null ? View.VISIBLE : View.GONE); mFavoriteIcon.setImageDrawable(message.mFlagFavorite ? mFavoriteIconOn : mFavoriteIconOff);