diff options
author | Jorge Ruesga <jorge@ruesga.com> | 2015-03-05 02:00:45 +0100 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2015-03-11 00:23:46 +0000 |
commit | c6af3409c0828ba1d35db90e9c62a772ab667a3c (patch) | |
tree | fe7b70eb6704e96588ebd1b12ce0702651cf2a9c | |
parent | cd6ab96730f4d0a3040d4280fc3a55d64c76df51 (diff) | |
download | android_packages_apps_UnifiedEmail-c6af3409c0828ba1d35db90e9c62a772ab667a3c.tar.gz android_packages_apps_UnifiedEmail-c6af3409c0828ba1d35db90e9c62a772ab667a3c.tar.bz2 android_packages_apps_UnifiedEmail-c6af3409c0828ba1d35db90e9c62a772ab667a3c.zip |
unified email: prefer account display name to sender name
When users have multiple email account defines, it makes more sense
to have the account name rather than the sender
name, which is in most is the case the user itself. The vast majority
of the user known its name, so the account
name becomes a more useful information to display.
Change-Id: I866c55acc3b3b666d677b4243044c91abd0d7124
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
-rw-r--r-- | src/com/android/mail/ui/AccountItemView.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/android/mail/ui/AccountItemView.java b/src/com/android/mail/ui/AccountItemView.java index 74b02455e..a6bdedb83 100644 --- a/src/com/android/mail/ui/AccountItemView.java +++ b/src/com/android/mail/ui/AccountItemView.java @@ -70,15 +70,15 @@ public class AccountItemView extends LinearLayout { */ public void bind(final Context context, final Account account, final boolean isCurrentAccount, final BitmapCache imagesCache, final ContactResolver contactResolver) { - if (!TextUtils.isEmpty(account.getSenderName())) { - mAccountDisplayName.setText(account.getSenderName()); - mAccountAddress.setText(account.getEmailAddress()); - mAccountAddress.setVisibility(View.VISIBLE); - } else if (!TextUtils.isEmpty(account.getDisplayName()) && + if (!TextUtils.isEmpty(account.getDisplayName()) && !TextUtils.equals(account.getDisplayName(), account.getEmailAddress())) { mAccountDisplayName.setText(account.getDisplayName()); mAccountAddress.setText(account.getEmailAddress()); mAccountAddress.setVisibility(View.VISIBLE); + } else if (!TextUtils.isEmpty(account.getSenderName())) { + mAccountDisplayName.setText(account.getSenderName()); + mAccountAddress.setText(account.getEmailAddress()); + mAccountAddress.setVisibility(View.VISIBLE); } else { mAccountDisplayName.setText(account.getEmailAddress()); mAccountAddress.setVisibility(View.GONE); |