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