blob: 411b8e239ba1b8324e0eafce4ef53a35d83e5943 [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;
Siddharth Ray23e48f32018-08-13 10:14:17 -070016
17 // Hardware revision (EVT, DVT, PVT etc.)
18 optional string hardware_revision = 3;
Hall Liu92629e22019-08-27 16:52:40 -070019
20 // Carrier ID that the device is associated to
21 optional int32 carrier_id = 4;
Hall Liu2f4f0a02016-08-08 17:23:20 -070022}
23
24message LogSessionTiming {
25 enum SessionEntryPoint {
Hall Liuaaebe962016-11-10 17:17:30 -080026 ENTRY_POINT_UNSPECIFIED = 0;
Hall Liu2f4f0a02016-08-08 17:23:20 -070027 ICA_ANSWER_CALL = 1;
28 ICA_REJECT_CALL = 2;
29 ICA_DISCONNECT_CALL = 3;
30 ICA_HOLD_CALL = 4;
31 ICA_UNHOLD_CALL = 5;
32 ICA_MUTE = 6;
33 ICA_SET_AUDIO_ROUTE = 7;
34 ICA_CONFERENCE = 8;
35
36 CSW_HANDLE_CREATE_CONNECTION_COMPLETE = 100;
37 CSW_SET_ACTIVE = 101;
38 CSW_SET_RINGING = 102;
39 CSW_SET_DIALING = 103;
40 CSW_SET_DISCONNECTED = 104;
41 CSW_SET_ON_HOLD = 105;
42 CSW_REMOVE_CALL = 106;
43 CSW_SET_IS_CONFERENCED = 107;
44 CSW_ADD_CONFERENCE_CALL = 108;
45 }
46
47 // The entry point into Telecom code that this session tracks.
48 optional SessionEntryPoint sessionEntryPoint = 1;
49 // The time it took for this session to finish.
50 optional int64 time_millis = 2;
51}
52
53message Event {
54 // From android.telecom.ParcelableAnalytics
55 enum EventName {
Hall Liuaaebe962016-11-10 17:17:30 -080056 EVENT_NAME_UNSPECIFIED = 9999;
Hall Liu2f4f0a02016-08-08 17:23:20 -070057 SET_SELECT_PHONE_ACCOUNT = 0;
58 SET_ACTIVE = 1;
59 SET_DISCONNECTED = 2;
60 START_CONNECTION = 3;
61 SET_DIALING = 4;
62 BIND_CS = 5;
63 CS_BOUND = 6;
64 REQUEST_ACCEPT = 7;
65 REQUEST_REJECT = 8;
66
67 SCREENING_SENT = 100;
68 SCREENING_COMPLETED = 101;
69 DIRECT_TO_VM_INITIATED = 102;
70 DIRECT_TO_VM_FINISHED = 103;
71 BLOCK_CHECK_INITIATED = 104;
72 BLOCK_CHECK_FINISHED = 105;
73 FILTERING_INITIATED = 106;
74 FILTERING_COMPLETED = 107;
75 FILTERING_TIMED_OUT = 108;
76
77 SKIP_RINGING = 200;
78 SILENCE = 201;
79 MUTE = 202;
80 UNMUTE = 203;
81 AUDIO_ROUTE_BT = 204;
82 AUDIO_ROUTE_EARPIECE = 205;
83 AUDIO_ROUTE_HEADSET = 206;
84 AUDIO_ROUTE_SPEAKER = 207;
85
86 CONFERENCE_WITH = 300;
87 SPLIT_CONFERENCE = 301;
88 SET_PARENT = 302;
89
90 REQUEST_HOLD = 400;
91 REQUEST_UNHOLD = 401;
92 REMOTELY_HELD = 402;
93 REMOTELY_UNHELD = 403;
94 SET_HOLD = 404;
95 SWAP = 405;
96
97 REQUEST_PULL = 500;
98 }
99
100 // The ID of the event.
101 optional EventName event_name = 1;
102
103 // The elapsed time since the last event, rounded to one significant digit.
104 // If the event is the first, this will be negative.
105 optional int64 time_since_last_event_millis = 2;
106}
107
108message VideoEvent {
109 // From android.telecom.ParcelableCallAnalytics
110 enum VideoEventName {
Hall Liuaaebe962016-11-10 17:17:30 -0800111 VIDEO_EVENT_NAME_UNSPECIFIED = 9999;
Hall Liu2f4f0a02016-08-08 17:23:20 -0700112 SEND_LOCAL_SESSION_MODIFY_REQUEST = 0;
113 SEND_LOCAL_SESSION_MODIFY_RESPONSE = 1;
114 RECEIVE_REMOTE_SESSION_MODIFY_REQUEST = 2;
115 RECEIVE_REMOTE_SESSION_MODIFY_RESPONSE = 3;
116 }
117
118 // From android.telecom.VideoProfile
119 enum VideoState {
Hall Liuaaebe962016-11-10 17:17:30 -0800120 // No unspecified field to define. This enum to be used only as values for a bitmask.
121 STATE_AUDIO_ONLY = 0;
122 STATE_TX_ENABLED = 1;
123 STATE_RX_ENABLED = 2;
124 STATE_BIDIRECTIONAL = 3;
125 STATE_PAUSED = 4;
Hall Liu2f4f0a02016-08-08 17:23:20 -0700126 }
127
128 // The ID of the event.
129 optional VideoEventName event_name = 1;
130
131 // The elapsed time since the last event, rounded to one significant digit.
132 // If the event is the first, this will be negative.
133 optional int64 time_since_last_event_millis = 2;
134
135 // The video state
136 optional int32 video_state = 3;
137}
138
139message EventTimingEntry {
140 enum EventTimingName {
Hall Liuaaebe962016-11-10 17:17:30 -0800141 EVENT_TIMING_NAME_UNSPECIFIED = 9999;
Hall Liu2f4f0a02016-08-08 17:23:20 -0700142 ACCEPT_TIMING = 0;
143 REJECT_TIMING = 1;
144 DISCONNECT_TIMING = 2;
145 HOLD_TIMING = 3;
146 UNHOLD_TIMING = 4;
147 OUTGOING_TIME_TO_DIALING_TIMING = 5;
148 BIND_CS_TIMING = 6;
149 SCREENING_COMPLETED_TIMING = 7;
150 DIRECT_TO_VM_FINISHED_TIMING = 8;
151 BLOCK_CHECK_FINISHED_TIMING = 9;
152 FILTERING_COMPLETED_TIMING = 10;
153 FILTERING_TIMED_OUT_TIMING = 11;
Shaotang Li03ec7ce2018-07-19 17:37:17 +0800154 START_CONNECTION_TO_REQUEST_DISCONNECT_TIMING = 12;
Hall Liu2f4f0a02016-08-08 17:23:20 -0700155 }
156
157 // The name of the event timing.
158 optional EventTimingName timing_name = 1;
159
160 // The number of milliseconds that this event pair took.
161 optional int64 time_millis = 2;
162}
163
Hall Liu9d15ca42016-08-30 17:18:36 -0700164message InCallServiceInfo {
165 // Keep this up-to-date with com.android.server.telecom.InCallController.
166 enum InCallServiceType {
Hall Liuaaebe962016-11-10 17:17:30 -0800167 IN_CALL_SERVICE_TYPE_UNSPECIFIED = 9999;
Hall Liu9d15ca42016-08-30 17:18:36 -0700168 IN_CALL_SERVICE_TYPE_INVALID = 0;
169 IN_CALL_SERVICE_TYPE_DIALER_UI = 1;
170 IN_CALL_SERVICE_TYPE_SYSTEM_UI = 2;
171 IN_CALL_SERVICE_TYPE_CAR_MODE_UI = 3;
172 IN_CALL_SERVICE_TYPE_NON_UI = 4;
173 }
174
175 // The shortened component name of the in-call service.
176 optional string in_call_service_name = 1;
177
178 // The type of the in-call service
179 optional InCallServiceType in_call_service_type = 2;
Grace Jia6306f472020-01-24 12:10:20 -0800180
181 // The number of milliseconds that the in call service remained bound between binding and
182 // disconnection.
183 optional int64 bound_duration_millis = 3;
184
185 // True if the in call service has ever crashed during a call.
186 optional bool is_null_binding = 4;
Hall Liu9d15ca42016-08-30 17:18:36 -0700187}
188
Hall Liu2f4f0a02016-08-08 17:23:20 -0700189// Information about each call.
190message CallLog {
191
192 // Information on call-types.
193 enum CallType {
194
195 // Call type is not known.
196 CALLTYPE_UNKNOWN = 0;
197
198 // Incoming call.
199 CALLTYPE_INCOMING = 1;
200
201 // Outgoing call.
202 CALLTYPE_OUTGOING = 2;
203 }
204
205 // Termination code.
206 enum CallTerminationCode {
207
208 // Disconnected because of an unknown or unspecified reason.
209 CALL_TERMINATION_CODE_UNKNOWN = 0;
210
211 // Disconnected because there was an error, such as a problem
212 // with the network.
213 CALL_TERMINATION_CODE_ERROR = 1;
214
215 // Disconnected because of a local user-initiated action,
216 // such as hanging up.
217 CALL_TERMINATION_CODE_LOCAL = 2;
218
219 // Disconnected because of a remote user-initiated action,
220 // such as the other party hanging up.
221 CALL_TERMINATION_CODE_REMOTE = 3;
222
223 // Disconnected because it has been canceled.
224 CALL_TERMINATION_CODE_CANCELED = 4;
225
226 // Disconnected because there was no response to an incoming call.
227 CALL_TERMINATION_CODE_MISSED = 5;
228
229 // Disconnected because the user rejected an incoming call.
230 CALL_TERMINATION_CODE_REJECTED = 6;
231
232 // Disconnected because the other party was busy.
233 CALL_TERMINATION_CODE_BUSY = 7;
234
235 // Disconnected because of a restriction on placing the call,
236 // such as dialing in airplane mode.
237 CALL_TERMINATION_CODE_RESTRICTED = 8;
238
239 // Disconnected for reason not described by other disconnect codes.
240 CALL_TERMINATION_CODE_OTHER = 9;
241
242 // Disconnected because the connection manager did not support the call.
243 // The call will be tried again without a connection manager.
244 CONNECTION_MANAGER_NOT_SUPPORTED = 10;
245 }
246
Shaotang Li03ec7ce2018-07-19 17:37:17 +0800247 // The source where user initiated this call.
248 enum CallSource {
249 // Call source is not specified.
250 CALL_SOURCE_UNSPECIFIED = 0;
251
252 // Dialpad at emergency dialer.
253 CALL_SOURCE_EMERGENCY_DIALPAD = 1;
254
255 // Shortcut button at emergency dialer.
256 CALL_SOURCE_EMERGENCY_SHORTCUT = 2;
257 }
258
Hall Liu2f4f0a02016-08-08 17:23:20 -0700259 // Start time of the connection.
260 // Rounded to the nearest 5 minute interval.
261 optional int64 start_time_5min = 1;
262
263 // Duration in millis.
264 optional int64 call_duration_millis = 2;
265
266 // Call type.
267 optional CallType type = 3;
268
269 // True if the call interrupted an in-progress call, whether it was the
270 // user dialing out during a call or an incoming call during another call.
271 optional bool is_additional_call = 4 [default = false];
272
273 // True if the call was interrupted by another call.
274 optional bool is_interrupted = 5 [default = false];
275
276 // A bitmask with bits corresponding to call technologies that were used
277 // during the call. The ones that we will record are CDMA, GSM, IMS, SIP,
278 // and third-party.
Hall Liu9d15ca42016-08-30 17:18:36 -0700279 // See the com.android.server.telecom.Analytics.*_PHONE constants.
Hall Liu2f4f0a02016-08-08 17:23:20 -0700280 optional int32 call_technologies = 6;
281
282 // Indicates the call termination code.
283 optional CallTerminationCode call_termination_code = 7;
284
285 // A list of the package names of connection services used.
286 repeated string connection_service = 9;
287
288 // Set to true if the call was created from createCallForExistingConnection.
289 optional bool is_created_from_existing_connection = 10 [default = false];
290
291 // Set to true if its an emergency call.
292 optional bool is_emergency_call = 11 [default = false];
293
294 // A list of the events that occur during the call.
295 repeated Event call_events = 12;
296
297 // A map from the names of latency timings to the timings.
298 repeated EventTimingEntry call_timings = 13;
299
300 // Whether this call has ever been a video call
301 optional bool is_video_call = 14 [default = false];
302
303 // A list of the video events during the call.
304 repeated VideoEvent video_events = 15;
Hall Liu9d15ca42016-08-30 17:18:36 -0700305
306 // A list of the in-call services bound during the call.
307 repeated InCallServiceInfo in_call_services = 16;
Hall Liud7fe6862016-09-09 16:36:14 -0700308
309 // A bitmask of the properties that were set at any point during the call.
310 // Bits are defined by android.telecom.Connection.PROPERTY_* constants.
311 optional int32 connection_properties = 17;
Shaotang Li03ec7ce2018-07-19 17:37:17 +0800312
313 // Call source.
314 optional CallSource call_source = 18;
Hall Liu2f4f0a02016-08-08 17:23:20 -0700315}