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