summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/phonelookup/phone_lookup_info.proto
diff options
context:
space:
mode:
authorzachh <zachh@google.com>2017-11-10 11:42:47 -0800
committerZachary Heidepriem <zachh@google.com>2017-11-11 20:24:31 -0800
commitdc63a40ddaf6a223101c2af8b57ac12ad49428e6 (patch)
tree5013a6e403e75d3d38496c5529b75e560cd5a2ca /java/com/android/dialer/phonelookup/phone_lookup_info.proto
parente841eabd475f515b96349b85b48ae00ac6603d3f (diff)
Use parent message for CP2 info in phone_lookup_info.proto.
PhoneLookupInfo should contain one message per PhoneLookup implementation for clarity. Instead of having a repeated Cp2Info field, we now have a single Cp2Info field which wraps a repeated Cp2ContactInfo field. Also added ApdlInfo to the message to make testing of CompositePhoneLookup more realistic, in that it tests merging across submessages now. (ApdlInfo is more or less a placeholder until ApdlPhoneLookup is implemented.) Test: yes PiperOrigin-RevId: 175316738 Change-Id: I196c2eaa885e1268ff80ebaad6d85840a9cc7a15
Diffstat (limited to 'java/com/android/dialer/phonelookup/phone_lookup_info.proto')
-rw-r--r--java/com/android/dialer/phonelookup/phone_lookup_info.proto44
1 files changed, 27 insertions, 17 deletions
diff --git a/java/com/android/dialer/phonelookup/phone_lookup_info.proto b/java/com/android/dialer/phonelookup/phone_lookup_info.proto
index cb89a64e3..93dd01e86 100644
--- a/java/com/android/dialer/phonelookup/phone_lookup_info.proto
+++ b/java/com/android/dialer/phonelookup/phone_lookup_info.proto
@@ -17,23 +17,33 @@ message PhoneLookupInfo {
// Information about a PhoneNumber retrieved from CP2. Cp2PhoneLookup is
// responsible for populating the data in this message.
message Cp2Info {
- // android.provider.ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME_PRIMARY
- optional string name = 1;
-
- // android.provider.ContactsContract.CommonDataKinds.Phone.PHOTO_THUMBNAIL_URI
- optional string photo_uri = 2;
-
- // android.provider.ContactsContract.CommonDataKinds.Phone.PHOTO_ID
- optional fixed64 photo_id = 3;
-
- // android.provider.ContactsContract.CommonDataKinds.Phone.LABEL
- // "Home", "Mobile", ect.
- optional string label = 4;
+ // Information about a single local contact.
+ message Cp2ContactInfo {
+ // android.provider.ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME_PRIMARY
+ optional string name = 1;
+
+ // android.provider.ContactsContract.CommonDataKinds.Phone.PHOTO_THUMBNAIL_URI
+ optional string photo_uri = 2;
+
+ // android.provider.ContactsContract.CommonDataKinds.Phone.PHOTO_ID
+ optional fixed64 photo_id = 3;
+
+ // android.provider.ContactsContract.CommonDataKinds.Phone.LABEL
+ // "Home", "Mobile", ect.
+ optional string label = 4;
+
+ // android.provider.ContactsContract.CommonDataKinds.Phone.CONTACT_ID
+ optional fixed64 contact_id = 5;
+ }
+ // Repeated because one phone number can be associated with multiple CP2
+ // contacts.
+ repeated Cp2ContactInfo cp2_contact_info = 1;
+ }
+ optional Cp2Info cp2_info = 1;
- // android.provider.ContactsContract.CommonDataKinds.Phone.CONTACT_ID
- optional fixed64 contact_id = 5;
+ // Message for APDL, a lookup for the proprietary Google dialer.
+ message ApdlInfo {
+ optional bool is_spam = 1;
}
- // Repeated because one phone number can be associated with multiple CP2
- // contacts.
- repeated Cp2Info cp2_info = 1;
+ optional ApdlInfo apdl_info = 2;
} \ No newline at end of file