blob: f0b3d02a8d8dca4296ac2ed96c33252c7bb40d22 [file] [log] [blame]
Hall Liu2f4f0a02016-08-08 17:23:20 -07001syntax = "proto2";
2
3package com.android.server.telecom;
4
5option java_package = "com.android.server.telecom";
6option java_outer_classname = "TelecomLogClass";
7
8// The information about the telecom events.
9message TelecomLog {
10
11 // Information about each call.
12 repeated CallLog call_logs = 1;
13
14 // Timing information for the logging sessions
15 repeated LogSessionTiming session_timings = 2;
16}
17
18message LogSessionTiming {
19 enum SessionEntryPoint {
20 ICA_ANSWER_CALL = 1;
21 ICA_REJECT_CALL = 2;
22 ICA_DISCONNECT_CALL = 3;
23 ICA_HOLD_CALL = 4;
24 ICA_UNHOLD_CALL = 5;
25 ICA_MUTE = 6;
26 ICA_SET_AUDIO_ROUTE = 7;
27 ICA_CONFERENCE = 8;
28
29 CSW_HANDLE_CREATE_CONNECTION_COMPLETE = 100;
30 CSW_SET_ACTIVE = 101;
31 CSW_SET_RINGING = 102;
32 CSW_SET_DIALING = 103;
33 CSW_SET_DISCONNECTED = 104;
34 CSW_SET_ON_HOLD = 105;
35 CSW_REMOVE_CALL = 106;
36 CSW_SET_IS_CONFERENCED = 107;
37 CSW_ADD_CONFERENCE_CALL = 108;
38 }
39
40 // The entry point into Telecom code that this session tracks.
41 optional SessionEntryPoint sessionEntryPoint = 1;
42 // The time it took for this session to finish.
43 optional int64 time_millis = 2;
44}
45
46message Event {
47 // From android.telecom.ParcelableAnalytics
48 enum EventName {
49 SET_SELECT_PHONE_ACCOUNT = 0;
50 SET_ACTIVE = 1;
51 SET_DISCONNECTED = 2;
52 START_CONNECTION = 3;
53 SET_DIALING = 4;
54 BIND_CS = 5;
55 CS_BOUND = 6;
56 REQUEST_ACCEPT = 7;
57 REQUEST_REJECT = 8;
58
59 SCREENING_SENT = 100;
60 SCREENING_COMPLETED = 101;
61 DIRECT_TO_VM_INITIATED = 102;
62 DIRECT_TO_VM_FINISHED = 103;
63 BLOCK_CHECK_INITIATED = 104;
64 BLOCK_CHECK_FINISHED = 105;
65 FILTERING_INITIATED = 106;
66 FILTERING_COMPLETED = 107;
67 FILTERING_TIMED_OUT = 108;
68
69 SKIP_RINGING = 200;
70 SILENCE = 201;
71 MUTE = 202;
72 UNMUTE = 203;
73 AUDIO_ROUTE_BT = 204;
74 AUDIO_ROUTE_EARPIECE = 205;
75 AUDIO_ROUTE_HEADSET = 206;
76 AUDIO_ROUTE_SPEAKER = 207;
77
78 CONFERENCE_WITH = 300;
79 SPLIT_CONFERENCE = 301;
80 SET_PARENT = 302;
81
82 REQUEST_HOLD = 400;
83 REQUEST_UNHOLD = 401;
84 REMOTELY_HELD = 402;
85 REMOTELY_UNHELD = 403;
86 SET_HOLD = 404;
87 SWAP = 405;
88
89 REQUEST_PULL = 500;
90 }
91
92 // The ID of the event.
93 optional EventName event_name = 1;
94
95 // The elapsed time since the last event, rounded to one significant digit.
96 // If the event is the first, this will be negative.
97 optional int64 time_since_last_event_millis = 2;
98}
99
100message VideoEvent {
101 // From android.telecom.ParcelableCallAnalytics
102 enum VideoEventName {
103 SEND_LOCAL_SESSION_MODIFY_REQUEST = 0;
104 SEND_LOCAL_SESSION_MODIFY_RESPONSE = 1;
105 RECEIVE_REMOTE_SESSION_MODIFY_REQUEST = 2;
106 RECEIVE_REMOTE_SESSION_MODIFY_RESPONSE = 3;
107 }
108
109 // From android.telecom.VideoProfile
110 enum VideoState {
111 STATE_AUDIO_ONLY = 0;
112 STATE_TX_ENABLED = 1;
113 STATE_RX_ENABLED = 2;
114 STATE_BIDIRECTIONAL = 3;
115 STATE_PAUSED = 4;
116 }
117
118 // The ID of the event.
119 optional VideoEventName event_name = 1;
120
121 // The elapsed time since the last event, rounded to one significant digit.
122 // If the event is the first, this will be negative.
123 optional int64 time_since_last_event_millis = 2;
124
125 // The video state
126 optional int32 video_state = 3;
127}
128
129message EventTimingEntry {
130 enum EventTimingName {
131 ACCEPT_TIMING = 0;
132 REJECT_TIMING = 1;
133 DISCONNECT_TIMING = 2;
134 HOLD_TIMING = 3;
135 UNHOLD_TIMING = 4;
136 OUTGOING_TIME_TO_DIALING_TIMING = 5;
137 BIND_CS_TIMING = 6;
138 SCREENING_COMPLETED_TIMING = 7;
139 DIRECT_TO_VM_FINISHED_TIMING = 8;
140 BLOCK_CHECK_FINISHED_TIMING = 9;
141 FILTERING_COMPLETED_TIMING = 10;
142 FILTERING_TIMED_OUT_TIMING = 11;
143 }
144
145 // The name of the event timing.
146 optional EventTimingName timing_name = 1;
147
148 // The number of milliseconds that this event pair took.
149 optional int64 time_millis = 2;
150}
151
152// Information about each call.
153message CallLog {
154
155 // Information on call-types.
156 enum CallType {
157
158 // Call type is not known.
159 CALLTYPE_UNKNOWN = 0;
160
161 // Incoming call.
162 CALLTYPE_INCOMING = 1;
163
164 // Outgoing call.
165 CALLTYPE_OUTGOING = 2;
166 }
167
168 // Termination code.
169 enum CallTerminationCode {
170
171 // Disconnected because of an unknown or unspecified reason.
172 CALL_TERMINATION_CODE_UNKNOWN = 0;
173
174 // Disconnected because there was an error, such as a problem
175 // with the network.
176 CALL_TERMINATION_CODE_ERROR = 1;
177
178 // Disconnected because of a local user-initiated action,
179 // such as hanging up.
180 CALL_TERMINATION_CODE_LOCAL = 2;
181
182 // Disconnected because of a remote user-initiated action,
183 // such as the other party hanging up.
184 CALL_TERMINATION_CODE_REMOTE = 3;
185
186 // Disconnected because it has been canceled.
187 CALL_TERMINATION_CODE_CANCELED = 4;
188
189 // Disconnected because there was no response to an incoming call.
190 CALL_TERMINATION_CODE_MISSED = 5;
191
192 // Disconnected because the user rejected an incoming call.
193 CALL_TERMINATION_CODE_REJECTED = 6;
194
195 // Disconnected because the other party was busy.
196 CALL_TERMINATION_CODE_BUSY = 7;
197
198 // Disconnected because of a restriction on placing the call,
199 // such as dialing in airplane mode.
200 CALL_TERMINATION_CODE_RESTRICTED = 8;
201
202 // Disconnected for reason not described by other disconnect codes.
203 CALL_TERMINATION_CODE_OTHER = 9;
204
205 // Disconnected because the connection manager did not support the call.
206 // The call will be tried again without a connection manager.
207 CONNECTION_MANAGER_NOT_SUPPORTED = 10;
208 }
209
210 // Start time of the connection.
211 // Rounded to the nearest 5 minute interval.
212 optional int64 start_time_5min = 1;
213
214 // Duration in millis.
215 optional int64 call_duration_millis = 2;
216
217 // Call type.
218 optional CallType type = 3;
219
220 // True if the call interrupted an in-progress call, whether it was the
221 // user dialing out during a call or an incoming call during another call.
222 optional bool is_additional_call = 4 [default = false];
223
224 // True if the call was interrupted by another call.
225 optional bool is_interrupted = 5 [default = false];
226
227 // A bitmask with bits corresponding to call technologies that were used
228 // during the call. The ones that we will record are CDMA, GSM, IMS, SIP,
229 // and third-party.
230 // https://googleplex-android-review.git.corp.google.com/#/c/816516/6/src/com/android/server/telecom/Analytics.java
231 optional int32 call_technologies = 6;
232
233 // Indicates the call termination code.
234 optional CallTerminationCode call_termination_code = 7;
235
236 // A list of the package names of connection services used.
237 repeated string connection_service = 9;
238
239 // Set to true if the call was created from createCallForExistingConnection.
240 optional bool is_created_from_existing_connection = 10 [default = false];
241
242 // Set to true if its an emergency call.
243 optional bool is_emergency_call = 11 [default = false];
244
245 // A list of the events that occur during the call.
246 repeated Event call_events = 12;
247
248 // A map from the names of latency timings to the timings.
249 repeated EventTimingEntry call_timings = 13;
250
251 // Whether this call has ever been a video call
252 optional bool is_video_call = 14 [default = false];
253
254 // A list of the video events during the call.
255 repeated VideoEvent video_events = 15;
256}