• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2020 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18
19package telephonyStatsLog;
20
21option java_package = "com.android.internal.telephony";
22option java_outer_classname = "PersistAtomsProto";
23
24// Holds atoms to store on persist storage in case of power cycle or process crash.
25// NOTE: using int64 rather than google.protobuf.Timestamp for timestamps simplifies implementation.
26// Next id: 53
27message PersistAtoms {
28    /* Aggregated RAT usage during the call. */
29    repeated VoiceCallRatUsage voice_call_rat_usage = 1;
30
31    /* Timestamp of last voice_call_rat_usages pull. */
32    optional int64 voice_call_rat_usage_pull_timestamp_millis = 2;
33
34    /* Per call statistics and information. */
35    repeated VoiceCallSession voice_call_session = 3;
36
37    /* Timestamp of last voice_call_sessions pull. */
38    optional int64 voice_call_session_pull_timestamp_millis = 4;
39
40    /* Incoming SMS statistics and information. */
41    repeated IncomingSms incoming_sms = 5;
42
43    /* Timestamp of last incoming_sms pull. */
44    optional int64 incoming_sms_pull_timestamp_millis = 6;
45
46    /* Outgoing SMS statistics and information. */
47    repeated OutgoingSms outgoing_sms = 7;
48
49    /* Timestamp of last incoming_sms pull. */
50    optional int64 outgoing_sms_pull_timestamp_millis = 8;
51
52    /* List of carrier ID mismatch events already sent. */
53    repeated CarrierIdMismatch carrier_id_mismatch = 9;
54
55    /* Last version of carrier ID table sent. */
56    optional int32 carrier_id_table_version = 10;
57
58    /* Data Call session statistics and information. */
59    repeated DataCallSession data_call_session = 11;
60
61    /* Timestamp of last data_call_session pull. */
62    optional int64 data_call_session_pull_timestamp_millis = 12;
63
64    /* Duration spent in each possible service state. */
65    repeated CellularServiceState cellular_service_state = 13;
66
67    /* Timestamp of last cellular_service_state pull. */
68    optional int64 cellular_service_state_pull_timestamp_millis = 14;
69
70    /* Switch count between data RATs. */
71    repeated CellularDataServiceSwitch cellular_data_service_switch = 15;
72
73    /* Timestamp of last cellular_data_service_switch pull. */
74    optional int64 cellular_data_service_switch_pull_timestamp_millis = 16;
75
76    /* List of IMS registration terminations. */
77    repeated ImsRegistrationTermination ims_registration_termination = 17;
78
79    /* Timestamp of last ims_registration_termination pull. */
80    optional int64 ims_registration_termination_pull_timestamp_millis = 18;
81
82    /* Durations of IMS registrations and capabilities. */
83    repeated ImsRegistrationStats ims_registration_stats = 19;
84
85    /* Timestamp of last ims_registration_stats pull. */
86    optional int64 ims_registration_stats_pull_timestamp_millis = 20;
87
88    /* Last Android build fingerprint. This usually changes after system OTA. */
89    optional string build_fingerprint = 21;
90
91    /* Summary of received network requests. */
92    repeated NetworkRequests network_requests = 22 [deprecated = true];
93
94    /* Timestamp of last network_requests pull. */
95    optional int64 network_requests_pull_timestamp_millis = 23 [deprecated = true];
96
97    /* RCS single registrtions feature tag information. */
98    repeated ImsRegistrationFeatureTagStats ims_registration_feature_tag_stats = 24;
99
100    /* Timestamp of last ims_registration_feature_tag_stats pull. */
101    optional int64 ims_registration_feature_tag_stats_pull_timestamp_millis = 25;
102
103    /* RCS client provisioning statistics and information. */
104    repeated RcsClientProvisioningStats rcs_client_provisioning_stats = 26;
105
106    /* Timestamp of last rcs_client_provisioning_stats pull. */
107    optional int64 rcs_client_provisioning_stats_pull_timestamp_millis = 27;
108
109    /* RCS configuration statistics and information based ACS. */
110    repeated RcsAcsProvisioningStats rcs_acs_provisioning_stats = 28;
111
112    /* Timestamp of last rcs_acs_provisioning_stats pull. */
113    optional int64 rcs_acs_provisioning_stats_pull_timestamp_millis = 29;
114
115    /* SIP delegate statistics and information. */
116    repeated SipDelegateStats sip_delegate_stats = 30;
117
118    /* Timestamp of last sip_delegate_stats pull. */
119    optional int64 sip_delegate_stats_pull_timestamp_millis = 31;
120
121    /* SIP Transport featuere tag statistics and information. */
122    repeated SipTransportFeatureTagStats sip_transport_feature_tag_stats = 32;
123
124    /* Timestamp of last sip_transport_feature_tag_stats pull. */
125    optional int64 sip_transport_feature_tag_stats_pull_timestamp_millis = 33;
126
127    /* SIP Message response statistics and information. */
128    repeated SipMessageResponse sip_message_response = 34;
129
130    /* Timestamp of last sip_message_response pull. */
131    optional int64 sip_message_response_pull_timestamp_millis = 35;
132
133    /* SIP Transport session statistics and information. */
134    repeated SipTransportSession sip_transport_session = 36;
135
136    /* Timestamp of last sip_transport_session pull. */
137    optional int64 sip_transport_session_pull_timestamp_millis = 37;
138
139    /* Dedicated bearer listener statistics and information. */
140    repeated ImsDedicatedBearerListenerEvent ims_dedicated_bearer_listener_event = 38;
141
142    /* Timestamp of last ims_dedicated_bearer_listener_event pull. */
143    optional int64 ims_dedicated_bearer_listener_event_pull_timestamp_millis = 39;
144
145    /* Dedicated bearer event statistics and information. */
146    repeated ImsDedicatedBearerEvent ims_dedicated_bearer_event = 40;
147
148    /* Timestamp of last ims_dedicated_bearer_event pull. */
149    optional int64 ims_dedicated_bearer_event_pull_timestamp_millis = 41;
150
151    /* Publish featere tag statistics and information. */
152    repeated ImsRegistrationServiceDescStats ims_registration_service_desc_stats = 42;
153
154    /* Timestamp of last ims_registration_service_desc_stats pull. */
155    optional int64 ims_registration_service_desc_stats_pull_timestamp_millis = 43;
156
157    /* UCE event stats statistics and information. */
158    repeated UceEventStats uce_event_stats = 44;
159
160    /* Timestamp of last uce_event_stats pull. */
161    optional int64 uce_event_stats_pull_timestamp_millis = 45;
162
163    /* Presence notify event statistics and information. */
164    repeated PresenceNotifyEvent presence_notify_event = 46;
165
166    /* Timestamp of last presence_notify_event pull. */
167    optional int64 presence_notify_event_pull_timestamp_millis = 47;
168
169    /* GBA event statistics and information. */
170    repeated GbaEvent gba_event = 48;
171
172    /* Timestamp of last gba_event pull. */
173    optional int64 gba_event_pull_timestamp_millis = 49;
174
175    /* Summary of received network requests. */
176    repeated NetworkRequestsV2 network_requests_v2 = 50;
177
178    /* Timestamp of last network_requests_v2 pull. */
179    optional int64 network_requests_v2_pull_timestamp_millis = 51;
180
181    /* Unmetered networks information. */
182    repeated UnmeteredNetworks unmetered_networks = 52;
183}
184
185// The canonical versions of the following enums live in:
186//   frameworks/proto_logging/stats/enums/telephony/enums.proto
187// The canonical versions of the following atoms live in:
188//   frameworks/proto_logging/stats/atoms.proto
189// We cannot link against framework's and statsd's protolite libraries as it is "for test only".
190// NOTE: StatsLog functions use int in place of enum
191
192message VoiceCallSession {
193    optional int32 bearer_at_start = 1;
194    optional int32 bearer_at_end = 2;
195    optional int32 direction = 3;
196    optional int32 setup_duration = 4;
197    optional bool setup_failed = 5;
198    optional int32 disconnect_reason_code = 6;
199    optional int32 disconnect_extra_code = 7;
200    optional string disconnect_extra_message = 8;
201    optional int32 rat_at_start = 9;
202    optional int32 rat_at_end = 10;
203    optional int64 rat_switch_count = 11;
204    optional int64 codec_bitmask = 12;
205    optional int32 concurrent_call_count_at_start = 13;
206    optional int32 concurrent_call_count_at_end = 14;
207    optional int32 sim_slot_index = 15;
208    optional bool is_multi_sim = 16;
209    optional bool is_esim = 17;
210    optional int32 carrier_id = 18;
211    optional bool srvcc_completed = 19;
212    optional int64 srvcc_failure_count = 20;
213    optional int64 srvcc_cancellation_count = 21;
214    optional bool rtt_enabled = 22;
215    optional bool is_emergency = 23;
216    optional bool is_roaming = 24;
217    optional int32 signal_strength_at_end = 25;
218    optional int32 band_at_end = 26;
219    optional int32 setup_duration_millis = 27;
220    optional int32 main_codec_quality = 28;
221    optional bool video_enabled = 29;
222    optional int32 rat_at_connected = 30;
223    optional bool is_multiparty = 31;
224    optional int32 call_duration = 32;
225    optional int32 last_known_rat = 33;
226    // Internal use only
227    optional int64 setup_begin_millis = 10001;
228}
229
230message VoiceCallRatUsage {
231    optional int32 carrier_id = 1;
232    optional int32 rat = 2;
233    optional int64 total_duration_millis = 3; // Duration needs to be rounded when pulled
234    optional int64 call_count = 4;
235}
236
237message IncomingSms {
238    optional int32 sms_format = 1;
239    optional int32 sms_tech = 2;
240    optional int32 rat = 3;
241    optional int32 sms_type = 4;
242    optional int32 total_parts = 5;
243    optional int32 received_parts = 6;
244    optional bool blocked = 7;
245    optional int32 error = 8;
246    optional bool is_roaming = 9;
247    optional int32 sim_slot_index = 10;
248    optional bool is_multi_sim = 11;
249    optional bool is_esim = 12;
250    optional int32 carrier_id = 13;
251    optional int64 message_id = 14;
252    optional int32 count = 15;
253
254    // Internal use only
255    optional int32 hashCode = 10001;
256}
257
258message OutgoingSms {
259    optional int32 sms_format = 1;
260    optional int32 sms_tech = 2;
261    optional int32 rat = 3;
262    optional int32 send_result = 4;
263    optional int32 error_code = 5;
264    optional bool is_roaming = 6;
265    optional bool is_from_default_app = 7;
266    optional int32 sim_slot_index = 8;
267    optional bool is_multi_sim = 9;
268    optional bool is_esim = 10;
269    optional int32 carrier_id = 11;
270    optional int64 message_id = 12;
271    optional int32 retry_id = 13;
272    optional int64 interval_millis = 14;
273    optional int32 count = 15;
274
275    // Internal use only
276    optional int32 hashCode = 10001;
277}
278
279message CarrierIdMismatch {
280    optional string mcc_mnc = 1;
281    optional string gid1 = 2;
282    optional string spn = 3;
283    optional string pnn = 4;
284}
285
286message DataCallSession {
287    reserved 4;
288    optional int32 dimension = 1;
289    optional bool is_multi_sim = 2;
290    optional bool is_esim = 3;
291    optional int32 apn_type_bitmask = 5;
292    optional int32 carrier_id = 6;
293    optional bool is_roaming = 7;
294    optional int32 rat_at_end = 8;
295    optional bool oos_at_end = 9;
296    optional int64 rat_switch_count = 10;
297    optional bool is_opportunistic = 11;
298    optional int32 ip_type = 12;
299    optional bool setup_failed = 13;
300    optional int32 failure_cause = 14;
301    optional int32 suggested_retry_millis = 15;
302    optional int32 deactivate_reason = 16;
303    optional int64 duration_minutes = 17;
304    optional bool ongoing = 18;
305    optional int32 band_at_end = 19;
306    repeated int32 handover_failure_causes = 20;
307    repeated int32 handover_failure_rat = 21;
308}
309
310message CellularServiceState {
311    optional int32 voice_rat = 1;
312    optional int32 data_rat = 2;
313    optional int32 voice_roaming_type = 3;
314    optional int32 data_roaming_type = 4;
315    optional bool is_endc = 5;
316    optional int32 sim_slot_index = 6;
317    optional bool is_multi_sim = 7;
318    optional int32 carrier_id = 8;
319    optional int64 total_time_millis = 9; // Duration needs to be rounded when pulled
320    optional bool is_emergency_only = 10;
321
322    // Internal use only
323    optional int64 last_used_millis = 10001;
324}
325
326message CellularDataServiceSwitch {
327    optional int32 rat_from = 1;
328    optional int32 rat_to = 2;
329    optional int32 sim_slot_index = 3;
330    optional bool is_multi_sim = 4;
331    optional int32 carrier_id = 5;
332    optional int32 switch_count = 6;
333
334    // Internal use only
335    optional int64 last_used_millis = 10001;
336}
337
338message ImsRegistrationTermination {
339    optional int32 carrier_id = 1;
340    optional bool is_multi_sim = 2;
341    optional int32 rat_at_end = 3;
342    optional bool setup_failed = 4;
343    optional int32 reason_code = 5;
344    optional int32 extra_code = 6;
345    optional string extra_message = 7;
346    optional int32 count = 8;
347
348    // Internal use only
349    optional int64 last_used_millis = 10001;
350}
351
352message ImsRegistrationStats {
353    optional int32 carrier_id = 1;
354    optional int32 sim_slot_index = 2;
355    optional int32 rat = 3;
356    // Durations need to be rounded when pulled
357    optional int64 registered_millis = 4;
358    optional int64 voice_capable_millis = 5;
359    optional int64 voice_available_millis = 6;
360    optional int64 sms_capable_millis = 7;
361    optional int64 sms_available_millis = 8;
362    optional int64 video_capable_millis = 9;
363    optional int64 video_available_millis = 10;
364    optional int64 ut_capable_millis = 11;
365    optional int64 ut_available_millis = 12;
366
367    // Internal use only
368    optional int64 last_used_millis = 10001;
369}
370
371// deprecated - please use NetworkRequestsV2 instead
372message NetworkRequests {
373    optional int32 carrier_id = 1;
374    optional int32 enterprise_request_count = 2;
375    optional int32 enterprise_release_count = 3;
376}
377
378message NetworkRequestsV2 {
379    enum NetworkCapability {
380        UNKNOWN = 0;
381        PRIORITIZE_LATENCY = 1;
382        PRIORITIZE_BANDWIDTH = 2;
383        CBS = 3;
384        ENTERPRISE = 4;
385    }
386    optional int32 carrier_id = 1;
387    optional NetworkCapability capability = 2;
388    optional int32 request_count = 3;
389}
390
391message ImsRegistrationFeatureTagStats {
392    optional int32 carrier_id = 1;
393    optional int32 slot_id = 2;
394    optional int32 feature_tag_name = 3;
395    optional int32 registration_tech = 4;
396    optional int64 registered_millis = 5;
397}
398
399message RcsClientProvisioningStats {
400    optional int32 carrier_id = 1;
401    optional int32 slot_id = 2;
402    optional int32 event = 3;
403    optional int32 count = 4;
404}
405
406message RcsAcsProvisioningStats {
407    optional int32 carrier_id = 1;
408    optional int32 slot_id = 2;
409    optional int32 response_code = 3;
410    optional int32 response_type = 4;
411    optional bool is_single_registration_enabled = 5;
412    optional int32 count = 6;
413    optional int64 state_timer_millis = 7;
414}
415
416message SipDelegateStats {
417    optional int32 dimension = 1;
418    optional int32 carrier_id = 2;
419    optional int32 slot_id = 3;
420    optional int32 destroy_reason = 4;
421    optional int64 uptime_millis = 5;
422}
423
424message SipTransportFeatureTagStats {
425    optional int32 carrier_id = 1;
426    optional int32 slot_id = 2;
427    optional int32 feature_tag_name = 3;
428    optional int32 sip_transport_denied_reason = 4;
429    optional int32 sip_transport_deregistered_reason = 5;
430    optional int64 associated_millis = 6;
431}
432
433message SipMessageResponse {
434    optional int32 carrier_id = 1;
435    optional int32 slot_id = 2;
436    optional int32 sip_message_method = 3;
437    optional int32 sip_message_response = 4;
438    optional int32 sip_message_direction = 5;
439    optional int32 message_error = 6;
440    optional int32 count = 7;
441}
442
443message SipTransportSession {
444    optional int32 carrier_id = 1;
445    optional int32 slot_id = 2;
446    optional int32 session_method = 3;
447    optional int32 sip_message_direction = 4;
448    optional int32 sip_response = 5;
449    optional int32 session_count = 6;
450    optional int32 ended_gracefully_count = 7;
451
452    // Internal use only
453    optional bool is_ended_gracefully = 10001;
454}
455
456message ImsDedicatedBearerListenerEvent {
457    optional int32 carrier_id = 1;
458    optional int32 slot_id = 2;
459    optional int32 rat_at_end = 3;
460    optional int32 qci = 4;
461    optional bool dedicated_bearer_established = 5;
462    optional int32 event_count = 6;
463}
464
465message ImsDedicatedBearerEvent {
466    optional int32 carrier_id = 1;
467    optional int32 slot_id = 2;
468    optional int32 rat_at_end = 3;
469    optional int32 qci = 4;
470    optional int32 bearer_state = 5;
471    optional bool local_connection_info_received = 6;
472    optional bool remote_connection_info_received = 7;
473    optional bool has_listeners = 8;
474    optional int32 count = 9;
475}
476
477message ImsRegistrationServiceDescStats {
478    optional int32 carrier_id = 1;
479    optional int32 slot_id = 2;
480    optional int32 service_id_name = 3;
481    optional float service_id_version = 4;
482    optional int32 registration_tech = 5;
483    optional int64 published_millis = 6;
484}
485
486message UceEventStats {
487    optional int32 carrier_id = 1;
488    optional int32 slot_id = 2;
489    optional int32 type = 3;
490    optional bool successful = 4;
491    optional int32 command_code = 5;
492    optional int32 network_response = 6;
493    optional int32 count = 7;
494}
495
496message PresenceNotifyEvent {
497    optional int32 carrier_id = 1;
498    optional int32 slot_id = 2;
499    optional int32 reason = 3;
500    optional bool content_body_received = 4;
501    optional int32 rcs_caps_count = 5;
502    optional int32 mmtel_caps_count = 6;
503    optional int32 no_caps_count = 7;
504    optional int32 count = 8;
505}
506
507message GbaEvent {
508    optional int32 carrier_id = 1;
509    optional int32 slot_id = 2;
510    optional bool successful = 3;
511    optional int32 failed_reason = 4;
512    optional int32 count = 5;
513}
514
515message UnmeteredNetworks {
516    optional int32 phone_id = 1;
517    optional int32 carrier_id = 2;
518    optional int64 unmetered_networks_bitmask = 3;
519}
520