Don't display "CUSTOM" when PHONE_TYPE == "CUSTOM" and no label set.
Check the case which PHONE_TYPE="CUSTOM" and no label set in
QuickActivity, and return empty string instead of "CUSTOM".
BUG 21900262
Change-Id: Icde2d7ec68bb2b489875b99dc6c2166d939134ea
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java
index a327d36..8c6f842 100644
--- a/src/com/android/contacts/quickcontact/QuickContactActivity.java
+++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java
@@ -1487,9 +1487,12 @@
res.getString(R.string.phoneLabelsGroup), dataItem.getMimeType(),
dataItem.getId(), dataItem.isSuperPrimary());
if (phone.hasKindTypeColumn(kind)) {
- text = Phone.getTypeLabel(res, phone.getKindTypeColumn(kind),
- phone.getLabel()).toString();
- if (!TextUtils.isEmpty(text)) {
+ final int kindTypeColumn = phone.getKindTypeColumn(kind);
+ final String label = phone.getLabel();
+ if (kindTypeColumn == Phone.TYPE_CUSTOM && TextUtils.isEmpty(label)) {
+ text = "";
+ } else {
+ text = Phone.getTypeLabel(res, kindTypeColumn, label).toString();
primaryContentDescription.append(text).append(" ");
}
}