summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/phonelookup/phone_lookup_info.proto
blob: 36596c1a2da1b72e3430a662d4571229c6662fe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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. If no contact is found for a number, this will contain exactly
    // one element which is the default Cp2ContactInfo instance.
    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;
}