am eeb5b9d0: am 0f4595af: am 4ccf69e1: Merge "Don\'t display Custom for PHONE_TYPE=CUSTOM part 1." into mnc-dev

* commit 'eeb5b9d06e6ddb83749771a497e03547851d0ea0':
  Don't display Custom for PHONE_TYPE=CUSTOM part 1.
This commit is contained in:
Tingting Wang
2015-07-08 20:47:05 +00:00
committed by Android Git Automerger

View File

@@ -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);