Loading java/com/android/dialer/function/Consumer.java 0 → 100644 +24 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.dialer.function; /** Functional interface for consuming generic values. */ public interface Consumer<T> { /** Consumes a value. */ void accept(T value); } java/com/android/dialer/phonelookup/PhoneLookupSelector.java +3 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,9 @@ public final class PhoneLookupSelector { return firstLocalContact.getName(); } } if (phoneLookupInfo.hasPeopleApiInfo()) { return phoneLookupInfo.getPeopleApiInfo().getDisplayName(); } return ""; } Loading java/com/android/dialer/phonelookup/phone_lookup_info.proto +32 −0 Original line number Diff line number Diff line Loading @@ -50,4 +50,36 @@ message PhoneLookupInfo { 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; } No newline at end of file Loading
java/com/android/dialer/function/Consumer.java 0 → 100644 +24 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.dialer.function; /** Functional interface for consuming generic values. */ public interface Consumer<T> { /** Consumes a value. */ void accept(T value); }
java/com/android/dialer/phonelookup/PhoneLookupSelector.java +3 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,9 @@ public final class PhoneLookupSelector { return firstLocalContact.getName(); } } if (phoneLookupInfo.hasPeopleApiInfo()) { return phoneLookupInfo.getPeopleApiInfo().getDisplayName(); } return ""; } Loading
java/com/android/dialer/phonelookup/phone_lookup_info.proto +32 −0 Original line number Diff line number Diff line Loading @@ -50,4 +50,36 @@ message PhoneLookupInfo { 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; } No newline at end of file