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