From 8d06ecde0ec7040d00efec6bff367bedee426fc6 Mon Sep 17 00:00:00 2001 From: zachh Date: Tue, 23 Jan 2018 12:43:06 -0800 Subject: Moved coalesced_ids.proto and number_attributes.proto to calllog/database/contract. The "model" package should be reserved for call history proper (and not voicemail) so it shouldn't contain things needed by voicemail. Test: existing PiperOrigin-RevId: 182976719 Change-Id: I463c8ed4600950a8d18db49d991609bfaa49c709 --- .../calllog/database/contract/coalesced_ids.proto | 30 +++++++++++ .../database/contract/number_attributes.proto | 61 ++++++++++++++++++++++ .../dialer/calllog/model/coalesced_ids.proto | 30 ----------- .../dialer/calllog/model/number_attributes.proto | 61 ---------------------- 4 files changed, 91 insertions(+), 91 deletions(-) create mode 100644 java/com/android/dialer/calllog/database/contract/coalesced_ids.proto create mode 100644 java/com/android/dialer/calllog/database/contract/number_attributes.proto delete mode 100644 java/com/android/dialer/calllog/model/coalesced_ids.proto delete mode 100644 java/com/android/dialer/calllog/model/number_attributes.proto diff --git a/java/com/android/dialer/calllog/database/contract/coalesced_ids.proto b/java/com/android/dialer/calllog/database/contract/coalesced_ids.proto new file mode 100644 index 000000000..059f95782 --- /dev/null +++ b/java/com/android/dialer/calllog/database/contract/coalesced_ids.proto @@ -0,0 +1,30 @@ +// 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 + +syntax = "proto2"; + +option java_package = "com.android.dialer"; +option java_multiple_files = true; +option optimize_for = LITE_RUNTIME; + + +package com.android.dialer; + +// A proto containing a list of IDs of the rows in AnnotatedCallLog that are +// coalesced into a row in CoalescedAnnotatedCallLog. +// For example, if rows in the AnnotatedCallLog with IDs 123, 124, 125 are +// coalesced into one row, the list in the proto will be [123, 124, 125]. +message CoalescedIds { + repeated int64 coalesced_id = 1; +} \ No newline at end of file diff --git a/java/com/android/dialer/calllog/database/contract/number_attributes.proto b/java/com/android/dialer/calllog/database/contract/number_attributes.proto new file mode 100644 index 000000000..64f8f180e --- /dev/null +++ b/java/com/android/dialer/calllog/database/contract/number_attributes.proto @@ -0,0 +1,61 @@ +// Copyright (C) 2018 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 + +syntax = "proto2"; + +option java_package = "com.android.dialer"; +option java_multiple_files = true; +option optimize_for = LITE_RUNTIME; + + +package com.android.dialer; + +// Information related to the phone number of the call. +message NumberAttributes { + // The name (which may be a person's name or business name, but not a number) + // formatted exactly as it should appear to the user. If the user's locale or + // name display preferences change, this field should be rewritten. + optional string name = 1; + + // A photo URI for the contact to display in the call log list view. + optional string photo_uri = 2; + + // A photo ID (from the contacts provider) for the contact to display in the + // call log list view. + optional int64 photo_id = 3; + + // TODO(zachh): If we need to support photos other than local contacts', add a + // (blob?) column. + + // The contacts provider lookup URI for the contact associated with the call. + optional string lookup_uri = 4; + + // The number type as a string to be displayed to the user, for example "Home" + // or "Mobile". This column should be updated for the appropriate language + // when the locale changes. + optional string number_type_label = 5; + + // The number is a call to a business from nearby places lookup. + optional bool is_business = 6; + + // The number is a call to the voicemail inbox. + optional bool is_voicemail = 7; + + // Can the number be reported as invalid through People API + optional bool can_report_as_invalid_number = 8; + + // True if the CP2 information is incomplete and needs to be queried at + // display time. + optional bool is_cp2_info_incomplete = 9; +} \ No newline at end of file diff --git a/java/com/android/dialer/calllog/model/coalesced_ids.proto b/java/com/android/dialer/calllog/model/coalesced_ids.proto deleted file mode 100644 index 059f95782..000000000 --- a/java/com/android/dialer/calllog/model/coalesced_ids.proto +++ /dev/null @@ -1,30 +0,0 @@ -// 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 - -syntax = "proto2"; - -option java_package = "com.android.dialer"; -option java_multiple_files = true; -option optimize_for = LITE_RUNTIME; - - -package com.android.dialer; - -// A proto containing a list of IDs of the rows in AnnotatedCallLog that are -// coalesced into a row in CoalescedAnnotatedCallLog. -// For example, if rows in the AnnotatedCallLog with IDs 123, 124, 125 are -// coalesced into one row, the list in the proto will be [123, 124, 125]. -message CoalescedIds { - repeated int64 coalesced_id = 1; -} \ No newline at end of file diff --git a/java/com/android/dialer/calllog/model/number_attributes.proto b/java/com/android/dialer/calllog/model/number_attributes.proto deleted file mode 100644 index 64f8f180e..000000000 --- a/java/com/android/dialer/calllog/model/number_attributes.proto +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (C) 2018 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 - -syntax = "proto2"; - -option java_package = "com.android.dialer"; -option java_multiple_files = true; -option optimize_for = LITE_RUNTIME; - - -package com.android.dialer; - -// Information related to the phone number of the call. -message NumberAttributes { - // The name (which may be a person's name or business name, but not a number) - // formatted exactly as it should appear to the user. If the user's locale or - // name display preferences change, this field should be rewritten. - optional string name = 1; - - // A photo URI for the contact to display in the call log list view. - optional string photo_uri = 2; - - // A photo ID (from the contacts provider) for the contact to display in the - // call log list view. - optional int64 photo_id = 3; - - // TODO(zachh): If we need to support photos other than local contacts', add a - // (blob?) column. - - // The contacts provider lookup URI for the contact associated with the call. - optional string lookup_uri = 4; - - // The number type as a string to be displayed to the user, for example "Home" - // or "Mobile". This column should be updated for the appropriate language - // when the locale changes. - optional string number_type_label = 5; - - // The number is a call to a business from nearby places lookup. - optional bool is_business = 6; - - // The number is a call to the voicemail inbox. - optional bool is_voicemail = 7; - - // Can the number be reported as invalid through People API - optional bool can_report_as_invalid_number = 8; - - // True if the CP2 information is incomplete and needs to be queried at - // display time. - optional bool is_cp2_info_incomplete = 9; -} \ No newline at end of file -- cgit v1.2.3