diff options
Diffstat (limited to 'java/com/android/dialer/calllogutils')
-rw-r--r-- | java/com/android/dialer/calllogutils/CallLogEntryText.java | 7 | ||||
-rw-r--r-- | java/com/android/dialer/calllogutils/NumberAttributesConverter.java | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/java/com/android/dialer/calllogutils/CallLogEntryText.java b/java/com/android/dialer/calllogutils/CallLogEntryText.java index e346de011..a1a2a3b48 100644 --- a/java/com/android/dialer/calllogutils/CallLogEntryText.java +++ b/java/com/android/dialer/calllogutils/CallLogEntryText.java @@ -214,7 +214,12 @@ public final class CallLogEntryText { // (1) there is no number type label, and // (2) the number is not spam. if (TextUtils.isEmpty(numberTypeLabel) && !row.getNumberAttributes().getIsSpam()) { - String location = row.getGeocodedLocation(); + // If number attributes contain a location (obtained from a PhoneLookup), use it instead + // of the one from the annotated call log. + String location = + !TextUtils.isEmpty(row.getNumberAttributes().getGeolocation()) + ? row.getNumberAttributes().getGeolocation() + : row.getGeocodedLocation(); if (!TextUtils.isEmpty(location)) { if (secondaryText.length() > 0) { secondaryText.append(", "); diff --git a/java/com/android/dialer/calllogutils/NumberAttributesConverter.java b/java/com/android/dialer/calllogutils/NumberAttributesConverter.java index f4fab8405..9f07fdac5 100644 --- a/java/com/android/dialer/calllogutils/NumberAttributesConverter.java +++ b/java/com/android/dialer/calllogutils/NumberAttributesConverter.java @@ -56,6 +56,7 @@ public final class NumberAttributesConverter { .setCanReportAsInvalidNumber(phoneLookupInfoConsolidator.canReportAsInvalidNumber()) .setIsCp2InfoIncomplete(phoneLookupInfoConsolidator.isDefaultCp2InfoIncomplete()) .setContactSource(phoneLookupInfoConsolidator.getContactSource()) - .setCanSupportCarrierVideoCall(phoneLookupInfoConsolidator.canSupportCarrierVideoCall()); + .setCanSupportCarrierVideoCall(phoneLookupInfoConsolidator.canSupportCarrierVideoCall()) + .setGeolocation(phoneLookupInfoConsolidator.getGeolocation()); } } |