Don't display Custom for PHONE_TYPE=CUSTOM part 2.
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: Ie65a40fea3c857b7a65ee82a22c8cd1465225781
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java
index 5bfbd10..8e03fc6 100644
--- a/src/com/android/contacts/quickcontact/QuickContactActivity.java
+++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java
@@ -1477,7 +1477,9 @@
if (phone.hasKindTypeColumn(kind)) {
text = Phone.getTypeLabel(res, phone.getKindTypeColumn(kind),
phone.getLabel()).toString();
- primaryContentDescription.append(text).append(" ");
+ if (!TextUtils.isEmpty(text)) {
+ primaryContentDescription.append(text).append(" ");
+ }
}
primaryContentDescription.append(header);
icon = res.getDrawable(R.drawable.ic_phone_24dp);