summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJorge Ruesga <jorge@ruesga.com>2015-03-05 02:00:45 +0100
committerSteve Kondik <steve@cyngn.com>2015-10-18 14:12:04 -0700
commit3b72434f4a121488cba607df620d3d75b3b1ac25 (patch)
treedd35f517da9ef4bb95e5c594220eecb0128c14cc /src
parent05ee01bff41081aea1d0a69925dbff74f26d6dca (diff)
downloadandroid_packages_apps_UnifiedEmail-3b72434f4a121488cba607df620d3d75b3b1ac25.tar.gz
android_packages_apps_UnifiedEmail-3b72434f4a121488cba607df620d3d75b3b1ac25.tar.bz2
android_packages_apps_UnifiedEmail-3b72434f4a121488cba607df620d3d75b3b1ac25.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>
Diffstat (limited to 'src')
-rw-r--r--src/com/android/mail/ui/AccountItemView.java10
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 5b87f7edf..69a9457f6 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);