From e7d83218d752f677c859a6c88181d24dc36a8c83 Mon Sep 17 00:00:00 2001 From: linyuh Date: Thu, 26 Apr 2018 20:35:31 -0700 Subject: Show Cequint info in the new call log. Bug: 70989584 Test: PhoneLookupInfoConsolidatorTest PiperOrigin-RevId: 194494486 Change-Id: I706802c000da953f962786bd07ca5da2fd59dc8a --- java/com/android/dialer/calllogutils/CallLogEntryText.java | 7 ++++++- .../com/android/dialer/calllogutils/NumberAttributesConverter.java | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'java/com/android/dialer/calllogutils') 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()); } } -- cgit v1.2.3