blob: 73eba876bed5d8e7a254930937877471c7371800 [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;
180}
181
Hall Liu2f4f0a02016-08-08 17:23:20 -0700182// Information about each call.
183message CallLog {
184
185 // Information on call-types.
186 enum CallType {
187
188 // Call type is not known.
189 CALLTYPE_UNKNOWN = 0;
190
191 // Incoming call.
192 CALLTYPE_INCOMING = 1;
193
194 // Outgoing call.
195 CALLTYPE_OUTGOING = 2;
196 }
197
198 // Termination code.
199 enum CallTerminationCode {
200
201 // Disconnected because of an unknown or unspecified reason.
202 CALL_TERMINATION_CODE_UNKNOWN = 0;
203
204 // Disconnected because there was an error, such as a problem
205 // with the network.
206 CALL_TERMINATION_CODE_ERROR = 1;
207
208 // Disconnected because of a local user-initiated action,
209 // such as hanging up.
210 CALL_TERMINATION_CODE_LOCAL = 2;
211
212 // Disconnected because of a remote user-initiated action,
213 // such as the other party hanging up.
214 CALL_TERMINATION_CODE_REMOTE = 3;
215
216 // Disconnected because it has been canceled.
217 CALL_TERMINATION_CODE_CANCELED = 4;
218
219 // Disconnected because there was no response to an incoming call.
220 CALL_TERMINATION_CODE_MISSED = 5;
221
222 // Disconnected because the user rejected an incoming call.
223 CALL_TERMINATION_CODE_REJECTED = 6;
224
225 // Disconnected because the other party was busy.
226 CALL_TERMINATION_CODE_BUSY = 7;
227
228 // Disconnected because of a restriction on placing the call,
229 // such as dialing in airplane mode.
230 CALL_TERMINATION_CODE_RESTRICTED = 8;
231
232 // Disconnected for reason not described by other disconnect codes.
233 CALL_TERMINATION_CODE_OTHER = 9;
234
235 // Disconnected because the connection manager did not support the call.
236 // The call will be tried again without a connection manager.
237 CONNECTION_MANAGER_NOT_SUPPORTED = 10;
238 }
239
Shaotang Li03ec7ce2018-07-19 17:37:17 +0800240 // The source where user initiated this call.
241 enum CallSource {
242 // Call source is not specified.
243 CALL_SOURCE_UNSPECIFIED = 0;
244
245 // Dialpad at emergency dialer.
246 CALL_SOURCE_EMERGENCY_DIALPAD = 1;
247
248 // Shortcut button at emergency dialer.
249 CALL_SOURCE_EMERGENCY_SHORTCUT = 2;
250 }
251
Hall Liu2f4f0a02016-08-08 17:23:20 -0700252 // Start time of the connection.
253 // Rounded to the nearest 5 minute interval.
254 optional int64 start_time_5min = 1;
255
256 // Duration in millis.
257 optional int64 call_duration_millis = 2;
258
259 // Call type.
260 optional CallType type = 3;
261
262 // True if the call interrupted an in-progress call, whether it was the
263 // user dialing out during a call or an incoming call during another call.
264 optional bool is_additional_call = 4 [default = false];
265
266 // True if the call was interrupted by another call.
267 optional bool is_interrupted = 5 [default = false];
268
269 // A bitmask with bits corresponding to call technologies that were used
270 // during the call. The ones that we will record are CDMA, GSM, IMS, SIP,
271 // and third-party.
Hall Liu9d15ca42016-08-30 17:18:36 -0700272 // See the com.android.server.telecom.Analytics.*_PHONE constants.
Hall Liu2f4f0a02016-08-08 17:23:20 -0700273 optional int32 call_technologies = 6;
274
275 // Indicates the call termination code.
276 optional CallTerminationCode call_termination_code = 7;
277
278 // A list of the package names of connection services used.
279 repeated string connection_service = 9;
280
281 // Set to true if the call was created from createCallForExistingConnection.
282 optional bool is_created_from_existing_connection = 10 [default = false];
283
284 // Set to true if its an emergency call.
285 optional bool is_emergency_call = 11 [default = false];
286
287 // A list of the events that occur during the call.
288 repeated Event call_events = 12;
289
290 // A map from the names of latency timings to the timings.
291 repeated EventTimingEntry call_timings = 13;
292
293 // Whether this call has ever been a video call
294 optional bool is_video_call = 14 [default = false];
295
296 // A list of the video events during the call.
297 repeated VideoEvent video_events = 15;
Hall Liu9d15ca42016-08-30 17:18:36 -0700298
299 // A list of the in-call services bound during the call.
300 repeated InCallServiceInfo in_call_services = 16;
Hall Liud7fe6862016-09-09 16:36:14 -0700301
302 // A bitmask of the properties that were set at any point during the call.
303 // Bits are defined by android.telecom.Connection.PROPERTY_* constants.
304 optional int32 connection_properties = 17;
Shaotang Li03ec7ce2018-07-19 17:37:17 +0800305
306 // Call source.
307 optional CallSource call_source = 18;
Hall Liu2f4f0a02016-08-08 17:23:20 -0700308}