From e224017d69630c3b3aea2667e26ab91bb9ecc0be Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 15 Jun 2015 11:23:20 -0700 Subject: Fix abundance of "Custom" labels. Not sure precisely why this changed, but hopefully this logic is more robust. Show the geocoded location if there is no name to use and a location is available. Removed GEOCODE_AS_LABEL, which wasn't really used anymore. Bug: 21814339 Change-Id: I1343282ef415647853d7995d900a3f50186ad156 --- src/com/android/dialer/PhoneCallDetailsHelper.java | 6 +++--- src/com/android/dialer/calllog/ContactInfo.java | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src/com/android/dialer') diff --git a/src/com/android/dialer/PhoneCallDetailsHelper.java b/src/com/android/dialer/PhoneCallDetailsHelper.java index c8206227a..68b47afcf 100644 --- a/src/com/android/dialer/PhoneCallDetailsHelper.java +++ b/src/com/android/dialer/PhoneCallDetailsHelper.java @@ -181,11 +181,11 @@ public class PhoneCallDetailsHelper { && !mPhoneNumberUtilsWrapper.isVoicemailNumber(details.accountHandle, details.number)) { - if (details.numberLabel == ContactInfo.GEOCODE_AS_LABEL) { + if (TextUtils.isEmpty(details.name) && !TextUtils.isEmpty(details.geocode)) { numberFormattedLabel = details.geocode; } else { - numberFormattedLabel = Phone.getTypeLabel(mResources, details.numberType, - details.numberLabel); + numberFormattedLabel = Phone.getTypeLabel( + mResources, details.numberType, details.numberLabel); } } diff --git a/src/com/android/dialer/calllog/ContactInfo.java b/src/com/android/dialer/calllog/ContactInfo.java index effe14270..357c832cf 100644 --- a/src/com/android/dialer/calllog/ContactInfo.java +++ b/src/com/android/dialer/calllog/ContactInfo.java @@ -48,8 +48,6 @@ public class ContactInfo { public static ContactInfo EMPTY = new ContactInfo(); - public static String GEOCODE_AS_LABEL = ""; - public int sourceType = 0; @Override -- cgit v1.2.3