Fix bug that phone number is shown for local contacts.
This is a regression caused by cl/169961072.
This change will make sure phone number is only shown on top row for non-local contacts if the name is not number and the call is active.
Bug: 67047386
Test: TopRowTest
PiperOrigin-RevId: 170424277
Change-Id: I9b3ab9432a938b2fb1c6632f2d9404bee413588f
diff --git a/java/com/android/incallui/ContactInfoCache.java b/java/com/android/incallui/ContactInfoCache.java
index 39c4c2f..2a93945 100644
--- a/java/com/android/incallui/ContactInfoCache.java
+++ b/java/com/android/incallui/ContactInfoCache.java
@@ -721,6 +721,10 @@
boolean isEmergencyNumber;
boolean isVoicemailNumber;
+ public boolean isLocalContact() {
+ return contactLookupResult == ContactLookupResult.Type.LOCAL_CONTACT;
+ }
+
@Override
public String toString() {
return "ContactCacheEntry{"