diff options
author | Android Dialer <noreply@google.com> | 2018-02-21 08:05:14 -0800 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2018-02-22 21:11:26 +0000 |
commit | f94391034e9d591c18d04c0b796d944938201f6a (patch) | |
tree | c8c81409022b07bf62841df8bfc29f65b5e280cf /java/com/android/incallui/contactgrid/BottomRow.java | |
parent | d40d4f09e32ecfc6b95f57bc6d3e3d1703592cd4 (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/BottomRow.java')
-rw-r--r-- | java/com/android/incallui/contactgrid/BottomRow.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/java/com/android/incallui/contactgrid/BottomRow.java b/java/com/android/incallui/contactgrid/BottomRow.java index f9fc870dc..610eeca39 100644 --- a/java/com/android/incallui/contactgrid/BottomRow.java +++ b/java/com/android/incallui/contactgrid/BottomRow.java @@ -82,7 +82,7 @@ public class BottomRow { boolean isSpamIconVisible = false; boolean shouldPopulateAccessibilityEvent = true; - if (isIncoming(state) && primaryInfo.isSpam) { + if (isIncoming(state) && primaryInfo.isSpam()) { label = context.getString(R.string.contact_grid_incoming_suspected_spam); isSpamIconVisible = true; isHdIconVisible = false; @@ -99,7 +99,7 @@ public class BottomRow { } } else { label = getLabelForPhoneNumber(primaryInfo); - shouldPopulateAccessibilityEvent = primaryInfo.nameIsNumber; + shouldPopulateAccessibilityEvent = primaryInfo.nameIsNumber(); } return new Info( @@ -114,15 +114,15 @@ public class BottomRow { } private static CharSequence getLabelForPhoneNumber(PrimaryInfo primaryInfo) { - if (primaryInfo.location != null) { - return primaryInfo.location; + if (primaryInfo.location() != null) { + return primaryInfo.location(); } - if (!primaryInfo.nameIsNumber && !TextUtils.isEmpty(primaryInfo.number)) { - CharSequence spannedNumber = spanDisplayNumber(primaryInfo.number); - if (primaryInfo.label == null) { + if (!primaryInfo.nameIsNumber() && !TextUtils.isEmpty(primaryInfo.number())) { + CharSequence spannedNumber = spanDisplayNumber(primaryInfo.number()); + if (primaryInfo.label() == null) { return spannedNumber; } else { - return TextUtils.concat(primaryInfo.label, " ", spannedNumber); + return TextUtils.concat(primaryInfo.label(), " ", spannedNumber); } } return null; |