summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/calllogutils
diff options
context:
space:
mode:
authorlinyuh <linyuh@google.com>2018-04-26 20:35:31 -0700
committerCopybara-Service <copybara-piper@google.com>2018-04-26 20:39:41 -0700
commite7d83218d752f677c859a6c88181d24dc36a8c83 (patch)
tree78f3eaa9f7fcd5ff7cdd5cead74b651d3636e618 /java/com/android/dialer/calllogutils
parentfa3cd3bfb14f4b8ac65c0ee6757bc78b40a73573 (diff)
Show Cequint info in the new call log.
Bug: 70989584 Test: PhoneLookupInfoConsolidatorTest PiperOrigin-RevId: 194494486 Change-Id: I706802c000da953f962786bd07ca5da2fd59dc8a
Diffstat (limited to 'java/com/android/dialer/calllogutils')
-rw-r--r--java/com/android/dialer/calllogutils/CallLogEntryText.java7
-rw-r--r--java/com/android/dialer/calllogutils/NumberAttributesConverter.java3
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());
}
}