Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 350882b7 authored by Jordan Hayes's avatar Jordan Hayes
Browse files

Display Null account name as Device in drawer.

Bug:143558606
Test: Manually tested that when there is a null account, the null
account label in the drawer is "Device".

Change-Id: I93f262ec676bcb7bdcacf78863e86eb87e2bbb05
parent c5665095
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -271,16 +271,16 @@ public class DrawerAdapter extends BaseAdapter {
            result.setId(item.id);
        }
        final ContactListFilter account = item.account;
        final AccountDisplayInfo displayableAccount =
                mAccountDisplayFactory.getAccountDisplayInfoFor(item.account);
        final TextView textView = ((TextView) result.findViewById(R.id.title));
        textView.setText(account.accountName);
        textView.setText(displayableAccount.getNameLabel());
        final boolean activated = account.equals(mSelectedAccount)
                && mSelectedView == ContactsView.ACCOUNT_VIEW;
        textView.setTextAppearance(mActivity, activated
                ? TYPEFACE_STYLE_ACTIVATE : TYPEFACE_STYLE_INACTIVE);

        final ImageView icon = (ImageView) result.findViewById(R.id.icon);
        final AccountDisplayInfo displayableAccount =
                mAccountDisplayFactory.getAccountDisplayInfoFor(item.account);
        icon.setScaleType(ImageView.ScaleType.FIT_CENTER);
        icon.setImageDrawable(displayableAccount.getIcon());