summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/calllogutils
diff options
context:
space:
mode:
authortwyen <twyen@google.com>2018-01-11 16:03:11 -0800
committerCopybara-Service <copybara-piper@google.com>2018-01-11 17:02:52 -0800
commit188b42fd10644373175fc204b48da98125004985 (patch)
tree9f7434fe8cb3bbf3cffc513225288e9946851745 /java/com/android/dialer/calllogutils
parent98280255db8824cb58caac596cb4f9febcf57306 (diff)
Merge PhoneLookupDataSource results into a proto in annotated call log.
This allow extra information from PhoneLookup to be more easily added. Only PhoneLookupSelector and the proto will be affected for new attributes. Test: Unit tests. PiperOrigin-RevId: 181675568 Change-Id: I4e0bc1c6005b58a9b684b030b55bea6223af9ce3
Diffstat (limited to 'java/com/android/dialer/calllogutils')
-rw-r--r--java/com/android/dialer/calllogutils/CallLogEntryText.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/java/com/android/dialer/calllogutils/CallLogEntryText.java b/java/com/android/dialer/calllogutils/CallLogEntryText.java
index 873f9ebd0..1df44583f 100644
--- a/java/com/android/dialer/calllogutils/CallLogEntryText.java
+++ b/java/com/android/dialer/calllogutils/CallLogEntryText.java
@@ -38,8 +38,8 @@ public final class CallLogEntryText {
*/
public static CharSequence buildPrimaryText(Context context, CoalescedRow row) {
StringBuilder primaryText = new StringBuilder();
- if (!TextUtils.isEmpty(row.name())) {
- primaryText.append(row.name());
+ if (!TextUtils.isEmpty(row.numberAttributes().getName())) {
+ primaryText.append(row.numberAttributes().getName());
} else if (!TextUtils.isEmpty(row.formattedNumber())) {
primaryText.append(row.formattedNumber());
} else {
@@ -98,7 +98,7 @@ public final class CallLogEntryText {
*/
StringBuilder secondaryText = secondaryTextPrefix(context, row);
- if (TextUtils.isEmpty(row.name())) {
+ if (TextUtils.isEmpty(row.numberAttributes().getName())) {
// If the name is empty the number is shown as the primary text and there's nothing to add.
return secondaryText.toString();
}
@@ -128,7 +128,7 @@ public final class CallLogEntryText {
// TODO(zachh): Add "Duo" prefix?
secondaryText.append(context.getText(R.string.new_call_log_video));
}
- String numberTypeLabel = row.numberTypeLabel();
+ String numberTypeLabel = row.numberAttributes().getNumberTypeLabel();
if (!TextUtils.isEmpty(numberTypeLabel)) {
if (secondaryText.length() > 0) {
secondaryText.append(", ");