summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTingting Wang <tingtingw@google.com>2015-07-17 22:42:25 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-07-17 22:42:25 +0000
commitff786de2e583c000e86fdc577270a46ae499ef65 (patch)
tree8c268b19c5eccd7b412fd70adb32abf441c00050
parente386f71ca4b0a014ecdeb0029f38f022b600b19f (diff)
parent160bf5ee1bc67218feafce9868661f580b19bbdc (diff)
downloadpackages_apps_Contacts-ff786de2e583c000e86fdc577270a46ae499ef65.tar.gz
packages_apps_Contacts-ff786de2e583c000e86fdc577270a46ae499ef65.tar.bz2
packages_apps_Contacts-ff786de2e583c000e86fdc577270a46ae499ef65.zip
am 160bf5ee: am cfe1edfc: am 01b37680: Don\'t display "CUSTOM" when PHONE_TYPE == "CUSTOM" and no label set.
* commit '160bf5ee1bc67218feafce9868661f580b19bbdc': Don't display "CUSTOM" when PHONE_TYPE == "CUSTOM" and no label set.
-rw-r--r--src/com/android/contacts/quickcontact/QuickContactActivity.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java
index a327d36f8..8c6f842d3 100644
--- a/src/com/android/contacts/quickcontact/QuickContactActivity.java
+++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java
@@ -1487,9 +1487,12 @@ public class QuickContactActivity extends ContactsActivity {
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(" ");
}
}