diff options
author | linyuh <linyuh@google.com> | 2018-01-09 18:26:39 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-01-09 18:31:41 -0800 |
commit | 99817db9f0369747c22a4e03ad1f1db26c5d81bb (patch) | |
tree | 029675887cacb0a3d5361697bd822c6cb596ba24 /java/com/android/dialer/phonelookup/selector/PhoneLookupSelector.java | |
parent | 02415abade15ecda08d19723bdb4127a326ef7a5 (diff) |
Rename Cp2PhoneLookup as Cp2LocalPhoneLookup and PhoneLookupInfo.cp2_info as PhoneLookupInfo.cp2_local_info.
To support remote CP2 contacts, there will be a new PhoneLookup ("Cp2RemotePhoneLookup") and a new field in proto PhoneLookupInfo ("cp2_remote_info").
In proto PhoneLookupInfo, cp2_local_info and cp2_remote_info will be of the same type ("Cp2Info").
Bug: 71763594
Test: Existing tests
PiperOrigin-RevId: 181405798
Change-Id: I6c43b486229d4e9ae7b55c579d9c9997a2884c80
Diffstat (limited to 'java/com/android/dialer/phonelookup/selector/PhoneLookupSelector.java')
-rw-r--r-- | java/com/android/dialer/phonelookup/selector/PhoneLookupSelector.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/java/com/android/dialer/phonelookup/selector/PhoneLookupSelector.java b/java/com/android/dialer/phonelookup/selector/PhoneLookupSelector.java index a960d4e96..6b217e951 100644 --- a/java/com/android/dialer/phonelookup/selector/PhoneLookupSelector.java +++ b/java/com/android/dialer/phonelookup/selector/PhoneLookupSelector.java @@ -139,7 +139,7 @@ public final class PhoneLookupSelector { // matches that of a Cp2 (local) contact, and PeopleApiInfo will not be used to display // information like name, photo, etc. We should not allow the user to report the number in this // case as the info displayed is not from the People API. - if (phoneLookupInfo.getCp2Info().getCp2ContactInfoCount() > 0) { + if (phoneLookupInfo.getCp2LocalInfo().getCp2ContactInfoCount() > 0) { return false; } @@ -155,8 +155,8 @@ public final class PhoneLookupSelector { */ @Nullable private Cp2ContactInfo firstLocalContact(PhoneLookupInfo phoneLookupInfo) { - if (phoneLookupInfo.getCp2Info().getCp2ContactInfoCount() > 0) { - return phoneLookupInfo.getCp2Info().getCp2ContactInfo(0); + if (phoneLookupInfo.getCp2LocalInfo().getCp2ContactInfoCount() > 0) { + return phoneLookupInfo.getCp2LocalInfo().getCp2ContactInfo(0); } return null; } |