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