Fix bug that number is duplicated until location is resolved.
Number shouldn't be shown in bottom row if it's already shown on name row.
Test: TH
PiperOrigin-RevId: 159468064
Change-Id: Ieb3eff270d247dd712d2fbf6fe2428038ba643c3
diff --git a/java/com/android/incallui/contactgrid/BottomRow.java b/java/com/android/incallui/contactgrid/BottomRow.java
index d0ff192..76e0289 100644
--- a/java/com/android/incallui/contactgrid/BottomRow.java
+++ b/java/com/android/incallui/contactgrid/BottomRow.java
@@ -124,7 +124,7 @@
if (primaryInfo.location != null) {
return primaryInfo.location;
}
- if (!TextUtils.isEmpty(primaryInfo.number)) {
+ if (!primaryInfo.nameIsNumber && !TextUtils.isEmpty(primaryInfo.number)) {
CharSequence spannedNumber = spanDisplayNumber(primaryInfo.number);
if (primaryInfo.label == null) {
return spannedNumber;