1/*
2 * Copyright (C) 2020 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18
19package com.android.server.people;
20
21option java_multiple_files = true;
22
23import "frameworks/base/core/proto/android/content/locusid.proto";
24import "frameworks/base/core/proto/android/privacy.proto";
25
26// On disk data of conversation infos for a user and app package.
27message ConversationInfosProto {
28
29  // The series of conversation infos for a user and app package.
30  repeated ConversationInfoProto conversation_infos = 1;
31}
32
33// Individual conversation info (com.android.server.people.data.ConversationInfo) for a user
34// and app package.
35message ConversationInfoProto {
36
37  // The conversation's shortcut id.
38  optional string shortcut_id = 1;
39
40  // The conversation's locus id.
41  optional .android.content.LocusIdProto locus_id_proto = 2;
42
43  // The URI of the contact in the conversation.
44  optional string contact_uri = 3 [(.android.privacy).dest = DEST_EXPLICIT];
45
46  // The notification channel id of the conversation.
47  optional string notification_channel_id = 4 [(.android.privacy).dest = DEST_EXPLICIT];
48
49  // Integer representation of shortcut bit flags.
50  optional int32 shortcut_flags = 5;
51
52  // Integer representation of conversation bit flags.
53  optional int32 conversation_flags = 6;
54
55  // The phone number of the contact.
56  optional string contact_phone_number = 7 [(.android.privacy).dest = DEST_EXPLICIT];
57}
58
59// On disk data of events.
60message PeopleEventsProto {
61  repeated PeopleEventProto events = 1;
62}
63
64// Individual event (com.android.server.people.data.Event).
65message PeopleEventProto {
66
67  // For valid values, refer to java class documentation.
68  optional int32 event_type = 1;
69
70  optional int64 time = 2;
71
72  // The duration of the event. Should only be set for some event_types. Refer to java class
73  // documentation for details.
74  optional int32 duration = 3;
75}
76
77// On disk data of event indexes.
78message PeopleEventIndexesProto {
79  repeated TypedPeopleEventIndexProto typed_indexes = 1;
80}
81
82// Mapping of event_type to event index.
83message TypedPeopleEventIndexProto {
84  optional int32 event_type = 1;
85  optional PeopleEventIndexProto index = 2;
86}
87
88// Index of events' time distributions (com.android.server.people.data.EventIndex).
89message PeopleEventIndexProto {
90  // Each long value in event_bitmaps represents a time slot, there should be 4 values. Further
91  // details can be found in class documentation.
92  repeated int64 event_bitmaps = 1;
93
94  optional int64 last_updated_time = 2;
95}
96
97