diff options
author | Tingting Wang <tingtingw@google.com> | 2015-07-17 22:42:25 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-07-17 22:42:25 +0000 |
commit | ff786de2e583c000e86fdc577270a46ae499ef65 (patch) | |
tree | 8c268b19c5eccd7b412fd70adb32abf441c00050 | |
parent | e386f71ca4b0a014ecdeb0029f38f022b600b19f (diff) | |
parent | 160bf5ee1bc67218feafce9868661f580b19bbdc (diff) | |
download | packages_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.java | 9 |
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(" "); } } |