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

Commit 9fa8987d authored by Gary Mai's avatar Gary Mai
Browse files

Don't render account name for device and sim

In the raw contact selector, ignore account name for
DeviceLocalAccountType and SimAccountType since they don't have
good renderable names.

Test:
Manually checked drop down for linked contacts that contain
Device and Sim accounts.

Bug: 31544599
Change-Id: I37db95e585077d1f2a37474705b4a5ed645804b6
parent 2cc6a2fe
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -63,6 +63,8 @@ import com.android.contacts.common.model.account.AccountDisplayInfo;
import com.android.contacts.common.model.account.AccountDisplayInfoFactory;
import com.android.contacts.common.model.account.AccountType;
import com.android.contacts.common.model.account.AccountWithDataSet;
import com.android.contacts.common.model.account.DeviceLocalAccountType;
import com.android.contacts.common.model.account.SimAccountType;
import com.android.contacts.common.model.dataitem.DataKind;
import com.android.contacts.common.util.AccountsListAdapter;
import com.android.contacts.common.util.MaterialColorMapUtils;
@@ -165,7 +167,8 @@ public class CompactRawContactsEditorView extends LinearLayout implements View.O

            final TextView text2 = (TextView) resultView.findViewById(android.R.id.text2);
            final String accountName = rawContactDelta.getAccountName();
            if (TextUtils.isEmpty(accountName)) {
            if (TextUtils.isEmpty(accountName) || accountType instanceof DeviceLocalAccountType
                    || accountType instanceof SimAccountType) {
                text2.setVisibility(View.GONE);
            } else {
                // Truncate email addresses in the middle so we don't lose the domain