syntax = "proto2"; option java_package = "com.android.dialer.phonelookup"; option java_multiple_files = true; option optimize_for = LITE_RUNTIME; package com.android.dialer.phonelookup; // Contains information about a phone number, possibly from many sources. // // This message is organized into sub-messages where each sub-message // corresponds to an implementation of PhoneLookup. For example, the Cp2Info // corresponds to Cp2PhoneLookup class, and the Cp2PhoneLookup class alone is // responsible for populating its fields. message PhoneLookupInfo { // Information about a PhoneNumber retrieved from CP2. Cp2PhoneLookup is // responsible for populating the data in this message. message Cp2Info { // 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; // android.provider.ContactsContract.CONTENT_LOOKUP_URI optional string lookup_uri = 6; } // Repeated because one phone number can be associated with multiple CP2 // contacts. // // Empty if there is no CP2 contact information for the number. repeated Cp2ContactInfo cp2_contact_info = 1; } optional Cp2Info cp2_info = 1; // Message for APDL, a lookup for the proprietary Google dialer. message ApdlInfo { optional bool is_spam = 1; } optional ApdlInfo apdl_info = 2; // Message for PeopleApi, including G+ contacts and nearby places message PeopleApiInfo { // Best display name determined by people API if available, first display // name otherwise. optional string display_name = 1; // The type of the number, for example "phone" or "home". optional string number_type = 2; // The number_type label in human readable string, for example "Phone". // The UI should display known number_type with string resources if possible // but if number_type is unrecognized formatted_number_type. For example // if the user set an custom type label. optional string formatted_number_type = 3; // URL to the contact's full size photo. optional string image_url = 4; // The primary key of the contact in people API. optional string person_id = 5; enum InfoType { UNKNOWN = 0; CONTACT = 1; // the result is a saved contact in people API NEARBY_BUSINESS = 2; // the result is found through nearby places } // The type of the lookup result, for example, a saved contact or a nearby // business. optional InfoType info_type = 6; } optional PeopleApiInfo people_api_info = 3; // Whether a number is blocked or not. Used by both the system blacklist and // dialer fallback enum BlockedState { UNKNOWN = 0; BLOCKED = 1; NOT_BLOCKED = 2; } // Message for the android system BlockedNumber lookup. Available starting in // N. message SystemBlockedNumberInfo { optional BlockedState blocked_state = 1; } optional SystemBlockedNumberInfo system_blocked_number_info = 4; // Message for the dialer fallback for blocked number. Used in M or when the // migration to the system has not been completed. message DialerBlockedNumberInfo { optional BlockedState blocked_state = 1; } optional DialerBlockedNumberInfo dialer_blocked_number_info = 5; }