summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-06-15 11:23:20 -0700
committerAndrew Lee <anwlee@google.com>2015-06-15 13:16:11 -0700
commite224017d69630c3b3aea2667e26ab91bb9ecc0be (patch)
treeda0b64aee475a9d7ec0792e79546e7f2c90dca6e /src
parentaf049afaef6c2ca581be4214b8d9494117beb48c (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/PhoneCallDetailsHelper.java6
-rw-r--r--src/com/android/dialer/calllog/ContactInfo.java2
2 files changed, 3 insertions, 5 deletions
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