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 49// The time information 50message Time { 51 // The system time in milli seconds. This represents the actual 52 // time of the events. 53 optional int64 system_timestamp_millis = 1; 54 55 // The time since boot in milli seconds. 56 // This is used for calculating the time interval between events. Different 57 // from the system time, this won't be affected by time changed by the network or users. 58 optional int64 elapsed_timestamp_millis = 2; 59} 60 61// Telephony Histogram 62message TelephonyHistogram { 63 64 // Type of histogram 65 optional int32 category = 1; 66 67 // Unique Id identifying a sample within 68 // particular category of the histogram. 69 optional int32 id = 2; 70 71 // Min time taken in millis. 72 optional int32 min_time_millis = 3; 73 74 // Max time taken in millis. 75 optional int32 max_time_millis = 4; 76 77 // Average time taken in millis. 78 optional int32 avg_time_millis = 5; 79 80 // Total count of histogram samples. 81 optional int32 count = 6; 82 83 // Total number of time ranges expected 84 // (must be greater than 1). 85 optional int32 bucket_count = 7; 86 87 // Array storing endpoints of range buckets. 88 repeated int32 bucket_end_points = 8; 89 90 // Array storing counts for each time range 91 // starting from smallest value range. 92 repeated int32 bucket_counters = 9; 93} 94 95// Telephony related user settings 96message TelephonySettings { 97 98 // NETWORK_MODE_* See ril.h PREF_NET_TYPE_XXXX 99 enum RilNetworkMode { 100 101 // Mode is unknown. 102 NETWORK_MODE_UNKNOWN = 0; 103 104 // GSM/WCDMA (WCDMA preferred). Note the following values are all off by 1. 105 NETWORK_MODE_WCDMA_PREF = 1; 106 107 // GSM only 108 NETWORK_MODE_GSM_ONLY = 2; 109 110 // WCDMA only 111 NETWORK_MODE_WCDMA_ONLY = 3; 112 113 // GSM/WCDMA (auto mode, according to PRL) 114 NETWORK_MODE_GSM_UMTS = 4; 115 116 // CDMA and EvDo (auto mode, according to PRL) 117 NETWORK_MODE_CDMA = 5; 118 119 // CDMA only 120 NETWORK_MODE_CDMA_NO_EVDO = 6; 121 122 // EvDo only 123 NETWORK_MODE_EVDO_NO_CDMA = 7; 124 125 // GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) 126 NETWORK_MODE_GLOBAL = 8; 127 128 // LTE, CDMA and EvDo 129 NETWORK_MODE_LTE_CDMA_EVDO = 9; 130 131 // LTE, GSM/WCDMA 132 NETWORK_MODE_LTE_GSM_WCDMA = 10; 133 134 // LTE, CDMA, EvDo, GSM/WCDMA 135 NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA = 11; 136 137 // LTE Only mode 138 NETWORK_MODE_LTE_ONLY = 12; 139 140 // LTE/WCDMA 141 NETWORK_MODE_LTE_WCDMA = 13; 142 143 // TD-SCDMA only 144 NETWORK_MODE_TDSCDMA_ONLY = 14; 145 146 // TD-SCDMA and WCDMA 147 NETWORK_MODE_TDSCDMA_WCDMA = 15; 148 149 // TD-SCDMA and LTE 150 NETWORK_MODE_LTE_TDSCDMA = 16; 151 152 // TD-SCDMA and GSM 153 NETWORK_MODE_TDSCDMA_GSM = 17; 154 155 // TD-SCDMA,GSM and LTE 156 NETWORK_MODE_LTE_TDSCDMA_GSM = 18; 157 158 // TD-SCDMA, GSM/WCDMA 159 NETWORK_MODE_TDSCDMA_GSM_WCDMA = 19; 160 161 // TD-SCDMA, WCDMA and LTE 162 NETWORK_MODE_LTE_TDSCDMA_WCDMA = 20; 163 164 // TD-SCDMA, GSM/WCDMA and LTE 165 NETWORK_MODE_LTE_TDSCDMA_GSM_WCDMA = 21; 166 167 // TD-SCDMA,EvDo,CDMA,GSM/WCDMA 168 NETWORK_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = 22; 169 170 // TD-SCDMA/LTE/GSM/WCDMA, CDMA, and EvDo 171 NETWORK_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = 23; 172 } 173 174 // Constants for WiFi Calling mode 175 enum WiFiCallingMode { 176 177 // Calling mode is unknown. 178 WFC_MODE_UNKNOWN = 0; 179 180 WFC_MODE_WIFI_ONLY = 1; 181 182 WFC_MODE_CELLULAR_PREFERRED = 2; 183 184 WFC_MODE_WIFI_PREFERRED = 3; 185 } 186 187 // If the device is in airplane mode. 188 optional bool is_airplane_mode = 1; 189 190 // If cell-data has been enabled. 191 optional bool is_cellular_data_enabled = 2; 192 193 // If cell-roaming has been enabled. 194 optional bool is_data_roaming_enabled = 3; 195 196 // Preferred network mode. 197 optional RilNetworkMode preferred_network_mode = 4; 198 199 // If enhanced mode enabled. 200 optional bool is_enhanced_4g_lte_mode_enabled = 5; 201 202 // If wifi has been enabled. 203 optional bool is_wifi_enabled = 6; 204 205 // If wifi-calling has been enabled. 206 optional bool is_wifi_calling_enabled = 7; 207 208 // Wifi-calling Mode. 209 optional WiFiCallingMode wifi_calling_mode = 8; 210 211 // If video over LTE enabled. 212 optional bool is_vt_over_lte_enabled = 9; 213 214 // If video over wifi enabled. 215 optional bool is_vt_over_wifi_enabled = 10; 216} 217 218// Contains phone state and service related information. 219message TelephonyServiceState { 220 221 // The information about cellular network operator 222 message TelephonyOperator { 223 224 // Name in long alphanumeric format 225 optional string alpha_long = 1; 226 227 // Name in short alphanumeric format 228 optional string alpha_short = 2; 229 230 // Numeric id. 231 // In GSM/UMTS, numeric format is 3 digit country code plus 2 or 3 digit 232 // network code. Same as MCC/MNC. 233 optional string numeric = 3; 234 } 235 236 // Roaming type 237 enum RoamingType { 238 239 // Unknown. The default value. Different from ROAMING_TYPE_UNKNOWN. 240 UNKNOWN = -1; 241 242 // In home network 243 ROAMING_TYPE_NOT_ROAMING = 0; 244 245 // In a roaming network, but we can not tell 246 // if it's domestic or international 247 ROAMING_TYPE_UNKNOWN = 1; 248 249 // In domestic roaming network 250 ROAMING_TYPE_DOMESTIC = 2; 251 252 // In international roaming network 253 ROAMING_TYPE_INTERNATIONAL = 3; 254 } 255 256 // Current registered operator 257 optional TelephonyOperator voice_operator = 1; 258 259 // Current registered data network operator 260 optional TelephonyOperator data_operator = 2; 261 262 // Current voice network roaming type 263 optional RoamingType voice_roaming_type = 3 [default = UNKNOWN]; 264 265 // Current data network roaming type 266 optional RoamingType data_roaming_type = 4 [default = UNKNOWN]; 267 268 // Current voice radio technology 269 optional RadioAccessTechnology voice_rat = 5 [default = UNKNOWN]; 270 271 // Current data radio technology 272 optional RadioAccessTechnology data_rat = 6 [default = UNKNOWN]; 273} 274 275// Radio access families 276enum RadioAccessTechnology { 277 278 // This is the default value. Different from RAT_UNKNOWN. 279 UNKNOWN = -1; 280 281 // Airplane mode, out of service, or when the modem cannot determine 282 // the RAT. 283 RAT_UNKNOWN = 0; 284 285 RAT_GPRS = 1; 286 287 RAT_EDGE = 2; 288 289 RAT_UMTS = 3; 290 291 RAT_IS95A = 4; 292 293 RAT_IS95B = 5; 294 295 RAT_1XRTT = 6; 296 297 RAT_EVDO_0 = 7; 298 299 RAT_EVDO_A = 8; 300 301 RAT_HSDPA = 9; 302 303 RAT_HSUPA = 10; 304 305 RAT_HSPA = 11; 306 307 RAT_EVDO_B = 12; 308 309 RAT_EHRPD = 13; 310 311 RAT_LTE = 14; 312 313 RAT_HSPAP = 15; 314 315 RAT_GSM = 16; 316 317 RAT_TD_SCDMA = 17; 318 319 RAT_IWLAN = 18; 320 321 RAT_LTE_CA = 19; 322} 323 324// The information about IMS errors 325// https://cs.corp.google.com/#android/frameworks/base/telephony/java/com/android/ims/ImsReasonInfo.java 326message ImsReasonInfo { 327 328 // Main reason code. 329 optional int32 reason_code = 1; 330 331 // Extra code value; it depends on the code value. 332 optional int32 extra_code = 2; 333 334 // Additional message of the reason info. We get this from the modem. 335 optional string extra_message = 3; 336} 337 338// The information about state connection between IMS service and IMS server 339message ImsConnectionState { 340 341 // Current state 342 optional State state = 1; 343 344 // If DISCONNECTED then this field may have additional information about 345 // connection problem. 346 optional ImsReasonInfo reason_info = 2; 347 348 // Posible states 349 enum State { 350 351 // State is unknown. 352 STATE_UNKNOWN = 0; 353 354 CONNECTED = 1; 355 356 PROGRESSING = 2; 357 358 DISCONNECTED = 3; 359 360 RESUMED = 4; 361 362 SUSPENDED = 5; 363 } 364} 365 366// The information about current capabilities of IMS service 367message ImsCapabilities { 368 369 optional bool voice_over_lte = 1; 370 371 optional bool voice_over_wifi = 2; 372 373 optional bool video_over_lte = 3; 374 375 optional bool video_over_wifi = 4; 376 377 optional bool ut_over_lte = 5; 378 379 optional bool ut_over_wifi = 6; 380} 381 382// Errors returned by RIL 383enum RilErrno { 384 385 // type is unknown. 386 RIL_E_UNKNOWN = 0; 387 388 // Note the following values are all off by 1. 389 RIL_E_SUCCESS = 1; 390 391 // If radio did not start or is resetting 392 RIL_E_RADIO_NOT_AVAILABLE = 2; 393 394 RIL_E_GENERIC_FAILURE = 3; 395 396 // for PIN/PIN2 methods only! 397 RIL_E_PASSWORD_INCORRECT = 4; 398 399 // Operation requires SIM PIN2 to be entered 400 RIL_E_SIM_PIN2 = 5; 401 402 // Operation requires SIM PIN2 to be entered 403 RIL_E_SIM_PUK2 = 6; 404 405 RIL_E_REQUEST_NOT_SUPPORTED = 7; 406 407 RIL_E_CANCELLED = 8; 408 409 // data ops are not allowed during voice call on a Class C GPRS device 410 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 9; 411 412 // data ops are not allowed before device registers in network 413 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 10; 414 415 // fail to send sms and need retry 416 RIL_E_SMS_SEND_FAIL_RETRY = 11; 417 418 // fail to set the location where CDMA subscription shall be retrieved 419 // because of SIM or RUIM card absent 420 RIL_E_SIM_ABSENT = 12; 421 422 // fail to find CDMA subscription from specified location 423 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 13; 424 425 // HW does not support preferred network type 426 RIL_E_MODE_NOT_SUPPORTED = 14; 427 428 // command failed because recipient is not on FDN list 429 RIL_E_FDN_CHECK_FAILURE = 15; 430 431 // network selection failed due to illegal SIM or ME 432 RIL_E_ILLEGAL_SIM_OR_ME = 16; 433 434 // no logical channel available 435 RIL_E_MISSING_RESOURCE = 17; 436 437 // application not found on SIM 438 RIL_E_NO_SUCH_ELEMENT = 18; 439 440 // DIAL request modified to USSD 441 RIL_E_DIAL_MODIFIED_TO_USSD = 19; 442 443 // DIAL request modified to SS 444 RIL_E_DIAL_MODIFIED_TO_SS = 20; 445 446 // DIAL request modified to DIAL with different data 447 RIL_E_DIAL_MODIFIED_TO_DIAL = 21; 448 449 // USSD request modified to DIAL 450 RIL_E_USSD_MODIFIED_TO_DIAL = 22; 451 452 // USSD request modified to SS 453 RIL_E_USSD_MODIFIED_TO_SS = 23; 454 455 // USSD request modified to different USSD request 456 RIL_E_USSD_MODIFIED_TO_USSD = 24; 457 458 // SS request modified to DIAL 459 RIL_E_SS_MODIFIED_TO_DIAL = 25; 460 461 // SS request modified to USSD 462 RIL_E_SS_MODIFIED_TO_USSD = 26; 463 464 // Subscription not supported by RIL 465 RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 27; 466 467 // SS request modified to different SS request 468 RIL_E_SS_MODIFIED_TO_SS = 28; 469 470 // LCE service not supported(36 in RILConstants.java. This is a mistake. 471 // The value should be off by 1 ideally.) 472 RIL_E_LCE_NOT_SUPPORTED = 36 [deprecated=true]; 473 474 // LCE service not supported 475 RIL_E_LCE_NOT_SUPPORTED_NEW = 37; 476} 477 478// PDP_type values in TS 27.007 section 10.1.1. 479enum PdpType { 480 481 // type is unknown. 482 PDP_UNKNOWN = 0; 483 484 PDP_TYPE_IP = 1; 485 486 PDP_TYPE_IPV6 = 2; 487 488 PDP_TYPE_IPV4V6 = 3; 489 490 PDP_TYPE_PPP = 4; 491} 492 493// The information about packet data connection 494message RilDataCall { 495 496 // Context ID, uniquely identifies this call 497 optional int32 cid = 1; 498 499 // One of the PDP_type values in TS 27.007 section 10.1.1 500 optional PdpType type = 2; 501 502 // The network interface name e.g. wlan0, rmnet_data0. 503 optional string iframe = 3; 504} 505 506message TelephonyEvent { 507 508 enum Type { 509 510 // Unknown event 511 UNKNOWN = 0; 512 513 // Telephony related user settings changed 514 SETTINGS_CHANGED = 1; 515 516 // Phone state changed 517 RIL_SERVICE_STATE_CHANGED = 2; 518 519 // IMS connected/disconnected 520 IMS_CONNECTION_STATE_CHANGED = 3; 521 522 // IMS Voice, Video and Ut capabilities changed 523 IMS_CAPABILITIES_CHANGED = 4; 524 525 // Setup a packet data connection 526 DATA_CALL_SETUP = 5; 527 528 // RIL request result 529 DATA_CALL_SETUP_RESPONSE = 6; 530 531 // Notification that new data call has appeared in the list 532 // or old data call has removed. 533 DATA_CALL_LIST_CHANGED = 7; 534 535 // Deactivate packet data connection 536 DATA_CALL_DEACTIVATE = 8; 537 538 // RIL request result 539 DATA_CALL_DEACTIVATE_RESPONSE = 9; 540 541 // Logging a data stall + its action 542 DATA_STALL_ACTION = 10; 543 544 // Modem Restarted. Logging a baseband version and reason for restart 545 // along with the event if it is available 546 MODEM_RESTART = 11; 547 548 // System time overwritten by NITZ (Network time) 549 NITZ_TIME = 12; 550 } 551 552 // Setup a packet data connection 553 message RilSetupDataCall { 554 555 // See ril.h RIL_REQUEST_SETUP_DATA_CALL 556 enum RilDataProfile { 557 558 // type is unknown. 559 RIL_DATA_UNKNOWN = 0; 560 561 RIL_DATA_PROFILE_DEFAULT = 1; 562 563 RIL_DATA_PROFILE_TETHERED = 2; 564 565 RIL_DATA_PROFILE_IMS = 3; 566 567 RIL_DATA_PROFILE_FOTA = 4; 568 569 RIL_DATA_PROFILE_CBS = 5; 570 571 RIL_DATA_PROFILE_OEM_BASE = 6; 572 573 RIL_DATA_PROFILE_INVALID = 7; 574 } 575 576 // Radio technology to use 577 optional RadioAccessTechnology rat = 1 [default = UNKNOWN]; 578 579 // optional RIL_DataProfile 580 optional RilDataProfile data_profile = 2; 581 582 // APN to connect to if radio technology is GSM/UMTS 583 optional string apn = 3; 584 585 // the connection type to request 586 optional PdpType type = 4; 587 } 588 589 // RIL response to RilSetupDataCall 590 message RilSetupDataCallResponse { 591 592 // Copy of enum RIL_DataCallFailCause defined at ril.h 593 enum RilDataCallFailCause { 594 595 // Failure reason is unknown. 596 PDP_FAIL_UNKNOWN = 0; 597 598 // No error, connection ok 599 PDP_FAIL_NONE = 1; 600 601 PDP_FAIL_OPERATOR_BARRED = 8; 602 603 PDP_FAIL_NAS_SIGNALLING = 14; 604 605 PDP_FAIL_LLC_SNDCP = 25; 606 607 PDP_FAIL_INSUFFICIENT_RESOURCES = 26; 608 609 PDP_FAIL_MISSING_UKNOWN_APN = 27; 610 611 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 28; 612 613 PDP_FAIL_USER_AUTHENTICATION = 29; 614 615 PDP_FAIL_ACTIVATION_REJECT_GGSN = 30; 616 617 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 31; 618 619 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 32; 620 621 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 33; 622 623 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 34; 624 625 PDP_FAIL_NSAPI_IN_USE = 35; 626 627 // Possibly restart radio, based on framework config 628 PDP_FAIL_REGULAR_DEACTIVATION = 36; 629 630 PDP_FAIL_QOS_NOT_ACCEPTED = 37; 631 632 PDP_FAIL_NETWORK_FAILURE = 38; 633 634 PDP_FAIL_UMTS_REACTIVATION_REQ = 39; 635 636 PDP_FAIL_FEATURE_NOT_SUPP = 40; 637 638 PDP_FAIL_TFT_SEMANTIC_ERROR = 41; 639 640 PDP_FAIL_TFT_SYTAX_ERROR = 42; 641 642 PDP_FAIL_UNKNOWN_PDP_CONTEXT = 43; 643 644 PDP_FAIL_FILTER_SEMANTIC_ERROR = 44; 645 646 PDP_FAIL_FILTER_SYTAX_ERROR = 45; 647 648 PDP_FAIL_PDP_WITHOUT_ACTIVE_TFT = 46; 649 650 PDP_FAIL_ONLY_IPV4_ALLOWED = 50; 651 652 PDP_FAIL_ONLY_IPV6_ALLOWED = 51; 653 654 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 52; 655 656 PDP_FAIL_ESM_INFO_NOT_RECEIVED = 53; 657 658 PDP_FAIL_PDN_CONN_DOES_NOT_EXIST = 54; 659 660 PDP_FAIL_MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 55; 661 662 PDP_FAIL_MAX_ACTIVE_PDP_CONTEXT_REACHED = 65; 663 664 PDP_FAIL_UNSUPPORTED_APN_IN_CURRENT_PLMN = 66; 665 666 PDP_FAIL_INVALID_TRANSACTION_ID = 81; 667 668 PDP_FAIL_MESSAGE_INCORRECT_SEMANTIC = 95; 669 670 PDP_FAIL_INVALID_MANDATORY_INFO = 96; 671 672 PDP_FAIL_MESSAGE_TYPE_UNSUPPORTED = 97; 673 674 PDP_FAIL_MSG_TYPE_NONCOMPATIBLE_STATE = 98; 675 676 PDP_FAIL_UNKNOWN_INFO_ELEMENT = 99; 677 678 PDP_FAIL_CONDITIONAL_IE_ERROR = 100; 679 680 PDP_FAIL_MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 101; 681 682 PDP_FAIL_PROTOCOL_ERRORS = 111; 683 684 PDP_FAIL_APN_TYPE_CONFLICT = 112; 685 686 PDP_FAIL_INVALID_PCSCF_ADDR = 113; 687 688 PDP_FAIL_INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 114; 689 690 PDP_FAIL_EMM_ACCESS_BARRED = 115; 691 692 PDP_FAIL_EMERGENCY_IFACE_ONLY = 116; 693 694 PDP_FAIL_IFACE_MISMATCH = 117; 695 696 PDP_FAIL_COMPANION_IFACE_IN_USE = 118; 697 698 PDP_FAIL_IP_ADDRESS_MISMATCH = 119; 699 700 PDP_FAIL_IFACE_AND_POL_FAMILY_MISMATCH = 120; 701 702 PDP_FAIL_EMM_ACCESS_BARRED_INFINITE_RETRY = 121; 703 704 PDP_FAIL_AUTH_FAILURE_ON_EMERGENCY_CALL = 122; 705 706 // Not mentioned in the specification 707 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1; 708 709 PDP_FAIL_DATA_REGISTRATION_FAIL = -2; 710 711 // Reasons for data call drop - network/modem disconnect 712 PDP_FAIL_SIGNAL_LOST = -3; 713 714 // Preferred technology has changed, should retry with parameters 715 // appropriate for new technology 716 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4; 717 718 // Data call was disconnected because radio was resetting, 719 // powered off - no retry 720 PDP_FAIL_RADIO_POWER_OFF = -5; 721 722 // Data call was disconnected by modem because tethered mode was up 723 // on same APN/data profile - no retry until tethered call is off 724 PDP_FAIL_TETHERED_CALL_ACTIVE = -6; 725 726 // retry silently 727 PDP_FAIL_ERROR_UNSPECIFIED = 65535; 728 } 729 730 // A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error 731 optional RilDataCallFailCause status = 1; 732 733 // If status != 0, this fields indicates the suggested retry back-off timer 734 // value RIL wants to override the one pre-configured in FW 735 optional int32 suggested_retry_time_millis = 2; 736 737 optional RilDataCall call = 3; 738 } 739 740 // Deactivate packet data connection 741 message RilDeactivateDataCall { 742 743 // Context ID 744 optional int32 cid = 1; 745 746 // Reason for deactivating data call 747 optional DeactivateReason reason = 2; 748 749 // Deactivate data call reasons 750 enum DeactivateReason { 751 752 // Reason is unknown. 753 DEACTIVATE_REASON_UNKNOWN = 0; 754 755 DEACTIVATE_REASON_NONE = 1; 756 757 DEACTIVATE_REASON_RADIO_OFF = 2; 758 759 DEACTIVATE_REASON_PDP_RESET = 3; 760 } 761 } 762 763 message ModemRestart { 764 // The baseband_version is used to identify the particular software version 765 // where the modem restarts happened 766 optional string baseband_version = 1; 767 768 // Indicates the modem restart reason. The restart reason can be used to 769 // categorize any modem crashes and group similar crashes together. This 770 // information will be useful to identify the cause of modem crashes, 771 // reproduce the issue and confirm that the fix works. 772 optional string reason = 2; 773 } 774 775 // Time when event happened on device, in milliseconds since epoch 776 optional int64 timestamp_millis = 1; 777 778 // In Multi-SIM devices this indicates SIM slot 779 optional int32 phone_id = 2; 780 781 // Event type 782 optional Type type = 3; 783 784 // User settings 785 optional TelephonySettings settings = 4; 786 787 // RIL Service State 788 optional TelephonyServiceState service_state = 5; 789 790 // IMS state 791 optional ImsConnectionState ims_connection_state = 6; 792 793 // IMS capabilities 794 optional ImsCapabilities ims_capabilities = 7; 795 796 // List of data calls when changed 797 repeated RilDataCall data_calls = 8; 798 799 // RIL error code 800 optional RilErrno error = 9; 801 802 // Setup data call request 803 optional RilSetupDataCall setup_data_call = 10; 804 805 // Setup data call response 806 optional RilSetupDataCallResponse setup_data_call_response = 11; 807 808 // Deactivate data call request 809 optional RilDeactivateDataCall deactivate_data_call = 12; 810 811 // Data call stall recovery action 812 optional int32 data_stall_action = 13; 813 814 // Modem restart event 815 optional ModemRestart modem_restart = 14; 816 817 // NITZ time in milliseconds 818 optional int64 nitz_timestamp_millis = 15; 819} 820 821enum TimeInterval { 822 TI_UNKNOWN = 0; 823 TI_10_MILLIS = 1; 824 TI_20_MILLIS = 2; 825 TI_50_MILLIS = 3; 826 TI_100_MILLIS = 4; 827 TI_200_MILLIS = 5; 828 TI_500_MILLIS = 6; 829 TI_1_SEC = 7; 830 TI_2_SEC = 8; 831 TI_5_SEC = 9; 832 TI_10_SEC = 10; 833 TI_30_SEC = 11; 834 TI_1_MINUTE = 12; 835 TI_3_MINUTES = 13; 836 TI_10_MINUTES = 14; 837 TI_30_MINUTES = 15; 838 TI_1_HOUR = 16; 839 TI_2_HOURS = 17; 840 TI_4_HOURS = 18; 841 TI_MANY_HOURS = 19; 842} 843 844// Information about CS and/or PS call session. 845// Session starts when call is placed or accepted and 846// ends when there are no more active calls. 847message TelephonyCallSession { 848 849 message Event { 850 851 enum Type { 852 853 // Unknown event 854 EVENT_UNKNOWN = 0; 855 856 // Telephony related user settings changed 857 SETTINGS_CHANGED = 1; 858 859 // Phone state changed 860 RIL_SERVICE_STATE_CHANGED = 2; 861 862 // IMS connected/disconnected 863 IMS_CONNECTION_STATE_CHANGED = 3; 864 865 // IMS Voice, Video and Ut capabilities changed 866 IMS_CAPABILITIES_CHANGED = 4; 867 868 // Notification that new data call has appeared in the list 869 // or old data call has removed. 870 DATA_CALL_LIST_CHANGED = 5; 871 872 // Send request to RIL 873 RIL_REQUEST = 6; 874 875 // Result of the RIL request 876 RIL_RESPONSE = 7; 877 878 // Ring indication for an incoming call 879 RIL_CALL_RING = 8; 880 881 // Notification that Single Radio Voice Call Continuity(SRVCC) 882 // progress state has changed. 883 RIL_CALL_SRVCC = 9; 884 885 // Notification that list of calls has changed. 886 RIL_CALL_LIST_CHANGED = 10; 887 888 // Command sent to IMS Service. See ImsCommand. 889 IMS_COMMAND = 11; 890 891 // Command sent to IMS Service. See ImsCommand. 892 IMS_COMMAND_RECEIVED = 12; 893 894 // Command sent to IMS Service. See ImsCommand. 895 IMS_COMMAND_FAILED = 13; 896 897 // Command sent to IMS Service. See ImsCommand. 898 IMS_COMMAND_COMPLETE = 14; 899 900 // Notification about incoming voice call 901 IMS_CALL_RECEIVE = 15; 902 903 // Notification that state of the call has changed 904 IMS_CALL_STATE_CHANGED = 16; 905 906 // Notification about IMS call termination 907 IMS_CALL_TERMINATED = 17; 908 909 // Notification that session access technology has changed 910 IMS_CALL_HANDOVER = 18; 911 912 // Notification that session access technology has changed 913 IMS_CALL_HANDOVER_FAILED = 19; 914 915 // Notification about phone state changed. 916 PHONE_STATE_CHANGED = 20; 917 918 // System time overwritten by NITZ (Network time) 919 NITZ_TIME = 21; 920 } 921 922 enum RilRequest { 923 924 RIL_REQUEST_UNKNOWN = 0; 925 926 // Initiate voice call 927 RIL_REQUEST_DIAL = 1; 928 929 // Answer incoming call 930 RIL_REQUEST_ANSWER = 2; 931 932 // Hang up a specific line 933 RIL_REQUEST_HANGUP = 3; 934 935 // Configure current call waiting state 936 RIL_REQUEST_SET_CALL_WAITING = 4; 937 938 RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE = 5; 939 940 // Send FLASH 941 RIL_REQUEST_CDMA_FLASH = 6; 942 943 // Conference holding and active 944 RIL_REQUEST_CONFERENCE = 7; 945 } 946 947 enum ImsCommand { 948 949 // Command is unknown. 950 IMS_CMD_UNKNOWN = 0; 951 952 IMS_CMD_START = 1; 953 954 IMS_CMD_ACCEPT = 2; 955 956 IMS_CMD_REJECT = 3; 957 958 IMS_CMD_TERMINATE = 4; 959 960 IMS_CMD_HOLD = 5; 961 962 IMS_CMD_RESUME = 6; 963 964 IMS_CMD_MERGE = 7; 965 966 IMS_CMD_UPDATE = 8; 967 968 IMS_CMD_CONFERENCE_EXTEND = 9; 969 970 IMS_CMD_INVITE_PARTICIPANT = 10; 971 972 IMS_CMD_REMOVE_PARTICIPANT = 11; 973 } 974 975 enum PhoneState { 976 977 // State is unknown. 978 STATE_UNKNOWN = 0; 979 980 STATE_IDLE = 1; 981 982 STATE_RINGING = 2; 983 984 STATE_OFFHOOK = 3; 985 } 986 987 // Telephony call states 988 enum CallState { 989 990 // State is unknown. 991 CALL_UNKNOWN = 0; 992 993 CALL_IDLE = 1; 994 995 CALL_ACTIVE = 2; 996 997 CALL_HOLDING = 3; 998 999 CALL_DIALING = 4; 1000 1001 CALL_ALERTING = 5; 1002 1003 CALL_INCOMING = 6; 1004 1005 CALL_WAITING = 7; 1006 1007 CALL_DISCONNECTED = 8; 1008 1009 CALL_DISCONNECTING = 9; 1010 } 1011 1012 // The information about a voice call 1013 message RilCall { 1014 1015 enum Type { 1016 1017 // Scan Type is unknown. 1018 UNKNOWN = 0; 1019 1020 // Mobile originated 1021 MO = 1; 1022 1023 // Mobile terminated 1024 MT = 2; 1025 } 1026 1027 // Connection Index 1028 optional int32 index = 1; 1029 1030 optional CallState state = 2; 1031 1032 optional Type type = 3; 1033 1034 // For possible values for a call end reason check 1035 // frameworks/base/telephony/java/android/telephony/DisconnectCause.java 1036 optional int32 call_end_reason = 4; 1037 1038 // This field is true for Conference Calls 1039 optional bool is_multiparty = 5; 1040 } 1041 1042 // Single Radio Voice Call Continuity(SRVCC) progress state 1043 enum RilSrvccState { 1044 1045 // State is unknown. 1046 HANDOVER_UNKNOWN = 0; 1047 1048 HANDOVER_STARTED = 1; 1049 1050 HANDOVER_COMPLETED = 2; 1051 1052 HANDOVER_FAILED = 3; 1053 1054 HANDOVER_CANCELED = 4; 1055 } 1056 1057 // Event type 1058 optional Type type = 1; 1059 1060 // Time since previous event 1061 optional TimeInterval delay = 2; 1062 1063 // Settings at the begining of the session or when changed 1064 optional TelephonySettings settings = 3; 1065 1066 // State at the beginning of the session or when changed 1067 optional TelephonyServiceState service_state = 4; 1068 1069 // State at the beginning of the session or when changed 1070 optional ImsConnectionState ims_connection_state = 5; 1071 1072 // Capabilities at the beginning of the session or when changed 1073 optional ImsCapabilities ims_capabilities = 6; 1074 1075 // List of data calls at the beginning of the session or when changed 1076 repeated RilDataCall data_calls = 7; 1077 1078 // New state 1079 optional PhoneState phone_state = 8; 1080 1081 // New state 1082 optional CallState call_state = 9; 1083 1084 // CS or IMS Voice call index 1085 optional int32 call_index = 10; 1086 1087 // New merged call 1088 optional int32 merged_call_index = 11; 1089 1090 // Active CS Voice calls 1091 repeated RilCall calls = 12; 1092 1093 // RIL error code 1094 optional RilErrno error = 13; 1095 1096 // RIL request 1097 optional RilRequest ril_request = 14; 1098 1099 // Numeric ID 1100 optional int32 ril_request_id = 15; 1101 1102 // New SRVCC state 1103 optional RilSrvccState srvcc_state = 16; 1104 1105 // IMS command 1106 optional ImsCommand ims_command = 17; 1107 1108 // IMS Failure reason 1109 optional ImsReasonInfo reason_info = 18; 1110 1111 // Original access technology 1112 optional RadioAccessTechnology src_access_tech = 19 [default = UNKNOWN]; 1113 1114 // New access technology 1115 optional RadioAccessTechnology target_access_tech = 20 [default = UNKNOWN]; 1116 1117 // NITZ time in milliseconds 1118 optional int64 nitz_timestamp_millis = 21; 1119 } 1120 1121 // Time when call has started, in minutes since epoch, 1122 // with 5 minutes precision 1123 optional int32 start_time_minutes = 1; 1124 1125 // In Multi-SIM devices this indicates SIM slot 1126 optional int32 phone_id = 2; 1127 1128 // List of events happened during the call 1129 repeated Event events = 3; 1130 1131 // Indicating some call events are dropped 1132 optional bool events_dropped = 4; 1133} 1134 1135message SmsSession { 1136 1137 message Event { 1138 1139 enum Type { 1140 1141 // Unknown event 1142 EVENT_UNKNOWN = 0; 1143 1144 // Telephony related user settings changed 1145 SETTINGS_CHANGED = 1; 1146 1147 // Phone state changed 1148 RIL_SERVICE_STATE_CHANGED = 2; 1149 1150 // IMS connected/disconnected 1151 IMS_CONNECTION_STATE_CHANGED = 3; 1152 1153 // IMS Voice, Video and Ut capabilities changed 1154 IMS_CAPABILITIES_CHANGED = 4; 1155 1156 // Notification that new data call has appeared in the list 1157 // or old data call has removed. 1158 DATA_CALL_LIST_CHANGED = 5; 1159 1160 // Send a SMS message 1161 SMS_SEND = 6; 1162 1163 // Message has been sent to network 1164 SMS_SEND_RESULT = 7; 1165 1166 // Notification about received SMS 1167 SMS_RECEIVED = 8; 1168 } 1169 1170 // Formats used to encode SMS messages 1171 enum Format { 1172 1173 // State is unknown. 1174 SMS_FORMAT_UNKNOWN = 0; 1175 1176 // GSM, WCDMA 1177 SMS_FORMAT_3GPP = 1; 1178 1179 // CDMA 1180 SMS_FORMAT_3GPP2 = 2; 1181 } 1182 1183 enum Tech { 1184 SMS_UNKNOWN = 0; 1185 1186 SMS_GSM = 1; 1187 1188 SMS_CDMA = 2; 1189 1190 SMS_IMS = 3; 1191 } 1192 1193 // Event type 1194 optional Type type = 1; 1195 1196 // Time since previous event 1197 optional TimeInterval delay = 2; 1198 1199 // Settings at the begining of the session or when changed 1200 optional TelephonySettings settings = 3; 1201 1202 // State at the beginning of the session or when changed 1203 optional TelephonyServiceState service_state = 4; 1204 1205 // State at the beginning of the session or when changed 1206 optional ImsConnectionState ims_connection_state = 5; 1207 1208 // Capabilities at the beginning of the session or when changed 1209 optional ImsCapabilities ims_capabilities = 6; 1210 1211 // List of data calls at the beginning of the session or when changed 1212 repeated RilDataCall data_calls = 7; 1213 1214 // Format of the message 1215 optional Format format = 8; 1216 1217 // Technology used to send/receive SMS 1218 optional Tech tech = 9; 1219 1220 // See 3GPP 27.005, 3.2.5 for GSM/UMTS, 1221 // 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA, 1222 // -1 if unknown or not applicable 1223 optional int32 error_code = 10; 1224 1225 // RIL error code 1226 optional RilErrno error = 11; 1227 1228 // Numeric ID 1229 optional int32 ril_request_id = 12; 1230 } 1231 1232 // Time when session has started, in minutes since epoch, 1233 // with 5 minutes precision 1234 optional int32 start_time_minutes = 1; 1235 1236 // In Multi-SIM devices this indicates SIM slot 1237 optional int32 phone_id = 2; 1238 1239 // List of events happened during the call 1240 repeated Event events = 3; 1241 1242 // Indicating some sms session events are dropped 1243 optional bool events_dropped = 4; 1244} 1245