am 5f11ba57: am ff786de2: am 160bf5ee: am cfe1edfc: am 01b37680: Don\'t display "CUSTOM" when PHONE_TYPE == "CUSTOM" and no label set.
* commit '5f11ba57273df7d4837f623447d6dd75c7cf8959':
Don't display "CUSTOM" when PHONE_TYPE == "CUSTOM" and no label set.
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(" ");
}
}