• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2// Copyright (C) 2016 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 clearcut.connectivity;
20
21option java_package = "com.android.internal.telephony";
22option java_outer_classname = "TelephonyProto";
23
24// The information about Telephony events.
25message TelephonyLog {
26
27  // Events logged by telephony services
28  repeated TelephonyEvent events = 1;
29
30  // Voice/Video call sessions
31  repeated TelephonyCallSession call_sessions = 2;
32
33  // Send/Receive SMS sessions
34  repeated SmsSession sms_sessions = 3;
35
36  // Telephony Histograms
37  repeated TelephonyHistogram histograms = 4;
38
39  // Indicating some telephony events are dropped
40  optional bool events_dropped = 5;
41
42  // The start time of this log
43  optional Time start_time = 6;
44
45  // The end time of this log
46  optional Time end_time = 7;
47
48  // Modem power stats
49  optional ModemPowerStats modem_power_stats = 8;
50
51  // Hardware revision (EVT, DVT, PVT etc.)
52  optional string hardware_revision = 9;
53
54  // The last active subscription info for each slot.
55  repeated ActiveSubscriptionInfo last_active_subscription_info = 10;
56
57  // Bandwidth estimator stats
58  optional BandwidthEstimatorStats bandwidth_estimator_stats = 11;
59}
60
61// The time information
62message Time {
63  // The system time in milli seconds. This represents the actual
64  // time of the events.
65  optional int64 system_timestamp_millis = 1;
66
67  // The time since boot in milli seconds.
68  // This is used for calculating the time interval between events. Different
69  // from the system time, this won't be affected by time changed by the network or users.
70  optional int64 elapsed_timestamp_millis = 2;
71}
72
73// Telephony Histogram
74message TelephonyHistogram {
75
76  // Type of histogram
77  optional int32 category = 1;
78
79  // Unique Id identifying a sample within
80  // particular category of the histogram.
81  optional int32 id = 2;
82
83  // Min time taken in millis.
84  optional int32 min_time_millis = 3;
85
86  // Max time taken in millis.
87  optional int32 max_time_millis = 4;
88
89  // Average time taken in millis.
90  optional int32 avg_time_millis = 5;
91
92  // Total count of histogram samples.
93  optional int32 count = 6;
94
95  // Total number of time ranges expected
96  // (must be greater than 1).
97  optional int32 bucket_count = 7;
98
99  // Array storing endpoints of range buckets.
100  repeated int32 bucket_end_points = 8;
101
102  // Array storing counts for each time range
103  // starting from smallest value range.
104  repeated int32 bucket_counters = 9;
105}
106
107// Telephony related user settings
108message TelephonySettings {
109
110  // NETWORK_MODE_* See ril.h PREF_NET_TYPE_XXXX
111  enum RilNetworkMode {
112
113    // Mode is unknown.
114    NETWORK_MODE_UNKNOWN = 0;
115
116    // GSM/WCDMA (WCDMA preferred). Note the following values are all off by 1.
117    NETWORK_MODE_WCDMA_PREF = 1;
118
119    // GSM only
120    NETWORK_MODE_GSM_ONLY = 2;
121
122    // WCDMA only
123    NETWORK_MODE_WCDMA_ONLY = 3;
124
125    // GSM/WCDMA (auto mode, according to PRL)
126    NETWORK_MODE_GSM_UMTS = 4;
127
128    // CDMA and EvDo (auto mode, according to PRL)
129    NETWORK_MODE_CDMA = 5;
130
131    // CDMA only
132    NETWORK_MODE_CDMA_NO_EVDO = 6;
133
134    // EvDo only
135    NETWORK_MODE_EVDO_NO_CDMA = 7;
136
137    // GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL)
138    NETWORK_MODE_GLOBAL = 8;
139
140    // LTE, CDMA and EvDo
141    NETWORK_MODE_LTE_CDMA_EVDO = 9;
142
143    // LTE, GSM/WCDMA
144    NETWORK_MODE_LTE_GSM_WCDMA = 10;
145
146    // LTE, CDMA, EvDo, GSM/WCDMA
147    NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA = 11;
148
149    // LTE Only mode
150    NETWORK_MODE_LTE_ONLY = 12;
151
152    // LTE/WCDMA
153    NETWORK_MODE_LTE_WCDMA = 13;
154
155    // TD-SCDMA only
156    NETWORK_MODE_TDSCDMA_ONLY = 14;
157
158    // TD-SCDMA and WCDMA
159    NETWORK_MODE_TDSCDMA_WCDMA = 15;
160
161    // TD-SCDMA and LTE
162    NETWORK_MODE_LTE_TDSCDMA = 16;
163
164    // TD-SCDMA and GSM
165    NETWORK_MODE_TDSCDMA_GSM = 17;
166
167    // TD-SCDMA,GSM and LTE
168    NETWORK_MODE_LTE_TDSCDMA_GSM = 18;
169
170    // TD-SCDMA, GSM/WCDMA
171    NETWORK_MODE_TDSCDMA_GSM_WCDMA = 19;
172
173    // TD-SCDMA, WCDMA and LTE
174    NETWORK_MODE_LTE_TDSCDMA_WCDMA = 20;
175
176    // TD-SCDMA, GSM/WCDMA and LTE
177    NETWORK_MODE_LTE_TDSCDMA_GSM_WCDMA = 21;
178
179    // TD-SCDMA,EvDo,CDMA,GSM/WCDMA
180    NETWORK_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = 22;
181
182    // TD-SCDMA/LTE/GSM/WCDMA, CDMA, and EvDo
183    NETWORK_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = 23;
184  }
185
186  // Constants for WiFi Calling mode
187  enum WiFiCallingMode {
188
189    // Calling mode is unknown.
190    WFC_MODE_UNKNOWN = 0;
191
192    WFC_MODE_WIFI_ONLY = 1;
193
194    WFC_MODE_CELLULAR_PREFERRED = 2;
195
196    WFC_MODE_WIFI_PREFERRED = 3;
197  }
198
199  // If the device is in airplane mode.
200  optional bool is_airplane_mode = 1;
201
202  // If cell-data has been enabled.
203  optional bool is_cellular_data_enabled = 2;
204
205  // If cell-roaming has been enabled.
206  optional bool is_data_roaming_enabled = 3;
207
208  // Preferred network mode.
209  optional RilNetworkMode preferred_network_mode = 4;
210
211  // If enhanced mode enabled.
212  optional bool is_enhanced_4g_lte_mode_enabled = 5;
213
214  // If wifi has been enabled.
215  optional bool is_wifi_enabled = 6;
216
217  // If wifi-calling has been enabled.
218  optional bool is_wifi_calling_enabled = 7;
219
220  // Wifi-calling Mode.
221  optional WiFiCallingMode wifi_calling_mode = 8;
222
223  // If video over LTE enabled.
224  optional bool is_vt_over_lte_enabled = 9;
225
226  // If video over wifi enabled.
227  optional bool is_vt_over_wifi_enabled = 10;
228}
229
230// Contains phone state and service related information.
231message TelephonyServiceState {
232
233  // The information about cellular network operator
234  message TelephonyOperator {
235
236    // Name in long alphanumeric format
237    optional string alpha_long = 1;
238
239    // Name in short alphanumeric format
240    optional string alpha_short = 2;
241
242    // Numeric id.
243    // In GSM/UMTS, numeric format is 3 digit country code plus 2 or 3 digit
244    // network code. Same as MCC/MNC.
245    optional string numeric = 3;
246  }
247
248  message NetworkRegistrationInfo {
249    // Network domain
250    optional Domain domain = 1;
251
252    // Network transport
253    optional Transport transport = 2;
254
255    // Radio access technology
256    optional RadioAccessTechnology rat = 3;
257  }
258
259  // Roaming type
260  enum RoamingType {
261
262    // Unknown. The default value. Different from ROAMING_TYPE_UNKNOWN.
263    UNKNOWN = -1;
264
265    // In home network
266    ROAMING_TYPE_NOT_ROAMING = 0;
267
268    // In a roaming network, but we can not tell
269    // if it's domestic or international
270    ROAMING_TYPE_UNKNOWN = 1;
271
272    // In domestic roaming network
273    ROAMING_TYPE_DOMESTIC = 2;
274
275    // In international roaming network
276    ROAMING_TYPE_INTERNATIONAL = 3;
277  }
278
279  // Frequency range
280  enum FrequencyRange {
281    // Unknown. The default value.
282    FREQUENCY_RANGE_UNKNOWN = 0;
283
284    // Frequency range is below 1GHz.
285    FREQUENCY_RANGE_LOW = 1;
286
287    // Frequency range is between 1GHz and 3GHz.
288    FREQUENCY_RANGE_MID = 2;
289
290    // Frequency range is between 3GHz and 6GHz.
291    FREQUENCY_RANGE_HIGH = 3;
292
293    // Frequency range is above 6GHz (millimeter wave frequency).
294    FREQUENCY_RANGE_MMWAVE = 4;
295  }
296
297  // NR (5G) state
298  enum NrState {
299    // The device isn't camped on an LTE cell
300    // or the LTE cell doesn't support EN-DC.
301    NR_STATE_NONE = 0;
302
303    // The device is camped on an LTE cell that supports EN-DC
304    // but either DCNR is restricted
305    // or NR is not supported by the selected PLMN.
306    NR_STATE_RESTRICTED = 1;
307
308    // The device is camped on an LTE cell that supports EN-DC
309    // and both DCNR is not restricted and NR is supported
310    // by the selected PLMN.
311    NR_STATE_NOT_RESTRICTED = 2;
312
313    // The device is camped on an LTE cell that supports EN-DC
314    // and connected to at least one 5G cell
315    // as a secondary serving cell.
316    NR_STATE_CONNECTED = 3;
317  }
318
319  // Domain type
320  enum Domain {
321    // Unknown
322    DOMAIN_UNKNOWN = 0;
323
324    // Circuit switching domain
325    DOMAIN_CS = 1;
326
327    // Packet switching domain
328    DOMAIN_PS = 2;
329  }
330
331  enum Transport {
332    // Unknown
333    TRANSPORT_UNKNOWN = 0;
334
335    // Transport type for Wireless Wide Area Networks (i.e. Cellular)
336    TRANSPORT_WWAN = 1;
337
338    // Transport type for Wireless Local Area Networks (i.e. Wifi)
339    TRANSPORT_WLAN = 2;
340  }
341
342  // Current registered operator
343  optional TelephonyOperator voice_operator = 1;
344
345  // Current registered data network operator
346  optional TelephonyOperator data_operator = 2;
347
348  // Current voice network roaming type
349  optional RoamingType voice_roaming_type = 3 [default = UNKNOWN];
350
351  // Current data network roaming type
352  optional RoamingType data_roaming_type = 4 [default = UNKNOWN];
353
354  // Current voice radio technology
355  optional RadioAccessTechnology voice_rat = 5 [default = UNKNOWN];
356
357  // Current data radio technology
358  optional RadioAccessTechnology data_rat = 6 [default = UNKNOWN];
359
360  // Current Channel Number
361  optional int32 channel_number = 7;
362
363  // Current NR frequency range
364  optional FrequencyRange nr_frequency_range = 8;
365
366  // Current NR state
367  optional NrState nr_state = 9;
368
369  // Network registration info
370  repeated NetworkRegistrationInfo networkRegistrationInfo = 10;
371}
372
373// Radio access families
374enum RadioAccessTechnology {
375
376  // This is the default value. Different from RAT_UNKNOWN.
377  UNKNOWN = -1;
378
379  // Airplane mode, out of service, or when the modem cannot determine
380  // the RAT.
381  RAT_UNKNOWN = 0;
382
383  RAT_GPRS = 1;
384
385  RAT_EDGE = 2;
386
387  RAT_UMTS = 3;
388
389  RAT_IS95A = 4;
390
391  RAT_IS95B = 5;
392
393  RAT_1XRTT = 6;
394
395  RAT_EVDO_0 = 7;
396
397  RAT_EVDO_A = 8;
398
399  RAT_HSDPA = 9;
400
401  RAT_HSUPA = 10;
402
403  RAT_HSPA = 11;
404
405  RAT_EVDO_B = 12;
406
407  RAT_EHRPD = 13;
408
409  RAT_LTE = 14;
410
411  RAT_HSPAP = 15;
412
413  RAT_GSM = 16;
414
415  RAT_TD_SCDMA = 17;
416
417  RAT_IWLAN = 18;
418
419  RAT_LTE_CA = 19;
420
421  RAT_NR = 20;
422}
423
424// NR (5G) operation mode
425enum NrMode {
426  // The device is not in a NR network.
427  NR_NONE = 1;
428  // The device is in a NR non-standalone network at non-MMWAVE frequencies.
429  NR_NSA = 2;
430  // The device is in a NR non-standalone network at MMWAVE frequencies.
431  NR_NSA_MMWAVE = 3;
432  // The device is in a NR standalone network at non-MMWAVE frequencies.
433  NR_SA = 4;
434  // The device is in a NR standalone network at MMWAVE frequencies.
435  NR_SA_MMWAVE = 5;
436}
437
438// The information about IMS errors
439// https://cs.corp.google.com/#android/frameworks/base/telephony/java/com/android/ims/ImsReasonInfo.java
440message ImsReasonInfo {
441
442  // Main reason code.
443  optional int32 reason_code = 1;
444
445  // Extra code value; it depends on the code value.
446  optional int32 extra_code = 2;
447
448  // Additional message of the reason info. We get this from the modem.
449  optional string extra_message = 3;
450}
451
452// The information about state connection between IMS service and IMS server
453message ImsConnectionState {
454
455  // Current state
456  optional State state = 1;
457
458  // If DISCONNECTED then this field may have additional information about
459  // connection problem.
460  optional ImsReasonInfo reason_info = 2;
461
462  // Posible states
463  enum State {
464
465    // State is unknown.
466    STATE_UNKNOWN = 0;
467
468    CONNECTED = 1;
469
470    PROGRESSING = 2;
471
472    DISCONNECTED = 3;
473
474    RESUMED = 4;
475
476    SUSPENDED = 5;
477  }
478}
479
480// The information about current capabilities of IMS service
481message ImsCapabilities {
482
483  optional bool voice_over_lte = 1;
484
485  optional bool voice_over_wifi = 2;
486
487  optional bool video_over_lte = 3;
488
489  optional bool video_over_wifi = 4;
490
491  optional bool ut_over_lte = 5;
492
493  optional bool ut_over_wifi = 6;
494}
495
496// Errors returned by RIL
497enum RilErrno {
498
499  // type is unknown.
500  RIL_E_UNKNOWN = 0;
501
502  // Note the following values are all off by 1.
503  RIL_E_SUCCESS = 1;
504
505  // If radio did not start or is resetting
506  RIL_E_RADIO_NOT_AVAILABLE = 2;
507
508  RIL_E_GENERIC_FAILURE = 3;
509
510  // for PIN/PIN2 methods only!
511  RIL_E_PASSWORD_INCORRECT = 4;
512
513  // Operation requires SIM PIN2 to be entered
514  RIL_E_SIM_PIN2 = 5;
515
516  // Operation requires SIM PIN2 to be entered
517  RIL_E_SIM_PUK2 = 6;
518
519  RIL_E_REQUEST_NOT_SUPPORTED = 7;
520
521  RIL_E_CANCELLED = 8;
522
523  // data ops are not allowed during voice call on a Class C GPRS device
524  RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 9;
525
526  // data ops are not allowed before device registers in network
527  RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 10;
528
529  // fail to send sms and need retry
530  RIL_E_SMS_SEND_FAIL_RETRY = 11;
531
532  // fail to set the location where CDMA subscription shall be retrieved
533  // because of SIM or RUIM card absent
534  RIL_E_SIM_ABSENT = 12;
535
536  // fail to find CDMA subscription from specified location
537  RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 13;
538
539  // HW does not support preferred network type
540  RIL_E_MODE_NOT_SUPPORTED = 14;
541
542  // command failed because recipient is not on FDN list
543  RIL_E_FDN_CHECK_FAILURE = 15;
544
545  // network selection failed due to illegal SIM or ME
546  RIL_E_ILLEGAL_SIM_OR_ME = 16;
547
548  // no logical channel available
549  RIL_E_MISSING_RESOURCE = 17;
550
551  // application not found on SIM
552  RIL_E_NO_SUCH_ELEMENT = 18;
553
554  // DIAL request modified to USSD
555  RIL_E_DIAL_MODIFIED_TO_USSD = 19;
556
557  // DIAL request modified to SS
558  RIL_E_DIAL_MODIFIED_TO_SS = 20;
559
560  // DIAL request modified to DIAL with different data
561  RIL_E_DIAL_MODIFIED_TO_DIAL = 21;
562
563  // USSD request modified to DIAL
564  RIL_E_USSD_MODIFIED_TO_DIAL = 22;
565
566  // USSD request modified to SS
567  RIL_E_USSD_MODIFIED_TO_SS = 23;
568
569  // USSD request modified to different USSD request
570  RIL_E_USSD_MODIFIED_TO_USSD = 24;
571
572  // SS request modified to DIAL
573  RIL_E_SS_MODIFIED_TO_DIAL = 25;
574
575  // SS request modified to USSD
576  RIL_E_SS_MODIFIED_TO_USSD = 26;
577
578  // Subscription not supported by RIL
579  RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 27;
580
581  // SS request modified to different SS request
582  RIL_E_SS_MODIFIED_TO_SS = 28;
583
584  // LCE service not supported(36 in RILConstants.java. This is a mistake.
585  // The value should be off by 1 ideally.)
586  RIL_E_LCE_NOT_SUPPORTED = 36 [deprecated=true];
587
588  // LCE service not supported
589  RIL_E_LCE_NOT_SUPPORTED_NEW = 37;
590
591  // Not sufficient memory to process the request
592  RIL_E_NO_MEMORY = 38;
593
594  // Modem hit unexpected error scenario while handling this request
595  RIL_E_INTERNAL_ERR = 39;
596
597  // Hit platform or system error
598  RIL_E_SYSTEM_ERR = 40;
599
600  // Vendor RIL got unexpected or incorrect response from modem for this request
601  RIL_E_MODEM_ERR = 41;
602
603  // Unexpected request for the current state
604  RIL_E_INVALID_STATE = 42;
605
606  // Not sufficient resource to process the request
607  RIL_E_NO_RESOURCES = 43;
608
609  // Received error from SIM card
610  RIL_E_SIM_ERR = 44;
611
612  // Received invalid arguments in request
613  RIL_E_INVALID_ARGUMENTS = 45;
614
615  // Cannot process the request in current SIM state
616  RIL_E_INVALID_SIM_STATE = 46;
617
618  // Cannot process the request in current Modem state
619  RIL_E_INVALID_MODEM_STATE = 47;
620
621  // Received invalid call id in request
622  RIL_E_INVALID_CALL_ID = 48;
623
624  // ACK received when there is no SMS to ack
625  RIL_E_NO_SMS_TO_ACK = 49;
626
627  // Received error from network
628  RIL_E_NETWORK_ERR = 50;
629
630  // Operation denied due to overly-frequent requests
631  RIL_E_REQUEST_RATE_LIMITED = 51;
632
633  // SIM is busy
634  RIL_E_SIM_BUSY = 52;
635
636  // The target EF is full
637  RIL_E_SIM_FULL = 53;
638
639  // Request is rejected by network
640  RIL_E_NETWORK_REJECT = 54;
641
642  // Not allowed the request now
643  RIL_E_OPERATION_NOT_ALLOWED = 55;
644
645  // The request record is empty
646  RIL_E_EMPTY_RECORD = 56;
647
648  // Invalid sms format
649  RIL_E_INVALID_SMS_FORMAT = 57;
650
651  // Message not encoded properly
652  RIL_E_ENCODING_ERR = 58;
653
654  // SMSC address specified is invalid
655  RIL_E_INVALID_SMSC_ADDRESS = 59;
656
657  // No such entry present to perform the request
658  RIL_E_NO_SUCH_ENTRY = 60;
659
660  // Network is not ready to perform the request
661  RIL_E_NETWORK_NOT_READY = 61;
662
663  // Device does not have this value provisioned
664  RIL_E_NOT_PROVISIONED = 62;
665
666  // Device does not have subscription
667  RIL_E_NO_SUBSCRIPTION = 63;
668
669  // Network cannot be found
670  RIL_E_NO_NETWORK_FOUND = 64;
671
672  // Operation cannot be performed because the device is currently in use
673  RIL_E_DEVICE_IN_USE = 65;
674
675  // Operation aborted
676  RIL_E_ABORTED = 66;
677
678  // Invalid response sent by vendor code
679  RIL_E_INVALID_RESPONSE = 67;
680}
681
682// Errors returned by ImsService
683enum ImsServiceErrno {
684
685  // The operation error is unknown
686  IMS_E_UNKNOWN = 0;
687  // The operation has succeeded
688  IMS_E_SUCCESS = 1;
689  // Sending SMS over IMS failed. Do not retry over IMS again or fallback to CS.
690  IMS_E_SMS_SEND_STATUS_ERROR = 2;
691  // Sending SMS over IMS failed. Retry over IMS again.
692  IMS_E_SMS_SEND_STATUS_ERROR_RETRY = 3;
693  // Sending SMS over IMS failed. Fallback to sending the SMS over CS.
694  IMS_E_SMS_SEND_STATUS_ERROR_FALLBACK = 4;
695}
696
697// PDP_type values in TS 27.007 section 10.1.1.
698enum PdpType {
699
700  // type is unknown.
701  PDP_UNKNOWN = 0;
702
703  PDP_TYPE_IP = 1;
704
705  PDP_TYPE_IPV6 = 2;
706
707  PDP_TYPE_IPV4V6 = 3;
708
709  PDP_TYPE_PPP = 4;
710
711  PDP_TYPE_NON_IP = 5;
712
713  PDP_TYPE_UNSTRUCTURED = 6;
714}
715
716// The information about packet data connection
717message RilDataCall {
718
719  // Context ID, uniquely identifies this call
720  optional int32 cid = 1;
721
722  // One of the PDP_type values in TS 27.007 section 10.1.1
723  optional PdpType type = 2;
724
725  // The network interface name e.g. wlan0, rmnet_data0.
726  optional string ifname = 3;
727
728  // State of the Data Call connection
729  optional State state = 4;
730
731  // Bitmask of APN types
732  optional int32 apn_type_bitmask = 5;
733
734  enum State {
735
736    // Unknown event
737    UNKNOWN = 0;
738
739    // Connected event
740    CONNECTED = 1;
741
742    // Disconnected event
743    DISCONNECTED = 2;
744  }
745}
746
747message EmergencyNumberInfo {
748  // Dialing address
749  optional string address = 1 /* [
750    (datapol.semantic_type) = ST_PHONE_NUMBER,
751    (datapol.qualifier) = {is_public: true}
752  ] */;
753
754  // Country code string (lowercase character) in ISO 3166 format
755  optional string country_iso = 2 /* [(datapol.semantic_type) = ST_LOCATION] */;
756
757  // Mobile Network Code
758  optional string mnc = 3 /* [(datapol.semantic_type) = ST_LOCATION] */;
759
760  // Bitmask of emergency service categories
761  optional int32 service_categories_bitmask = 4;
762
763  // Emergency Uniform Resources Names (URN)
764  // Reference: https://tools.ietf.org/html/rfc5031
765  repeated string urns = 5;
766
767  // Bitmask of the sources
768  optional int32 number_sources_bitmask = 6;
769
770  // Emergency call routing information.
771  // Emergency call routing is a flag to tell how modem handles the calling with
772  // emergency numbers. For example, 110 in India, modem needs to handle/route
773  // it like a normal call. There are only two possible options for emergency
774  // call routing: emergency call routing vs normal call routing. It is usually
775  // a country or carrier requirement.
776  optional int32 routing = 7;
777}
778
779message TelephonyEvent {
780
781  enum Type {
782
783    // Unknown event
784    UNKNOWN = 0;
785
786    // Telephony related user settings changed
787    SETTINGS_CHANGED = 1;
788
789    // Phone state changed
790    RIL_SERVICE_STATE_CHANGED = 2;
791
792    // IMS connected/disconnected
793    IMS_CONNECTION_STATE_CHANGED = 3;
794
795    // IMS Voice, Video and Ut capabilities changed
796    IMS_CAPABILITIES_CHANGED = 4;
797
798    // Setup a packet data connection
799    DATA_CALL_SETUP = 5;
800
801    // RIL request result
802    DATA_CALL_SETUP_RESPONSE = 6;
803
804    // Notification that new data call has appeared in the list
805    // or old data call has removed.
806    DATA_CALL_LIST_CHANGED = 7;
807
808    // Deactivate packet data connection
809    DATA_CALL_DEACTIVATE = 8;
810
811    // RIL request result
812    DATA_CALL_DEACTIVATE_RESPONSE = 9;
813
814    // Logging a data stall + its action
815    DATA_STALL_ACTION = 10;
816
817    // Modem Restarted. Logging a baseband version and reason for restart
818    // along with the event if it is available
819    MODEM_RESTART = 11;
820
821    // A system time update suggestion was made from a received NITZ (Network time) signal
822    NITZ_TIME = 12;
823
824    // Carrier Identification Matching Event
825    CARRIER_ID_MATCHING = 13;
826
827    // Carrier Key Change event.
828    CARRIER_KEY_CHANGED = 14;
829
830    // Data switch event.
831    DATA_SWITCH = 15;
832
833    // Network validate event.
834    NETWORK_VALIDATE = 16;
835
836    // On deman data switch event.
837    ON_DEMAND_DATA_SWITCH = 17;
838
839    // SIM state change event.
840    SIM_STATE_CHANGED = 18;
841
842    // Active subscription info change event.
843    ACTIVE_SUBSCRIPTION_INFO_CHANGED = 19;
844
845    // Enabled modem change event.
846    ENABLED_MODEM_CHANGED = 20;
847
848    // Emergency Number update event (Device HAL >= 1.4).
849    EMERGENCY_NUMBER_REPORT = 21;
850
851    // Network capabilities change event.
852    NETWORK_CAPABILITIES_CHANGED = 22;
853
854    // Signal strength
855    SIGNAL_STRENGTH = 23;
856
857    // Radio state change event
858    RADIO_STATE_CHANGED = 24;
859  }
860
861  enum ApnType {
862    APN_TYPE_UNKNOWN = 0;
863
864    APN_TYPE_DEFAULT = 1;
865
866    APN_TYPE_MMS = 2;
867
868    APN_TYPE_SUPL = 3;
869
870    APN_TYPE_DUN = 4;
871
872    APN_TYPE_HIPRI = 5;
873
874    APN_TYPE_FOTA = 6;
875
876    APN_TYPE_IMS = 7;
877
878    APN_TYPE_CBS = 8;
879
880    APN_TYPE_IA = 9;
881
882    APN_TYPE_EMERGENCY = 10;
883  }
884
885  enum EventState {
886    EVENT_STATE_UNKNOWN = 0;
887
888    EVENT_STATE_START = 1;
889
890    EVENT_STATE_END = 2;
891  }
892
893  enum NetworkValidationState {
894    /** The network validation state is unknown. */
895    NETWORK_VALIDATION_STATE_UNKNOWN = 0;
896
897    /** The network under validation is initial established. */
898    NETWORK_VALIDATION_STATE_AVAILABLE = 1;
899
900    /** The validation is failed. */
901    NETWORK_VALIDATION_STATE_FAILED = 2;
902
903    /** The validation is passed. */
904    NETWORK_VALIDATION_STATE_PASSED = 3;
905  }
906
907  enum RadioState {
908    /** Radio state is unknown or invalid. */
909    RADIO_STATE_UNKNOWN = 0;
910
911    /** Radio is explicitly off (e.g. airplane mode). */
912    RADIO_STATE_OFF = 1;
913
914    /** Radio is on. */
915    RADIO_STATE_ON = 2;
916
917    /** Radio power unavailable (eg, modem resetting or not booted). */
918    RADIO_STATE_UNAVAILABLE = 3;
919  }
920
921  message DataSwitch {
922    enum Reason {
923      /** Data switch caused by unknown reason. */
924      DATA_SWITCH_REASON_UNKNOWN = 0;
925
926      /** Data switch caused by user's manual switch. */
927      DATA_SWITCH_REASON_MANUAL = 1;
928
929      /** Data switch caused by incoming/outgoing call. */
930      DATA_SWITCH_REASON_IN_CALL = 2;
931
932      /** Data switch caused by CBRS switch. */
933      DATA_SWITCH_REASON_CBRS = 3;
934    }
935
936    /** The reason for data switch. */
937    optional Reason reason = 1;
938
939    /** Current state of the data switch event. */
940    optional EventState state = 2;
941  }
942
943  message OnDemandDataSwitch {
944    /** The apn associated with this event. */
945    optional ApnType apn = 1;
946
947    /** Current state of the on demand data switch event. */
948    optional EventState state = 2;
949  }
950
951  // Setup a packet data connection
952  message RilSetupDataCall {
953
954    // See ril.h RIL_REQUEST_SETUP_DATA_CALL
955    enum RilDataProfile {
956
957      // type is unknown.
958      RIL_DATA_UNKNOWN = 0;
959
960      RIL_DATA_PROFILE_DEFAULT = 1;
961
962      RIL_DATA_PROFILE_TETHERED = 2;
963
964      RIL_DATA_PROFILE_IMS = 3;
965
966      RIL_DATA_PROFILE_FOTA = 4;
967
968      RIL_DATA_PROFILE_CBS = 5;
969
970      RIL_DATA_PROFILE_OEM_BASE = 6;
971
972      RIL_DATA_PROFILE_INVALID = 7;
973    }
974
975    // Radio technology to use
976    optional RadioAccessTechnology rat = 1 [default = UNKNOWN];
977
978    // optional RIL_DataProfile
979    optional RilDataProfile data_profile = 2;
980
981    // APN to connect to if radio technology is GSM/UMTS
982    optional string apn = 3;
983
984    // the connection type to request
985    optional PdpType type = 4;
986  }
987
988  // RIL response to RilSetupDataCall
989  message RilSetupDataCallResponse {
990
991    // Copy of enum RIL_DataCallFailCause defined at ril.h
992    enum RilDataCallFailCause {
993
994      // Failure reason is unknown.
995      PDP_FAIL_UNKNOWN = 0;
996
997      // No error, connection ok
998      PDP_FAIL_NONE = 1;
999
1000      PDP_FAIL_OPERATOR_BARRED = 8;
1001
1002      PDP_FAIL_NAS_SIGNALLING = 14;
1003
1004      PDP_FAIL_LLC_SNDCP = 25;
1005
1006      PDP_FAIL_INSUFFICIENT_RESOURCES = 26;
1007
1008      PDP_FAIL_MISSING_UKNOWN_APN = 27;
1009
1010      PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 28;
1011
1012      PDP_FAIL_USER_AUTHENTICATION = 29;
1013
1014      PDP_FAIL_ACTIVATION_REJECT_GGSN = 30;
1015
1016      PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 31;
1017
1018      PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 32;
1019
1020      PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 33;
1021
1022      PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 34;
1023
1024      PDP_FAIL_NSAPI_IN_USE = 35;
1025
1026      // Possibly restart radio, based on framework config
1027      PDP_FAIL_REGULAR_DEACTIVATION = 36;
1028
1029      PDP_FAIL_QOS_NOT_ACCEPTED = 37;
1030
1031      PDP_FAIL_NETWORK_FAILURE = 38;
1032
1033      PDP_FAIL_UMTS_REACTIVATION_REQ = 39;
1034
1035      PDP_FAIL_FEATURE_NOT_SUPP = 40;
1036
1037      PDP_FAIL_TFT_SEMANTIC_ERROR = 41;
1038
1039      PDP_FAIL_TFT_SYTAX_ERROR = 42;
1040
1041      PDP_FAIL_UNKNOWN_PDP_CONTEXT = 43;
1042
1043      PDP_FAIL_FILTER_SEMANTIC_ERROR = 44;
1044
1045      PDP_FAIL_FILTER_SYTAX_ERROR = 45;
1046
1047      PDP_FAIL_PDP_WITHOUT_ACTIVE_TFT = 46;
1048
1049      PDP_FAIL_ACTIVATION_REJECTED_BCM_VIOLATION = 48;
1050
1051      PDP_FAIL_ONLY_IPV4_ALLOWED = 50;
1052
1053      PDP_FAIL_ONLY_IPV6_ALLOWED = 51;
1054
1055      PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 52;
1056
1057      PDP_FAIL_ESM_INFO_NOT_RECEIVED = 53;
1058
1059      PDP_FAIL_PDN_CONN_DOES_NOT_EXIST = 54;
1060
1061      PDP_FAIL_MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 55;
1062
1063      PDP_FAIL_COLLISION_WITH_NETWORK_INITIATED_REQUEST = 56;
1064
1065      PDP_FAIL_ONLY_IPV4V6_ALLOWED = 57;
1066
1067      PDP_FAIL_ONLY_NON_IP_ALLOWED = 58;
1068
1069      PDP_FAIL_UNSUPPORTED_QCI_VALUE = 59;
1070
1071      PDP_FAIL_BEARER_HANDLING_NOT_SUPPORTED = 60;
1072
1073      PDP_FAIL_MAX_ACTIVE_PDP_CONTEXT_REACHED = 65;
1074
1075      PDP_FAIL_UNSUPPORTED_APN_IN_CURRENT_PLMN = 66;
1076
1077      PDP_FAIL_INVALID_TRANSACTION_ID = 81;
1078
1079      PDP_FAIL_MESSAGE_INCORRECT_SEMANTIC = 95;
1080
1081      PDP_FAIL_INVALID_MANDATORY_INFO = 96;
1082
1083      PDP_FAIL_MESSAGE_TYPE_UNSUPPORTED = 97;
1084
1085      PDP_FAIL_MSG_TYPE_NONCOMPATIBLE_STATE = 98;
1086
1087      PDP_FAIL_UNKNOWN_INFO_ELEMENT = 99;
1088
1089      PDP_FAIL_CONDITIONAL_IE_ERROR = 100;
1090
1091      PDP_FAIL_MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 101;
1092
1093      PDP_FAIL_PROTOCOL_ERRORS   = 111;
1094
1095      PDP_FAIL_APN_TYPE_CONFLICT = 112;
1096
1097      PDP_FAIL_INVALID_PCSCF_ADDR = 113;
1098
1099      PDP_FAIL_INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 114;
1100
1101      PDP_FAIL_EMM_ACCESS_BARRED = 115;
1102
1103      PDP_FAIL_EMERGENCY_IFACE_ONLY = 116;
1104
1105      PDP_FAIL_IFACE_MISMATCH = 117;
1106
1107      PDP_FAIL_COMPANION_IFACE_IN_USE = 118;
1108
1109      PDP_FAIL_IP_ADDRESS_MISMATCH = 119;
1110
1111      PDP_FAIL_IFACE_AND_POL_FAMILY_MISMATCH = 120;
1112
1113      PDP_FAIL_EMM_ACCESS_BARRED_INFINITE_RETRY = 121;
1114
1115      PDP_FAIL_AUTH_FAILURE_ON_EMERGENCY_CALL = 122;
1116
1117      PDP_FAIL_INVALID_DNS_ADDR = 123;
1118
1119      PDP_FAIL_INVALID_PCSCF_OR_DNS_ADDRESS = 124;
1120
1121      PDP_FAIL_CALL_PREEMPT_BY_EMERGENCY_APN = 127;
1122
1123      PDP_FAIL_UE_INITIATED_DETACH_OR_DISCONNECT = 128;
1124
1125      PDP_FAIL_MIP_FA_REASON_UNSPECIFIED = 2000;
1126
1127      PDP_FAIL_MIP_FA_ADMIN_PROHIBITED = 2001;
1128
1129      PDP_FAIL_MIP_FA_INSUFFICIENT_RESOURCES = 2002;
1130
1131      PDP_FAIL_MIP_FA_MOBILE_NODE_AUTHENTICATION_FAILURE = 2003;
1132
1133      PDP_FAIL_MIP_FA_HOME_AGENT_AUTHENTICATION_FAILURE = 2004;
1134
1135      PDP_FAIL_MIP_FA_REQUESTED_LIFETIME_TOO_LONG = 2005;
1136
1137      PDP_FAIL_MIP_FA_MALFORMED_REQUEST = 2006;
1138
1139      PDP_FAIL_MIP_FA_MALFORMED_REPLY = 2007;
1140
1141      PDP_FAIL_MIP_FA_ENCAPSULATION_UNAVAILABLE = 2008;
1142
1143      PDP_FAIL_MIP_FA_VJ_HEADER_COMPRESSION_UNAVAILABLE = 2009;
1144
1145      PDP_FAIL_MIP_FA_REVERSE_TUNNEL_UNAVAILABLE = 2010;
1146
1147      PDP_FAIL_MIP_FA_REVERSE_TUNNEL_IS_MANDATORY = 2011;
1148
1149      PDP_FAIL_MIP_FA_DELIVERY_STYLE_NOT_SUPPORTED = 2012;
1150
1151      PDP_FAIL_MIP_FA_MISSING_NAI = 2013;
1152
1153      PDP_FAIL_MIP_FA_MISSING_HOME_AGENT = 2014;
1154
1155      PDP_FAIL_MIP_FA_MISSING_HOME_ADDRESS = 2015;
1156
1157      PDP_FAIL_MIP_FA_UNKNOWN_CHALLENGE = 2016;
1158
1159      PDP_FAIL_MIP_FA_MISSING_CHALLENGE = 2017;
1160
1161      PDP_FAIL_MIP_FA_STALE_CHALLENGE = 2018;
1162
1163      PDP_FAIL_MIP_HA_REASON_UNSPECIFIED = 2019;
1164
1165      PDP_FAIL_MIP_HA_ADMIN_PROHIBITED = 2020;
1166
1167      PDP_FAIL_MIP_HA_INSUFFICIENT_RESOURCES = 2021;
1168
1169      PDP_FAIL_MIP_HA_MOBILE_NODE_AUTHENTICATION_FAILURE = 2022;
1170
1171      PDP_FAIL_MIP_HA_FOREIGN_AGENT_AUTHENTICATION_FAILURE = 2023;
1172
1173      PDP_FAIL_MIP_HA_REGISTRATION_ID_MISMATCH = 2024;
1174
1175      PDP_FAIL_MIP_HA_MALFORMED_REQUEST = 2025;
1176
1177      PDP_FAIL_MIP_HA_UNKNOWN_HOME_AGENT_ADDRESS = 2026;
1178
1179      PDP_FAIL_MIP_HA_REVERSE_TUNNEL_UNAVAILABLE = 2027;
1180
1181      PDP_FAIL_MIP_HA_REVERSE_TUNNEL_IS_MANDATORY = 2028;
1182
1183      PDP_FAIL_MIP_HA_ENCAPSULATION_UNAVAILABLE = 2029;
1184
1185      PDP_FAIL_CLOSE_IN_PROGRESS = 2030;
1186
1187      PDP_FAIL_NETWORK_INITIATED_TERMINATION = 2031;
1188
1189      PDP_FAIL_MODEM_APP_PREEMPTED = 2032;
1190
1191      PDP_FAIL_PDN_IPV4_CALL_DISALLOWED = 2033;
1192
1193      PDP_FAIL_PDN_IPV4_CALL_THROTTLED = 2034;
1194
1195      PDP_FAIL_PDN_IPV6_CALL_DISALLOWED = 2035;
1196
1197      PDP_FAIL_PDN_IPV6_CALL_THROTTLED = 2036;
1198
1199      PDP_FAIL_MODEM_RESTART = 2037;
1200
1201      PDP_FAIL_PDP_PPP_NOT_SUPPORTED = 2038;
1202
1203      PDP_FAIL_UNPREFERRED_RAT = 2039;
1204
1205      PDP_FAIL_PHYSICAL_LINK_CLOSE_IN_PROGRESS = 2040;
1206
1207      PDP_FAIL_APN_PENDING_HANDOVER = 2041;
1208
1209      PDP_FAIL_PROFILE_BEARER_INCOMPATIBLE = 2042;
1210
1211      PDP_FAIL_SIM_CARD_CHANGED = 2043;
1212
1213      PDP_FAIL_LOW_POWER_MODE_OR_POWERING_DOWN = 2044;
1214
1215      PDP_FAIL_APN_DISABLED = 2045;
1216
1217      PDP_FAIL_MAX_PPP_INACTIVITY_TIMER_EXPIRED = 2046;
1218
1219      PDP_FAIL_IPV6_ADDRESS_TRANSFER_FAILED = 2047;
1220
1221      PDP_FAIL_TRAT_SWAP_FAILED = 2048;
1222
1223      PDP_FAIL_EHRPD_TO_HRPD_FALLBACK = 2049;
1224
1225      PDP_FAIL_MIP_CONFIG_FAILURE = 2050;
1226
1227      PDP_FAIL_PDN_INACTIVITY_TIMER_EXPIRED = 2051;
1228
1229      PDP_FAIL_MAX_IPV4_CONNECTIONS = 2052;
1230
1231      PDP_FAIL_MAX_IPV6_CONNECTIONS = 2053;
1232
1233      PDP_FAIL_APN_MISMATCH = 2054;
1234
1235      PDP_FAIL_IP_VERSION_MISMATCH = 2055;
1236
1237      PDP_FAIL_DUN_CALL_DISALLOWED = 2056;
1238
1239      PDP_FAIL_INTERNAL_EPC_NONEPC_TRANSITION = 2057;
1240
1241      PDP_FAIL_INTERFACE_IN_USE = 2058;
1242
1243      PDP_FAIL_APN_DISALLOWED_ON_ROAMING = 2059;
1244
1245      PDP_FAIL_APN_PARAMETERS_CHANGED = 2060;
1246
1247      PDP_FAIL_NULL_APN_DISALLOWED = 2061;
1248
1249      PDP_FAIL_THERMAL_MITIGATION = 2062;
1250
1251      PDP_FAIL_DATA_SETTINGS_DISABLED = 2063;
1252
1253      PDP_FAIL_DATA_ROAMING_SETTINGS_DISABLED = 2064;
1254
1255      PDP_FAIL_DDS_SWITCHED = 2065;
1256
1257      PDP_FAIL_FORBIDDEN_APN_NAME = 2066;
1258
1259      PDP_FAIL_DDS_SWITCH_IN_PROGRESS = 2067;
1260
1261      PDP_FAIL_CALL_DISALLOWED_IN_ROAMING = 2068;
1262
1263      PDP_FAIL_NON_IP_NOT_SUPPORTED = 2069;
1264
1265      PDP_FAIL_PDN_NON_IP_CALL_THROTTLED = 2070;
1266
1267      PDP_FAIL_PDN_NON_IP_CALL_DISALLOWED = 2071;
1268
1269      PDP_FAIL_CDMA_LOCK = 2072;
1270
1271      PDP_FAIL_CDMA_INTERCEPT = 2073;
1272
1273      PDP_FAIL_CDMA_REORDER = 2074;
1274
1275      PDP_FAIL_CDMA_RELEASE_DUE_TO_SO_REJECTION = 2075;
1276
1277      PDP_FAIL_CDMA_INCOMING_CALL = 2076;
1278
1279      PDP_FAIL_CDMA_ALERT_STOP = 2077;
1280
1281      PDP_FAIL_CHANNEL_ACQUISITION_FAILURE = 2078;
1282
1283      PDP_FAIL_MAX_ACCESS_PROBE = 2079;
1284
1285      PDP_FAIL_CONCURRENT_SERVICE_NOT_SUPPORTED_BY_BASE_STATION = 2080;
1286
1287      PDP_FAIL_NO_RESPONSE_FROM_BASE_STATION = 2081;
1288
1289      PDP_FAIL_REJECTED_BY_BASE_STATION = 2082;
1290
1291      PDP_FAIL_CONCURRENT_SERVICES_INCOMPATIBLE = 2083;
1292
1293      PDP_FAIL_NO_CDMA_SERVICE = 2084;
1294
1295      PDP_FAIL_RUIM_NOT_PRESENT = 2085;
1296
1297      PDP_FAIL_CDMA_RETRY_ORDER = 2086;
1298
1299      PDP_FAIL_ACCESS_BLOCK = 2087;
1300
1301      PDP_FAIL_ACCESS_BLOCK_ALL = 2088;
1302
1303      PDP_FAIL_IS707B_MAX_ACCESS_PROBES = 2089;
1304
1305      PDP_FAIL_THERMAL_EMERGENCY = 2090;
1306
1307      PDP_FAIL_CONCURRENT_SERVICES_NOT_ALLOWED = 2091;
1308
1309      PDP_FAIL_INCOMING_CALL_REJECTED = 2092;
1310
1311      PDP_FAIL_NO_SERVICE_ON_GATEWAY = 2093;
1312
1313      PDP_FAIL_NO_GPRS_CONTEXT = 2094;
1314
1315      PDP_FAIL_ILLEGAL_MS = 2095;
1316
1317      PDP_FAIL_ILLEGAL_ME = 2096;
1318
1319      PDP_FAIL_GPRS_SERVICES_AND_NON_GPRS_SERVICES_NOT_ALLOWED = 2097;
1320
1321      PDP_FAIL_GPRS_SERVICES_NOT_ALLOWED = 2098;
1322
1323      PDP_FAIL_MS_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK = 2099;
1324
1325      PDP_FAIL_IMPLICITLY_DETACHED = 2100;
1326
1327      PDP_FAIL_PLMN_NOT_ALLOWED = 2101;
1328
1329      PDP_FAIL_LOCATION_AREA_NOT_ALLOWED = 2102;
1330
1331      PDP_FAIL_GPRS_SERVICES_NOT_ALLOWED_IN_THIS_PLMN = 2103;
1332
1333      PDP_FAIL_PDP_DUPLICATE = 2104;
1334
1335      PDP_FAIL_UE_RAT_CHANGE = 2105;
1336
1337      PDP_FAIL_CONGESTION = 2106;
1338
1339      PDP_FAIL_NO_PDP_CONTEXT_ACTIVATED = 2107;
1340
1341      PDP_FAIL_ACCESS_CLASS_DSAC_REJECTION = 2108;
1342
1343      PDP_FAIL_PDP_ACTIVATE_MAX_RETRY_FAILED = 2109;
1344
1345      PDP_FAIL_RADIO_ACCESS_BEARER_FAILURE = 2110;
1346
1347      PDP_FAIL_ESM_UNKNOWN_EPS_BEARER_CONTEXT = 2111;
1348
1349      PDP_FAIL_DRB_RELEASED_BY_RRC = 2112;
1350
1351      PDP_FAIL_CONNECTION_RELEASED = 2113;
1352
1353      PDP_FAIL_EMM_DETACHED = 2114;
1354
1355      PDP_FAIL_EMM_ATTACH_FAILED = 2115;
1356
1357      PDP_FAIL_EMM_ATTACH_STARTED = 2116;
1358
1359      PDP_FAIL_LTE_NAS_SERVICE_REQUEST_FAILED = 2117;
1360
1361      PDP_FAIL_DUPLICATE_BEARER_ID = 2118;
1362
1363      PDP_FAIL_ESM_COLLISION_SCENARIOS = 2119;
1364
1365      PDP_FAIL_ESM_BEARER_DEACTIVATED_TO_SYNC_WITH_NETWORK = 2120;
1366
1367      PDP_FAIL_ESM_NW_ACTIVATED_DED_BEARER_WITH_ID_OF_DEF_BEARER = 2121;
1368
1369      PDP_FAIL_ESM_BAD_OTA_MESSAGE = 2122;
1370
1371      PDP_FAIL_ESM_DOWNLOAD_SERVER_REJECTED_THE_CALL = 2123;
1372
1373      PDP_FAIL_ESM_CONTEXT_TRANSFERRED_DUE_TO_IRAT = 2124;
1374
1375      PDP_FAIL_DS_EXPLICIT_DEACTIVATION = 2125;
1376
1377      PDP_FAIL_ESM_LOCAL_CAUSE_NONE = 2126;
1378
1379      PDP_FAIL_LTE_THROTTLING_NOT_REQUIRED = 2127;
1380
1381      PDP_FAIL_ACCESS_CONTROL_LIST_CHECK_FAILURE = 2128;
1382
1383      PDP_FAIL_SERVICE_NOT_ALLOWED_ON_PLMN = 2129;
1384
1385      PDP_FAIL_EMM_T3417_EXPIRED = 2130;
1386
1387      PDP_FAIL_EMM_T3417_EXT_EXPIRED = 2131;
1388
1389      PDP_FAIL_RRC_UPLINK_DATA_TRANSMISSION_FAILURE = 2132;
1390
1391      PDP_FAIL_RRC_UPLINK_DELIVERY_FAILED_DUE_TO_HANDOVER = 2133;
1392
1393      PDP_FAIL_RRC_UPLINK_CONNECTION_RELEASE = 2134;
1394
1395      PDP_FAIL_RRC_UPLINK_RADIO_LINK_FAILURE = 2135;
1396
1397      PDP_FAIL_RRC_UPLINK_ERROR_REQUEST_FROM_NAS = 2136;
1398
1399      PDP_FAIL_RRC_CONNECTION_ACCESS_STRATUM_FAILURE = 2137;
1400
1401      PDP_FAIL_RRC_CONNECTION_ANOTHER_PROCEDURE_IN_PROGRESS = 2138;
1402
1403      PDP_FAIL_RRC_CONNECTION_ACCESS_BARRED = 2139;
1404
1405      PDP_FAIL_RRC_CONNECTION_CELL_RESELECTION = 2140;
1406
1407      PDP_FAIL_RRC_CONNECTION_CONFIG_FAILURE = 2141;
1408
1409      PDP_FAIL_RRC_CONNECTION_TIMER_EXPIRED = 2142;
1410
1411      PDP_FAIL_RRC_CONNECTION_LINK_FAILURE = 2143;
1412
1413      PDP_FAIL_RRC_CONNECTION_CELL_NOT_CAMPED = 2144;
1414
1415      PDP_FAIL_RRC_CONNECTION_SYSTEM_INTERVAL_FAILURE = 2145;
1416
1417      PDP_FAIL_RRC_CONNECTION_REJECT_BY_NETWORK = 2146;
1418
1419      PDP_FAIL_RRC_CONNECTION_NORMAL_RELEASE = 2147;
1420
1421      PDP_FAIL_RRC_CONNECTION_RADIO_LINK_FAILURE = 2148;
1422
1423      PDP_FAIL_RRC_CONNECTION_REESTABLISHMENT_FAILURE = 2149;
1424
1425      PDP_FAIL_RRC_CONNECTION_OUT_OF_SERVICE_DURING_CELL_REGISTER = 2150;
1426
1427      PDP_FAIL_RRC_CONNECTION_ABORT_REQUEST = 2151;
1428
1429      PDP_FAIL_RRC_CONNECTION_SYSTEM_INFORMATION_BLOCK_READ_ERROR = 2152;
1430
1431      PDP_FAIL_NETWORK_INITIATED_DETACH_WITH_AUTO_REATTACH = 2153;
1432
1433      PDP_FAIL_NETWORK_INITIATED_DETACH_NO_AUTO_REATTACH = 2154;
1434
1435      PDP_FAIL_ESM_PROCEDURE_TIME_OUT = 2155;
1436
1437      PDP_FAIL_INVALID_CONNECTION_ID = 2156;
1438
1439      PDP_FAIL_MAXIMIUM_NSAPIS_EXCEEDED = 2157;
1440
1441      PDP_FAIL_INVALID_PRIMARY_NSAPI = 2158;
1442
1443      PDP_FAIL_CANNOT_ENCODE_OTA_MESSAGE = 2159;
1444
1445      PDP_FAIL_RADIO_ACCESS_BEARER_SETUP_FAILURE = 2160;
1446
1447      PDP_FAIL_PDP_ESTABLISH_TIMEOUT_EXPIRED = 2161;
1448
1449      PDP_FAIL_PDP_MODIFY_TIMEOUT_EXPIRED = 2162;
1450
1451      PDP_FAIL_PDP_INACTIVE_TIMEOUT_EXPIRED = 2163;
1452
1453      PDP_FAIL_PDP_LOWERLAYER_ERROR = 2164;
1454
1455      PDP_FAIL_PDP_MODIFY_COLLISION = 2165;
1456
1457      PDP_FAIL_MAXINUM_SIZE_OF_L2_MESSAGE_EXCEEDED = 2166;
1458
1459      PDP_FAIL_NAS_REQUEST_REJECTED_BY_NETWORK = 2167;
1460
1461      PDP_FAIL_RRC_CONNECTION_INVALID_REQUEST = 2168;
1462
1463      PDP_FAIL_RRC_CONNECTION_TRACKING_AREA_ID_CHANGED = 2169;
1464
1465      PDP_FAIL_RRC_CONNECTION_RF_UNAVAILABLE = 2170;
1466
1467      PDP_FAIL_RRC_CONNECTION_ABORTED_DUE_TO_IRAT_CHANGE = 2171;
1468
1469      PDP_FAIL_RRC_CONNECTION_RELEASED_SECURITY_NOT_ACTIVE = 2172;
1470
1471      PDP_FAIL_RRC_CONNECTION_ABORTED_AFTER_HANDOVER = 2173;
1472
1473      PDP_FAIL_RRC_CONNECTION_ABORTED_AFTER_IRAT_CELL_CHANGE = 2174;
1474
1475      PDP_FAIL_RRC_CONNECTION_ABORTED_DURING_IRAT_CELL_CHANGE = 2175;
1476
1477      PDP_FAIL_IMSI_UNKNOWN_IN_HOME_SUBSCRIBER_SERVER = 2176;
1478
1479      PDP_FAIL_IMEI_NOT_ACCEPTED = 2177;
1480
1481      PDP_FAIL_EPS_SERVICES_AND_NON_EPS_SERVICES_NOT_ALLOWED = 2178;
1482
1483      PDP_FAIL_EPS_SERVICES_NOT_ALLOWED_IN_PLMN = 2179;
1484
1485      PDP_FAIL_MSC_TEMPORARILY_NOT_REACHABLE = 2180;
1486
1487      PDP_FAIL_CS_DOMAIN_NOT_AVAILABLE = 2181;
1488
1489      PDP_FAIL_ESM_FAILURE = 2182;
1490
1491      PDP_FAIL_MAC_FAILURE = 2183;
1492
1493      PDP_FAIL_SYNCHRONIZATION_FAILURE = 2184;
1494
1495      PDP_FAIL_UE_SECURITY_CAPABILITIES_MISMATCH = 2185;
1496
1497      PDP_FAIL_SECURITY_MODE_REJECTED = 2186;
1498
1499      PDP_FAIL_UNACCEPTABLE_NON_EPS_AUTHENTICATION = 2187;
1500
1501      PDP_FAIL_CS_FALLBACK_CALL_ESTABLISHMENT_NOT_ALLOWED = 2188;
1502
1503      PDP_FAIL_NO_EPS_BEARER_CONTEXT_ACTIVATED = 2189;
1504
1505      PDP_FAIL_INVALID_EMM_STATE = 2190;
1506
1507      PDP_FAIL_NAS_LAYER_FAILURE = 2191;
1508
1509      PDP_FAIL_MULTIPLE_PDP_CALL_NOT_ALLOWED = 2192;
1510
1511      PDP_FAIL_EMBMS_NOT_ENABLED = 2193;
1512
1513      PDP_FAIL_IRAT_HANDOVER_FAILED = 2194;
1514
1515      PDP_FAIL_EMBMS_REGULAR_DEACTIVATION = 2195;
1516
1517      PDP_FAIL_TEST_LOOPBACK_REGULAR_DEACTIVATION = 2196;
1518
1519      PDP_FAIL_LOWER_LAYER_REGISTRATION_FAILURE = 2197;
1520
1521      PDP_FAIL_DATA_PLAN_EXPIRED = 2198;
1522
1523      PDP_FAIL_UMTS_HANDOVER_TO_IWLAN = 2199;
1524
1525      PDP_FAIL_EVDO_CONNECTION_DENY_BY_GENERAL_OR_NETWORK_BUSY = 2200;
1526
1527      PDP_FAIL_EVDO_CONNECTION_DENY_BY_BILLING_OR_AUTHENTICATION_FAILURE = 2201;
1528
1529      PDP_FAIL_EVDO_HDR_CHANGED = 2202;
1530
1531      PDP_FAIL_EVDO_HDR_EXITED = 2203;
1532
1533      PDP_FAIL_EVDO_HDR_NO_SESSION = 2204;
1534
1535      PDP_FAIL_EVDO_USING_GPS_FIX_INSTEAD_OF_HDR_CALL = 2205;
1536
1537      PDP_FAIL_EVDO_HDR_CONNECTION_SETUP_TIMEOUT = 2206;
1538
1539      PDP_FAIL_FAILED_TO_ACQUIRE_COLOCATED_HDR = 2207;
1540
1541      PDP_FAIL_OTASP_COMMIT_IN_PROGRESS = 2208;
1542
1543      PDP_FAIL_NO_HYBRID_HDR_SERVICE = 2209;
1544
1545      PDP_FAIL_HDR_NO_LOCK_GRANTED = 2210;
1546
1547      PDP_FAIL_DBM_OR_SMS_IN_PROGRESS = 2211;
1548
1549      PDP_FAIL_HDR_FADE = 2212;
1550
1551      PDP_FAIL_HDR_ACCESS_FAILURE = 2213;
1552
1553      PDP_FAIL_UNSUPPORTED_1X_PREV = 2214;
1554
1555      PDP_FAIL_LOCAL_END = 2215;
1556
1557      PDP_FAIL_NO_SERVICE = 2216;
1558
1559      PDP_FAIL_FADE = 2217;
1560
1561      PDP_FAIL_NORMAL_RELEASE = 2218;
1562
1563      PDP_FAIL_ACCESS_ATTEMPT_ALREADY_IN_PROGRESS = 2219;
1564
1565      PDP_FAIL_REDIRECTION_OR_HANDOFF_IN_PROGRESS = 2220;
1566
1567      PDP_FAIL_EMERGENCY_MODE = 2221;
1568
1569      PDP_FAIL_PHONE_IN_USE = 2222;
1570
1571      PDP_FAIL_INVALID_MODE = 2223;
1572
1573      PDP_FAIL_INVALID_SIM_STATE = 2224;
1574
1575      PDP_FAIL_NO_COLLOCATED_HDR = 2225;
1576
1577      PDP_FAIL_UE_IS_ENTERING_POWERSAVE_MODE = 2226;
1578
1579      PDP_FAIL_DUAL_SWITCH = 2227;
1580
1581      PDP_FAIL_PPP_TIMEOUT = 2228;
1582
1583      PDP_FAIL_PPP_AUTH_FAILURE = 2229;
1584
1585      PDP_FAIL_PPP_OPTION_MISMATCH = 2230;
1586
1587      PDP_FAIL_PPP_PAP_FAILURE = 2231;
1588
1589      PDP_FAIL_PPP_CHAP_FAILURE = 2232;
1590
1591      PDP_FAIL_PPP_CLOSE_IN_PROGRESS = 2233;
1592
1593      PDP_FAIL_LIMITED_TO_IPV4 = 2234;
1594
1595      PDP_FAIL_LIMITED_TO_IPV6 = 2235;
1596
1597      PDP_FAIL_VSNCP_TIMEOUT = 2236;
1598
1599      PDP_FAIL_VSNCP_GEN_ERROR = 2237;
1600
1601      PDP_FAIL_VSNCP_APN_UNATHORIZED = 2238;
1602
1603      PDP_FAIL_VSNCP_PDN_LIMIT_EXCEEDED = 2239;
1604
1605      PDP_FAIL_VSNCP_NO_PDN_GATEWAY_ADDRESS = 2240;
1606
1607      PDP_FAIL_VSNCP_PDN_GATEWAY_UNREACHABLE = 2241;
1608
1609      PDP_FAIL_VSNCP_PDN_GATEWAY_REJECT = 2242;
1610
1611      PDP_FAIL_VSNCP_INSUFFICIENT_PARAMETERS = 2243;
1612
1613      PDP_FAIL_VSNCP_RESOURCE_UNAVAILABLE = 2244;
1614
1615      PDP_FAIL_VSNCP_ADMINISTRATIVELY_PROHIBITED = 2245;
1616
1617      PDP_FAIL_VSNCP_PDN_ID_IN_USE = 2246;
1618
1619      PDP_FAIL_VSNCP_SUBSCRIBER_LIMITATION = 2247;
1620
1621      PDP_FAIL_VSNCP_PDN_EXISTS_FOR_THIS_APN = 2248;
1622
1623      PDP_FAIL_VSNCP_RECONNECT_NOT_ALLOWED = 2249;
1624
1625      PDP_FAIL_IPV6_PREFIX_UNAVAILABLE = 2250;
1626
1627      PDP_FAIL_HANDOFF_PREFERENCE_CHANGED = 2251;
1628
1629      // Not mentioned in the specification
1630      PDP_FAIL_VOICE_REGISTRATION_FAIL = -1;
1631
1632      PDP_FAIL_DATA_REGISTRATION_FAIL = -2;
1633
1634      // Reasons for data call drop - network/modem disconnect
1635      PDP_FAIL_SIGNAL_LOST = -3;
1636
1637      // Preferred technology has changed, should retry with parameters
1638      // appropriate for new technology
1639      PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4;
1640
1641      // Data call was disconnected because radio was resetting,
1642      // powered off - no retry
1643      PDP_FAIL_RADIO_POWER_OFF = -5;
1644
1645      // Data call was disconnected by modem because tethered mode was up
1646      // on same APN/data profile - no retry until tethered call is off
1647      PDP_FAIL_TETHERED_CALL_ACTIVE = -6;
1648
1649      // retry silently
1650      PDP_FAIL_ERROR_UNSPECIFIED = 65535;
1651    }
1652
1653    // A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error
1654    optional RilDataCallFailCause status = 1;
1655
1656    // If status != 0, this fields indicates the suggested retry back-off timer
1657    // value RIL wants to override the one pre-configured in FW
1658    optional int32 suggested_retry_time_millis = 2;
1659
1660    optional RilDataCall call = 3;
1661  }
1662
1663  // Carrier Key Change Event.
1664  message CarrierKeyChange {
1665
1666    enum KeyType {
1667
1668      // Key Type Unknown.
1669      UNKNOWN = 0;
1670      // Key Type for WLAN.
1671      WLAN = 1;
1672      // Key Type for EPDG.
1673      EPDG = 2;
1674    }
1675
1676    // Key type of the Encryption key.
1677    optional KeyType key_type = 1;
1678
1679    // Whether the download was successful or not.
1680    optional bool isDownloadSuccessful = 2;
1681  }
1682
1683  // Deactivate packet data connection
1684  message RilDeactivateDataCall {
1685
1686    // Context ID
1687    optional int32 cid = 1;
1688
1689    // Reason for deactivating data call
1690    optional DeactivateReason reason = 2;
1691
1692    // Deactivate data call reasons
1693    enum DeactivateReason {
1694
1695      // Reason is unknown.
1696      DEACTIVATE_REASON_UNKNOWN = 0;
1697
1698      DEACTIVATE_REASON_NONE = 1;
1699
1700      DEACTIVATE_REASON_RADIO_OFF = 2;
1701
1702      DEACTIVATE_REASON_PDP_RESET = 3;
1703
1704      DEACTIVATE_REASON_HANDOVER = 4;
1705    }
1706  }
1707
1708  message ModemRestart {
1709     // The baseband_version is used to identify the particular software version
1710     // where the modem restarts happened
1711     optional string baseband_version = 1;
1712
1713     // Indicates the modem restart reason. The restart reason can be used to
1714     // categorize any modem crashes and group similar crashes together. This
1715     // information will be useful to identify the cause of modem crashes,
1716     // reproduce the issue and confirm that the fix works.
1717     optional string reason = 2;
1718  }
1719
1720  message CarrierIdMatching {
1721
1722    // Carrier id table version number
1723    optional int32 cid_table_version = 1;
1724
1725    // Carrier id matching result object
1726    optional CarrierIdMatchingResult result = 2;
1727  }
1728
1729  message CarrierIdMatchingResult {
1730
1731    // A unique carrier id
1732    optional int32 carrier_id = 1;
1733
1734    // Group id level 1. Logged only if gid1 is configured from subscription
1735    // but its matching rule is unknown
1736    optional string unknown_gid1 = 2;
1737
1738    // MCC and MNC that map to this carrier. Logged only if mccmnc is configured
1739    // from subscription but its matching rule is unknown
1740    optional string unknown_mccmnc = 3;
1741
1742    // MCC and MNC from the subscription that map to this carrier.
1743    optional string mccmnc = 4;
1744
1745    // Group id level 1 from the subscription that map to this carrier.
1746    optional string gid1 = 5;
1747
1748    // Group id level 2 from the subscription that map to this carrier.
1749    optional string gid2 = 6;
1750
1751    // spn from the subscription that map to this carrier.
1752    optional string spn = 7;
1753
1754    // pnn from the subscription that map to this carrier.
1755    optional string pnn = 8;
1756
1757    // iccid prefix from the subscription that map to this carrier.
1758    // only log first 7 outof 20 bit of full iccid
1759    optional string iccid_prefix = 9;
1760
1761    // imsi prefix from the subscription that map to this carrier.
1762    // only log additional 2 bits other than MCC MNC.
1763    optional string imsi_prefix = 10;
1764
1765    // Carrier Privilege Access Rule in hex string from the subscription.
1766    // Sample values: 61ed377e85d386a8dfee6b864bd85b0bfaa5af88
1767    repeated string privilege_access_rule = 11;
1768
1769    // The Access Point Name, corresponding to "apn" field returned by
1770    // "content://telephony/carriers/preferapn" on device.
1771    // Sample values: fast.t-mobile.com, internet. Note only log if this apn is not user edited.
1772    optional string preferApn = 12;
1773  }
1774
1775  message NetworkCapabilitiesInfo {
1776    // Is network unmetered
1777    optional bool is_network_unmetered = 1;
1778  }
1779
1780  // Time when event happened on device, in milliseconds since boot
1781  optional int64 timestamp_millis = 1;
1782
1783  // In Multi-SIM devices this indicates SIM slot
1784  optional int32 phone_id = 2;
1785
1786  // Event type
1787  optional Type type = 3;
1788
1789  // User settings
1790  optional TelephonySettings settings = 4;
1791
1792  // RIL Service State
1793  optional TelephonyServiceState service_state = 5;
1794
1795  // IMS state
1796  optional ImsConnectionState ims_connection_state = 6;
1797
1798  // IMS capabilities
1799  optional ImsCapabilities ims_capabilities = 7;
1800
1801  // List of data calls when changed
1802  repeated RilDataCall data_calls = 8;
1803
1804  // RIL error code
1805  optional RilErrno error = 9;
1806
1807  // Setup data call request
1808  optional RilSetupDataCall setup_data_call = 10;
1809
1810  // Setup data call response
1811  optional RilSetupDataCallResponse setup_data_call_response = 11;
1812
1813  // Deactivate data call request
1814  optional RilDeactivateDataCall deactivate_data_call = 12;
1815
1816  // Data call stall recovery action
1817  optional int32 data_stall_action = 13;
1818
1819  // Modem restart event
1820  optional ModemRestart modem_restart = 14;
1821
1822  // NITZ time in milliseconds (see TelephonyEvent.Type.NITZ_TIME)
1823  optional int64 nitz_timestamp_millis = 15;
1824
1825  // Carrier id matching event
1826  optional CarrierIdMatching carrier_id_matching = 16;
1827
1828  // Carrier key change
1829  optional CarrierKeyChange carrier_key_change = 17;
1830
1831  // Data switch event
1832  optional DataSwitch data_switch = 19;
1833
1834  // For network validate event
1835  optional NetworkValidationState network_validation_state = 20;
1836
1837  // On demand data switch event
1838  optional OnDemandDataSwitch on_demand_data_switch = 21;
1839
1840  // Sim state for each slot.
1841  repeated SimState sim_state = 22;
1842
1843  // The active subscription info for a specific slot.
1844  optional ActiveSubscriptionInfo active_subscription_info = 23;
1845
1846  // The modem state represent by a bitmap, the i-th bit(LSB) indicates the i-th modem
1847  // state (0 - disabled, 1 - enabled).
1848  optional int32 enabled_modem_bitmap = 24;
1849
1850  // Updated Emergency Call info.
1851  optional EmergencyNumberInfo updated_emergency_number = 25;
1852
1853  // NetworkCapabilities changed info.
1854  optional NetworkCapabilitiesInfo network_capabilities = 26;
1855
1856  // Signal strength
1857  optional int32 signal_strength = 27;
1858
1859  // Indicate the version of emergency number database in Android platform
1860  optional int32 emergency_number_database_version = 28;
1861  // [
1862  //  (datapol.semantic_type) = ST_SOFTWARE_ID,
1863  //  (datapol.qualifier) = { is_public: true }
1864  //]
1865
1866  // Radio state for the given phone_id
1867  optional RadioState radio_state = 29;
1868}
1869
1870message ActiveSubscriptionInfo {
1871  /** The slot index which this subscription is associated with. */
1872  optional int32 slot_index = 1;
1873
1874  /** The Carrier id of this subscription. -1 indicates unknown value. */
1875  optional int32 carrier_id = 2;
1876
1877  /** whether subscription is opportunistic (0 - false, 1 - true, -1 - unknown). */
1878  optional int32 is_opportunistic = 3;
1879
1880  /** The mccmnc associated with the subscription. Useful for differentiating
1881   * between subscriptions with different mccmnc but same carrier_id (eg. Fi
1882   * Sprint vs. Fi T-Mobile).*/
1883  optional string sim_mccmnc = 4 /*[
1884    (datapol.semantic_type) = ST_LOCATION,
1885    (datapol.location_qualifier) = { precise_location: false }
1886  ]*/;
1887};
1888
1889enum SimState {
1890  /**
1891   * SIM card is inserted, but the state is unknown. Typically happened when the SIM is inserted
1892   * but not loaded.
1893   */
1894  SIM_STATE_UNKNOWN = 0;
1895
1896  /** No SIM card is inserted in the slot. */
1897  SIM_STATE_ABSENT = 1;
1898
1899  /** SIM card applications have been loaded. */
1900  SIM_STATE_LOADED = 2;
1901};
1902
1903enum TimeInterval {
1904  TI_UNKNOWN = 0;
1905  TI_10_MILLIS = 1;
1906  TI_20_MILLIS = 2;
1907  TI_50_MILLIS = 3;
1908  TI_100_MILLIS = 4;
1909  TI_200_MILLIS = 5;
1910  TI_500_MILLIS = 6;
1911  TI_1_SEC = 7;
1912  TI_2_SEC = 8;
1913  TI_5_SEC = 9;
1914  TI_10_SEC = 10;
1915  TI_30_SEC = 11;
1916  TI_1_MINUTE = 12;
1917  TI_3_MINUTES = 13;
1918  TI_10_MINUTES = 14;
1919  TI_30_MINUTES = 15;
1920  TI_1_HOUR = 16;
1921  TI_2_HOURS = 17;
1922  TI_4_HOURS = 18;
1923  TI_MANY_HOURS = 19;
1924}
1925
1926// Information about CS and/or PS call session.
1927// Session starts when call is placed or accepted and
1928// ends when there are no more active calls.
1929message TelephonyCallSession {
1930
1931  message Event {
1932
1933    enum Type {
1934
1935      // Unknown event
1936      EVENT_UNKNOWN = 0;
1937
1938      // Telephony related user settings changed
1939      SETTINGS_CHANGED = 1;
1940
1941      // Phone state changed
1942      RIL_SERVICE_STATE_CHANGED = 2;
1943
1944      // IMS connected/disconnected
1945      IMS_CONNECTION_STATE_CHANGED = 3;
1946
1947      // IMS Voice, Video and Ut capabilities changed
1948      IMS_CAPABILITIES_CHANGED = 4;
1949
1950      // Notification that new data call has appeared in the list
1951      // or old data call has removed.
1952      DATA_CALL_LIST_CHANGED = 5;
1953
1954      // Send request to RIL
1955      RIL_REQUEST = 6;
1956
1957      // Result of the RIL request
1958      RIL_RESPONSE = 7;
1959
1960      // Ring indication for an incoming call
1961      RIL_CALL_RING = 8;
1962
1963      // Notification that Single Radio Voice Call Continuity(SRVCC)
1964      // progress state has changed.
1965      RIL_CALL_SRVCC = 9;
1966
1967      // Notification that list of calls has changed.
1968      RIL_CALL_LIST_CHANGED = 10;
1969
1970      // Command sent to IMS Service. See ImsCommand.
1971      IMS_COMMAND = 11;
1972
1973      // Command sent to IMS Service. See ImsCommand.
1974      IMS_COMMAND_RECEIVED = 12;
1975
1976      // Command sent to IMS Service. See ImsCommand.
1977      IMS_COMMAND_FAILED = 13;
1978
1979      // Command sent to IMS Service. See ImsCommand.
1980      IMS_COMMAND_COMPLETE = 14;
1981
1982      // Notification about incoming voice call
1983      IMS_CALL_RECEIVE = 15;
1984
1985      // Notification that state of the call has changed
1986      IMS_CALL_STATE_CHANGED = 16;
1987
1988      // Notification about IMS call termination
1989      IMS_CALL_TERMINATED = 17;
1990
1991      // Notification that session access technology has changed
1992      IMS_CALL_HANDOVER = 18;
1993
1994      // Notification that session access technology has changed
1995      IMS_CALL_HANDOVER_FAILED = 19;
1996
1997      // Notification about phone state changed.
1998      PHONE_STATE_CHANGED = 20;
1999
2000      // System time overwritten by NITZ (Network time)
2001      NITZ_TIME = 21;
2002
2003      // Change of audio codec
2004      AUDIO_CODEC = 22;
2005
2006      // Notification that the call quality has changed
2007      CALL_QUALITY_CHANGED = 23;
2008    }
2009
2010    enum RilRequest {
2011
2012      RIL_REQUEST_UNKNOWN = 0;
2013
2014      // Initiate voice call
2015      RIL_REQUEST_DIAL = 1;
2016
2017      // Answer incoming call
2018      RIL_REQUEST_ANSWER = 2;
2019
2020      // Hang up a specific line
2021      RIL_REQUEST_HANGUP = 3;
2022
2023      // Configure current call waiting state
2024      RIL_REQUEST_SET_CALL_WAITING = 4;
2025
2026      RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE = 5;
2027
2028      // Send FLASH
2029      RIL_REQUEST_CDMA_FLASH = 6;
2030
2031      // Conference holding and active
2032      RIL_REQUEST_CONFERENCE = 7;
2033    }
2034
2035    enum ImsCommand {
2036
2037      // Command is unknown.
2038      IMS_CMD_UNKNOWN = 0;
2039
2040      IMS_CMD_START = 1;
2041
2042      IMS_CMD_ACCEPT = 2;
2043
2044      IMS_CMD_REJECT = 3;
2045
2046      IMS_CMD_TERMINATE = 4;
2047
2048      IMS_CMD_HOLD = 5;
2049
2050      IMS_CMD_RESUME = 6;
2051
2052      IMS_CMD_MERGE = 7;
2053
2054      IMS_CMD_UPDATE = 8;
2055
2056      IMS_CMD_CONFERENCE_EXTEND = 9;
2057
2058      IMS_CMD_INVITE_PARTICIPANT = 10;
2059
2060      IMS_CMD_REMOVE_PARTICIPANT = 11;
2061    }
2062
2063    enum PhoneState {
2064
2065      // State is unknown.
2066      STATE_UNKNOWN = 0;
2067
2068      STATE_IDLE = 1;
2069
2070      STATE_RINGING = 2;
2071
2072      STATE_OFFHOOK = 3;
2073    }
2074
2075    // Telephony call states
2076    enum CallState {
2077
2078      // State is unknown.
2079      CALL_UNKNOWN = 0;
2080
2081      CALL_IDLE = 1;
2082
2083      CALL_ACTIVE = 2;
2084
2085      CALL_HOLDING = 3;
2086
2087      CALL_DIALING = 4;
2088
2089      CALL_ALERTING = 5;
2090
2091      CALL_INCOMING = 6;
2092
2093      CALL_WAITING = 7;
2094
2095      CALL_DISCONNECTED = 8;
2096
2097      CALL_DISCONNECTING = 9;
2098    }
2099
2100    // Audio codecs
2101    enum AudioCodec {
2102
2103      // Unknown codec
2104      AUDIO_CODEC_UNKNOWN = 0;
2105
2106      AUDIO_CODEC_AMR = 1;
2107
2108      AUDIO_CODEC_AMR_WB = 2;
2109
2110      AUDIO_CODEC_QCELP13K = 3;
2111
2112      AUDIO_CODEC_EVRC = 4;
2113
2114      AUDIO_CODEC_EVRC_B = 5;
2115
2116      AUDIO_CODEC_EVRC_WB = 6;
2117
2118      AUDIO_CODEC_EVRC_NW = 7;
2119
2120      AUDIO_CODEC_GSM_EFR = 8;
2121
2122      AUDIO_CODEC_GSM_FR = 9;
2123
2124      AUDIO_CODEC_GSM_HR = 10;
2125
2126      AUDIO_CODEC_G711U = 11;
2127
2128      AUDIO_CODEC_G723 = 12;
2129
2130      AUDIO_CODEC_G711A = 13;
2131
2132      AUDIO_CODEC_G722 = 14;
2133
2134      AUDIO_CODEC_G711AB = 15;
2135
2136      AUDIO_CODEC_G729 = 16;
2137
2138      AUDIO_CODEC_EVS_NB = 17;
2139
2140      AUDIO_CODEC_EVS_WB = 18;
2141
2142      AUDIO_CODEC_EVS_SWB = 19;
2143
2144      AUDIO_CODEC_EVS_FB = 20;
2145    }
2146
2147    // The information about a voice call
2148    message RilCall {
2149
2150      enum Type {
2151
2152        // Scan Type is unknown.
2153        UNKNOWN = 0;
2154
2155        // Mobile originated
2156        MO = 1;
2157
2158        // Mobile terminated
2159        MT = 2;
2160      }
2161
2162      // Connection Index
2163      optional int32 index = 1;
2164
2165      optional CallState state = 2;
2166
2167      optional Type type = 3;
2168
2169      // For possible values for a call end reason check
2170      // frameworks/base/telephony/java/android/telephony/DisconnectCause.java
2171      optional int32 call_end_reason = 4;
2172
2173      // This field is true for Conference Calls
2174      optional bool is_multiparty = 5;
2175
2176      // Detailed cause code for CS Call failures
2177      // frameworks/base/telephony/java/android/telephony/PreciseDisconnectCause.java
2178      optional int32 precise_disconnect_cause = 6;
2179
2180      // Indicate if the call is an emergency call
2181      optional bool is_emergency_call = 7;
2182
2183      // Indicate the emergency call information dialed from the CS call
2184      optional EmergencyNumberInfo emergency_number_info = 8;
2185
2186      // Indicate the version of emergency number database in Android platform
2187      optional int32 emergency_number_database_version = 9;
2188      // [
2189      //  (datapol.semantic_type) = ST_SOFTWARE_ID,
2190      //  (datapol.qualifier) = { is_public: true }
2191      //]
2192    }
2193
2194    // Single Radio Voice Call Continuity(SRVCC) progress state
2195    enum RilSrvccState {
2196
2197      // State is unknown.
2198      HANDOVER_UNKNOWN = 0;
2199
2200      HANDOVER_STARTED = 1;
2201
2202      HANDOVER_COMPLETED = 2;
2203
2204      HANDOVER_FAILED = 3;
2205
2206      HANDOVER_CANCELED = 4;
2207    }
2208
2209    message SignalStrength {
2210
2211      // signal to noise ratio for LTE signal strength
2212      optional int32 lte_snr = 1;
2213
2214      // in the future we may include more measures of signal strength, or
2215      // measurements for other RATs
2216    }
2217
2218    // CallQuality information. (This proto class corresponds to
2219    // android.telephony.CallQuality)
2220    message CallQuality {
2221
2222      enum CallQualityLevel {
2223
2224        // leaving the first value explicitly as unspecified avoids breaking
2225        // clients if the desired default behavior changes
2226        UNDEFINED = 0;
2227
2228        EXCELLENT = 1;
2229
2230        GOOD = 2;
2231
2232        FAIR = 3;
2233
2234        POOR = 4;
2235
2236        BAD = 5;
2237
2238        // this typically indicates a failure in the modem
2239        NOT_AVAILABLE = 6;
2240      }
2241
2242      // the downlink CallQualityLevel for a given ongoing call
2243      optional CallQualityLevel downlink_level = 1;
2244
2245      // the uplink CallQualityLevel for a given ongoing call
2246      optional CallQualityLevel uplink_level = 2;
2247
2248      // the duration of the call, in seconds
2249      optional int32 duration_in_seconds = 3;
2250
2251      // the total number of RTP packets transmitted by this device for an
2252      // ongoing call
2253      optional int32 rtp_packets_transmitted = 4;
2254
2255      // the total number of RTP packets received by this device for an ongoing
2256      // call
2257      optional int32 rtp_packets_received = 5;
2258
2259      // the number of RTP packets which were sent by this device but were lost
2260      // in the network before reaching the other party
2261      optional int32 rtp_packets_transmitted_lost = 6;
2262
2263      // the number of RTP packets which were sent by the other party but were
2264      // lost in the network before reaching this device
2265      optional int32 rtp_packets_not_received = 7;
2266
2267      // the average relative jitter in milliseconds. Jitter represents the
2268      // amount of variance in interarrival time of packets, for example, if two
2269      // packets are sent 2 milliseconds apart but received 3 milliseconds
2270      // apart, the relative jitter between those packets is 1 millisecond.
2271      //
2272      // See RFC 3550 for more information on jitter calculations
2273      optional int32 average_relative_jitter_millis = 8;
2274
2275      // the maximum relative jitter for a given ongoing call. Jitter represents
2276      // the amount of variance in interarrival time of packets, for example, if
2277      // two packets are sent 2 milliseconds apart but received 3 milliseconds
2278      // apart, the relative jitter between those packets is 1 millisecond.
2279      //
2280      // See RFC 3550 for more information on jitter calculations.
2281      optional int32 max_relative_jitter_millis = 9;
2282
2283      // the average round trip time of RTP packets in an ongoing call, in milliseconds
2284      optional int32 average_round_trip_time = 10;
2285
2286      // the codec type of an ongoing call
2287      optional AudioCodec codec_type = 11;
2288
2289      // true if no incoming RTP is received for a continuous duration of 4 seconds
2290      optional bool rtp_inactivity_detected = 12;
2291
2292      // true if only silence RTP packets are received for 20 seconds immediately
2293      // after call is connected
2294      optional bool rx_silence_detected = 13;
2295
2296      // true if only silence RTP packets are sent for 20 seconds immediately
2297      // after call is connected
2298      optional bool tx_silence_detected = 14;
2299
2300    }
2301
2302    message CallQualitySummary {
2303
2304      // Total duration of good call quality reported at the end of a call
2305      optional int32 total_good_quality_duration_in_seconds = 1;
2306
2307      // Total duration of bad call quality reported at the end of a call
2308      optional int32 total_bad_quality_duration_in_seconds = 2;
2309
2310      // Total duration of the call for which we have call quality
2311      // information, reported at the end of a call. For example, if an IMS call
2312      // is converted to a CS call, which doesn't report call quality information,
2313      // this value is the duration of the IMS component.
2314      optional int32 total_duration_with_quality_information_in_seconds = 3;
2315
2316      // Snapshot of the CallQuality when signal strength is worst within good
2317      // quality section
2318      optional CallQuality snapshot_of_worst_ss_with_good_quality = 4;
2319
2320      // Snapshot of the CallQuality when signal strength is best within good
2321      // quality section
2322      optional CallQuality snapshot_of_best_ss_with_good_quality = 5;
2323
2324      // Snapshot of the CallQuality when signal strength is worst within bad
2325      // quality section
2326      optional CallQuality snapshot_of_worst_ss_with_bad_quality = 6;
2327
2328      // Snapshot of the CallQuality when signal strength is best within bad
2329      // quality section
2330      optional CallQuality snapshot_of_best_ss_with_bad_quality = 7;
2331
2332      // The worst SignalStrength in any good quality section
2333      optional SignalStrength worst_ss_with_good_quality = 8;
2334
2335      // The best SignalStrength in any good quality section
2336      optional SignalStrength best_ss_with_good_quality = 9;
2337
2338      // The worst SignalStrength in any bad quality section
2339      optional SignalStrength worst_ss_with_bad_quality = 10;
2340
2341      // The best SignalStrength in any bad quality section
2342      optional SignalStrength best_ss_with_bad_quality = 11;
2343
2344      // Snapshot of the CallQuality at the end of a call. This includes
2345      // cumulative statistics like total duration and total RTP packets.
2346      optional CallQuality snapshot_of_end = 12;
2347
2348    }
2349
2350    // Event type
2351    optional Type type = 1;
2352
2353    // Time since previous event
2354    optional TimeInterval delay = 2;
2355
2356    // Settings at the beginning of the session or when changed
2357    optional TelephonySettings settings = 3;
2358
2359    // State at the beginning of the session or when changed
2360    optional TelephonyServiceState service_state = 4;
2361
2362    // State at the beginning of the session or when changed
2363    optional ImsConnectionState ims_connection_state = 5;
2364
2365    // Capabilities at the beginning of the session or when changed
2366    optional ImsCapabilities ims_capabilities = 6;
2367
2368    // List of data calls at the beginning of the session or when changed
2369    repeated RilDataCall data_calls = 7;
2370
2371    // New state
2372    optional PhoneState phone_state = 8;
2373
2374    // New state
2375    optional CallState call_state = 9;
2376
2377    // CS or IMS Voice call index
2378    optional int32 call_index = 10;
2379
2380    // New merged call
2381    optional int32 merged_call_index = 11;
2382
2383    // Active CS Voice calls
2384    repeated RilCall calls = 12;
2385
2386    // RIL error code
2387    optional RilErrno error = 13;
2388
2389    // RIL request
2390    optional RilRequest ril_request = 14;
2391
2392    // Numeric ID
2393    optional int32 ril_request_id = 15;
2394
2395    // New SRVCC state
2396    optional RilSrvccState srvcc_state = 16;
2397
2398    // IMS command
2399    optional ImsCommand ims_command = 17;
2400
2401    // IMS Failure reason
2402    optional ImsReasonInfo reason_info = 18;
2403
2404    // Original access technology
2405    optional RadioAccessTechnology src_access_tech = 19 [default = UNKNOWN];
2406
2407    // New access technology
2408    optional RadioAccessTechnology target_access_tech = 20 [default = UNKNOWN];
2409
2410    // NITZ time in milliseconds
2411    optional int64 nitz_timestamp_millis = 21;
2412
2413    // Audio codec at the beginning of the session or when changed
2414    optional AudioCodec audio_codec = 22;
2415
2416    // Call quality when changed
2417    optional CallQuality call_quality = 23;
2418
2419    // Downlink call quality summary at the end of a call
2420    optional CallQualitySummary call_quality_summary_dl = 24;
2421
2422    // Uplink call quality summary at the end of a call
2423    optional CallQualitySummary call_quality_summary_ul = 25;
2424
2425    // Indicate if it is IMS emergency call
2426    optional bool is_ims_emergency_call = 26;
2427
2428    // Emergency call info
2429    optional EmergencyNumberInfo ims_emergency_number_info = 27;
2430
2431    // Indicate the version of emergency number database in Android platform
2432    optional int32 emergency_number_database_version = 28;
2433    // [
2434    //  (datapol.semantic_type) = ST_SOFTWARE_ID,
2435    //  (datapol.qualifier) = { is_public: true }
2436    //]
2437  }
2438
2439  // Time when call has started, in minutes since epoch,
2440  // with 5 minutes precision
2441  optional int32 start_time_minutes = 1;
2442
2443  // In Multi-SIM devices this indicates SIM slot
2444  optional int32 phone_id = 2;
2445
2446  // List of events happened during the call
2447  repeated Event events = 3;
2448
2449  // Indicating some call events are dropped
2450  optional bool events_dropped = 4;
2451}
2452
2453message SmsSession {
2454
2455  message Event {
2456
2457    enum Type {
2458
2459      // Unknown event
2460      EVENT_UNKNOWN = 0;
2461
2462      // Telephony related user settings changed
2463      SETTINGS_CHANGED = 1;
2464
2465      // Phone state changed
2466      RIL_SERVICE_STATE_CHANGED = 2;
2467
2468      // IMS connected/disconnected
2469      IMS_CONNECTION_STATE_CHANGED = 3;
2470
2471      // IMS Voice, Video and Ut capabilities changed
2472      IMS_CAPABILITIES_CHANGED = 4;
2473
2474      // Notification that new data call has appeared in the list
2475      // or old data call has removed.
2476      DATA_CALL_LIST_CHANGED = 5;
2477
2478      // Send a SMS message over RIL
2479      SMS_SEND = 6;
2480
2481      // Message has been sent to network using RIL
2482      SMS_SEND_RESULT = 7;
2483
2484      // Notification about received SMS using RIL
2485      SMS_RECEIVED = 8;
2486
2487      // CB message received
2488      CB_SMS_RECEIVED = 9;
2489
2490      // Incomplete multipart message received
2491      INCOMPLETE_SMS_RECEIVED = 10;
2492    }
2493
2494    // Formats used to encode SMS messages
2495    enum Format {
2496
2497      // Format is unknown.
2498      SMS_FORMAT_UNKNOWN = 0;
2499
2500      // GSM, WCDMA
2501      SMS_FORMAT_3GPP = 1;
2502
2503      // CDMA
2504      SMS_FORMAT_3GPP2 = 2;
2505    }
2506
2507    enum Tech {
2508      SMS_UNKNOWN = 0;
2509
2510      SMS_GSM = 1;
2511
2512      SMS_CDMA = 2;
2513
2514      SMS_IMS = 3;
2515    }
2516
2517    message CBMessage {
2518      // CB message format
2519      optional Format msg_format = 1;
2520
2521      // CB message priority
2522      optional CBPriority msg_priority = 2;
2523
2524      // Type of CB msg
2525      optional CBMessageType msg_type = 3;
2526
2527      // Service category of CB message
2528      optional int32 service_category = 4;
2529
2530      // Message's serial number
2531      optional int32 serial_number = 5;
2532
2533      // The delivered time (UTC) of the message
2534      optional int64 delivered_timestamp_millis = 6;
2535    }
2536
2537    enum CBMessageType {
2538      // Unknown type
2539      TYPE_UNKNOWN = 0;
2540
2541      // ETWS CB msg
2542      ETWS = 1;
2543
2544      // CMAS CB msg
2545      CMAS = 2;
2546
2547      // CB msg other than ETWS and CMAS
2548      OTHER = 3;
2549    }
2550
2551    enum CBPriority {
2552      // Unknown priority
2553      PRIORITY_UNKNOWN = 0;
2554
2555      // NORMAL priority
2556      NORMAL = 1;
2557
2558      // Interactive priority
2559      INTERACTIVE = 2;
2560
2561      // Urgent priority
2562      URGENT = 3;
2563
2564      // Emergency priority
2565      EMERGENCY = 4;
2566    }
2567
2568    // Types of SMS messages
2569    enum SmsType {
2570
2571      // Normal type
2572      SMS_TYPE_NORMAL = 0;
2573
2574      // SMS-PP.
2575      SMS_TYPE_SMS_PP = 1;
2576
2577      // Voicemail indication
2578      SMS_TYPE_VOICEMAIL_INDICATION = 2;
2579
2580      // Type 0 message (3GPP TS 23.040 9.2.3.9)
2581      SMS_TYPE_ZERO = 3;
2582
2583      // WAP-PUSH message
2584      SMS_TYPE_WAP_PUSH = 4;
2585    }
2586
2587    message IncompleteSms {
2588      // Number of received parts
2589      optional int32 received_parts = 1;
2590
2591      // Number of expected parts
2592      optional int32 total_parts = 2;
2593    }
2594
2595    // Event type
2596    optional Type type = 1;
2597
2598    // Time since previous event
2599    optional TimeInterval delay = 2;
2600
2601    // Settings at the beginning of the session or when changed
2602    optional TelephonySettings settings = 3;
2603
2604    // State at the beginning of the session or when changed
2605    optional TelephonyServiceState service_state = 4;
2606
2607    // State at the beginning of the session or when changed
2608    optional ImsConnectionState ims_connection_state = 5;
2609
2610    // Capabilities at the beginning of the session or when changed
2611    optional ImsCapabilities ims_capabilities = 6;
2612
2613    // List of data calls at the beginning of the session or when changed
2614    repeated RilDataCall data_calls = 7;
2615
2616    // Format of the message
2617    optional Format format = 8;
2618
2619    // Technology used to send/receive SMS
2620    optional Tech tech = 9;
2621
2622    // For outgoing SMS:
2623    //  - See 3GPP 27.005, 3.2.5 for GSM/UMTS,
2624    //  - 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
2625    // For incoming SMS of any type:
2626    //  - it is mapped to a SmsManager.RESULT_* code
2627    // SmsManager can be accessed from
2628    // frameworks/base/telephony/java/android/telephony/SmsManager.java
2629    optional int32 error_code = 10;
2630
2631    // RIL error code - Not used.
2632    optional RilErrno error = 11;
2633
2634    // Numeric ID - Used only for outgoing SMS
2635    optional int32 ril_request_id = 12;
2636
2637    // Cellbroadcast message content
2638    optional CBMessage cell_broadcast_message = 13;
2639
2640    // ImsService error code. Used only for outgoing SMS
2641    optional ImsServiceErrno ims_error = 14;
2642
2643    // Details of incoming incomplete multipart SMS
2644    optional IncompleteSms incomplete_sms = 15;
2645
2646    // Indicate the type of incoming SMS
2647    optional SmsType sms_type = 16;
2648
2649    // Indicates if the incoming SMS was blocked
2650    optional bool blocked = 17;
2651
2652    // Optional xMS message unique id
2653    optional int64 message_id = 18;
2654  }
2655
2656  // Time when session has started, in minutes since epoch,
2657  // with 5 minutes precision
2658  optional int32 start_time_minutes = 1;
2659
2660  // In Multi-SIM devices this indicates SIM slot
2661  optional int32 phone_id = 2;
2662
2663  // List of events happened during the call
2664  repeated Event events = 3;
2665
2666  // Indicating some sms session events are dropped
2667  optional bool events_dropped = 4;
2668}
2669
2670// Power stats for modem
2671message ModemPowerStats {
2672
2673  // Duration of log (ms). This is the duration of time device is
2674  // on battery and modem power stats are collected.
2675  optional int64 logging_duration_ms = 1;
2676
2677  // Energy consumed by modem (mAh)
2678  optional double energy_consumed_mah = 2;
2679
2680  // Number of packets sent (tx)
2681  optional int64 num_packets_tx = 3;
2682
2683  // Amount of time kernel is active because of cellular data (ms)
2684  optional int64 cellular_kernel_active_time_ms = 4;
2685
2686  // Amount of time spent in very poor rx signal level (ms)
2687  optional int64 time_in_very_poor_rx_signal_level_ms = 5;
2688
2689  // Amount of time modem is in sleep (ms)
2690  optional int64 sleep_time_ms = 6;
2691
2692  // Amount of time modem is in idle (ms)
2693  optional int64 idle_time_ms = 7;
2694
2695  // Amount of time modem is in rx (ms)
2696  optional int64 rx_time_ms = 8;
2697
2698  // Amount of time modem is in tx (ms)
2699  repeated int64 tx_time_ms = 9;
2700
2701  // Number of bytes sent (tx)
2702  optional int64 num_bytes_tx = 10;
2703
2704  // Number of packets received (rx)
2705  optional int64 num_packets_rx = 11;
2706
2707  // Number of bytes received (rx)
2708  optional int64 num_bytes_rx = 12;
2709
2710  // Amount of time phone spends in various Radio Access Technologies (ms)
2711  repeated int64 time_in_rat_ms = 13;
2712
2713  // Amount of time phone spends in various cellular
2714  // rx signal strength levels (ms)
2715  repeated int64 time_in_rx_signal_strength_level_ms = 14;
2716
2717  // Actual monitored rail energy consumed by modem (mAh)
2718  optional double monitored_rail_energy_consumed_mah = 15;
2719}
2720
2721// Bandwidth estimator stats
2722message BandwidthEstimatorStats {
2723  // Bandwidth stats of each level
2724  message PerLevel {
2725    optional uint32 signal_level = 1;
2726    // Accumulated bandwidth sample count
2727    optional uint32 count = 2;
2728    // Average end-to-end bandwidth in kbps
2729    optional uint32 avg_bw_kbps = 3;
2730    // Normalized error of static BW values in percent
2731    optional uint32 static_bw_error_percent = 4;
2732    // Normalized error of end-to-end BW estimation in percent
2733    optional uint32 bw_est_error_percent = 5;
2734  }
2735
2736  // Bandwidth stats of each RAT
2737  message PerRat {
2738    // radio access technology
2739    optional RadioAccessTechnology rat = 1;
2740    // NR (5g) operation mode
2741    optional NrMode nr_mode = 2;
2742    // bandwidth stats of signal levels
2743    repeated PerLevel per_level = 3;
2744  }
2745
2746  // Tx Stats of visited RATs
2747  repeated PerRat per_rat_tx = 1;
2748  // Rx Stats of visited RATs
2749  repeated PerRat per_rat_rx = 2;
2750}
2751