summaryrefslogtreecommitdiff
path: root/java/com/android/incallui/contactgrid/TopRow.java
diff options
context:
space:
mode:
authorAndroid Dialer <noreply@google.com>2018-02-21 08:05:14 -0800
committerEric Erfanian <erfanian@google.com>2018-02-22 21:11:26 +0000
commitf94391034e9d591c18d04c0b796d944938201f6a (patch)
treec8c81409022b07bf62841df8bfc29f65b5e280cf /java/com/android/incallui/contactgrid/TopRow.java
parentd40d4f09e32ecfc6b95f57bc6d3e3d1703592cd4 (diff)
Updating PrimaryInfo value class to use AutoValue with builder pattern.
Bug: 34502119 Test: BottomRowTest,CallCardPresenterTest,PrimaryInfoTest,TopRowTest PiperOrigin-RevId: 186460178 Change-Id: Ifb90019b6a5568788d51f4a55a07f7693c803eaf
Diffstat (limited to 'java/com/android/incallui/contactgrid/TopRow.java')
-rw-r--r--java/com/android/incallui/contactgrid/TopRow.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/java/com/android/incallui/contactgrid/TopRow.java b/java/com/android/incallui/contactgrid/TopRow.java
index 556b11ba0..5eb38f98c 100644
--- a/java/com/android/incallui/contactgrid/TopRow.java
+++ b/java/com/android/incallui/contactgrid/TopRow.java
@@ -81,7 +81,7 @@ public class TopRow {
// Show phone number if it's not displayed in name (center row) or location field (bottom
// row).
if (shouldShowNumber(primaryInfo, true /* isIncoming */)) {
- label = TextUtils.concat(label, " ", spanDisplayNumber(primaryInfo.number));
+ label = TextUtils.concat(label, " ", spanDisplayNumber(primaryInfo.number()));
}
}
} else if (VideoUtils.hasSentVideoUpgradeRequest(state.sessionModificationState)
@@ -97,7 +97,7 @@ public class TopRow {
label = context.getString(R.string.incall_remotely_held);
} else if (state.state == State.ACTIVE
&& shouldShowNumber(primaryInfo, false /* isIncoming */)) {
- label = spanDisplayNumber(primaryInfo.number);
+ label = spanDisplayNumber(primaryInfo.number());
} else if (state.state == State.CALL_PENDING && !TextUtils.isEmpty(state.customLabel)) {
label = state.customLabel;
} else {
@@ -115,18 +115,18 @@ public class TopRow {
}
private static boolean shouldShowNumber(PrimaryInfo primaryInfo, boolean isIncoming) {
- if (primaryInfo.nameIsNumber) {
+ if (primaryInfo.nameIsNumber()) {
return false;
}
// Don't show number since it's already shown in bottom row of incoming screen if there is no
// location info.
- if (primaryInfo.location == null && isIncoming) {
+ if (primaryInfo.location() == null && isIncoming) {
return false;
}
- if (primaryInfo.isLocalContact && !isIncoming) {
+ if (primaryInfo.isLocalContact() && !isIncoming) {
return false;
}
- if (TextUtils.isEmpty(primaryInfo.number)) {
+ if (TextUtils.isEmpty(primaryInfo.number())) {
return false;
}
return true;