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

Commit d55b348e authored by Tingting Wang's avatar Tingting Wang
Browse files

Don't display Custom for PHONE_TYPE=CUSTOM part 1.

Dialer sometimes creates custom PHONE_TYPE values without
specifying the custom string. In this case, we shouldn't
display "Custom". We should display nothing.

BUG 21900262

Change-Id: I11aff369c76126a3f60f95aa589ae2a8a3e98bb1
parent 024bce82
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -5957,7 +5957,9 @@ public final class ContactsContract {
             */
            public static final CharSequence getTypeLabel(Resources res, int type,
                    CharSequence label) {
                if ((type == TYPE_CUSTOM || type == TYPE_ASSISTANT) && !TextUtils.isEmpty(label)) {
                if (type == TYPE_CUSTOM) {
                    return (label != null ? label : "");
                } else if (type == TYPE_ASSISTANT && !TextUtils.isEmpty(label)) {
                    return label;
                } else {
                    final int labelRes = getTypeLabelResource(type);