summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/calllogutils
diff options
context:
space:
mode:
authortwyen <twyen@google.com>2018-03-19 15:20:59 -0700
committerCopybara-Service <copybara-piper@google.com>2018-03-19 15:23:28 -0700
commitcd3d49843431913c2ff042d2294a8b5201877882 (patch)
tree7bd55b5175802fe3ac8fe4c45bf27cdd583ee580 /java/com/android/dialer/calllogutils
parentf4a48247329967ecc3f952b8604f122d0cbc2e28 (diff)
Implement VoicemailDataSource
This data source determines if the call is to the voicemail inbox. isVoicemail() is removed from NumberAttributes and PhoneLookup. It is yet decided how in call UI should handle voicemail calls in the future. TAG_CHANGE_OK=proto not in prod yet. Please clear app data. TYPE_CHANGE_OK=above Bug: 70989587 Test: Unit tests PiperOrigin-RevId: 189650273 Change-Id: Iafebf1abb18c74301b62a72d1d04deecd6d78d29
Diffstat (limited to 'java/com/android/dialer/calllogutils')
-rw-r--r--java/com/android/dialer/calllogutils/CallLogEntryText.java4
-rw-r--r--java/com/android/dialer/calllogutils/NumberAttributesConverter.java2
2 files changed, 4 insertions, 2 deletions
diff --git a/java/com/android/dialer/calllogutils/CallLogEntryText.java b/java/com/android/dialer/calllogutils/CallLogEntryText.java
index ab851cbbd..6f1047cb7 100644
--- a/java/com/android/dialer/calllogutils/CallLogEntryText.java
+++ b/java/com/android/dialer/calllogutils/CallLogEntryText.java
@@ -48,6 +48,10 @@ public final class CallLogEntryText {
return presentationName.get();
}
+ if (row.isVoicemailCall() && !TextUtils.isEmpty(row.voicemailCallTag())) {
+ return row.voicemailCallTag();
+ }
+
// Otherwise prefer the name.
if (!TextUtils.isEmpty(row.numberAttributes().getName())) {
return row.numberAttributes().getName();
diff --git a/java/com/android/dialer/calllogutils/NumberAttributesConverter.java b/java/com/android/dialer/calllogutils/NumberAttributesConverter.java
index df6b680db..24567e027 100644
--- a/java/com/android/dialer/calllogutils/NumberAttributesConverter.java
+++ b/java/com/android/dialer/calllogutils/NumberAttributesConverter.java
@@ -34,7 +34,6 @@ public final class NumberAttributesConverter {
.setLookupUri(numberAttributes.getLookupUri())
.setIsBusiness(numberAttributes.getIsBusiness())
.setIsSpam(numberAttributes.getIsSpam())
- .setIsVoicemail(numberAttributes.getIsVoicemail())
.setIsBlocked(numberAttributes.getIsBlocked());
}
@@ -52,7 +51,6 @@ public final class NumberAttributesConverter {
.setLookupUri(phoneLookupInfoConsolidator.getLookupUri())
.setNumberTypeLabel(phoneLookupInfoConsolidator.getNumberLabel())
.setIsBusiness(phoneLookupInfoConsolidator.isBusiness())
- .setIsVoicemail(phoneLookupInfoConsolidator.isVoicemail())
.setIsBlocked(phoneLookupInfoConsolidator.isBlocked())
.setIsSpam(phoneLookupInfoConsolidator.isSpam())
.setCanReportAsInvalidNumber(phoneLookupInfoConsolidator.canReportAsInvalidNumber())