1 /* 2 * Copyright (C) 2006 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 package com.android.internal.telephony; 18 19 import android.annotation.NonNull; 20 import android.compat.annotation.UnsupportedAppUsage; 21 import android.net.KeepalivePacketData; 22 import android.net.LinkProperties; 23 import android.os.Handler; 24 import android.os.Message; 25 import android.os.WorkSource; 26 import android.telephony.AccessNetworkConstants.AccessNetworkType; 27 import android.telephony.CarrierRestrictionRules; 28 import android.telephony.ClientRequestStats; 29 import android.telephony.ImsiEncryptionInfo; 30 import android.telephony.NetworkScanRequest; 31 import android.telephony.RadioAccessSpecifier; 32 import android.telephony.SignalThresholdInfo; 33 import android.telephony.data.DataProfile; 34 import android.telephony.emergency.EmergencyNumber; 35 36 import com.android.internal.telephony.cdma.CdmaSmsBroadcastConfigInfo; 37 import com.android.internal.telephony.gsm.SmsBroadcastConfigInfo; 38 import com.android.internal.telephony.uicc.IccCardStatus; 39 import com.android.internal.telephony.uicc.IccCardApplicationStatus.PersoSubState; 40 41 import java.util.List; 42 43 /** 44 * {@hide} 45 */ 46 public interface CommandsInterface { 47 48 //***** Constants 49 50 // Used as parameter to dial() and setCLIR() below 51 static final int CLIR_DEFAULT = 0; // "use subscription default value" 52 static final int CLIR_INVOCATION = 1; // (restrict CLI presentation) 53 static final int CLIR_SUPPRESSION = 2; // (allow CLI presentation) 54 55 // Used as return value for CDMA SS query 56 static final int SS_STATUS_UNKNOWN = 0xff; 57 58 // Used as parameters for call forward methods below 59 static final int CF_ACTION_DISABLE = 0; 60 static final int CF_ACTION_ENABLE = 1; 61 // static final int CF_ACTION_UNUSED = 2; 62 static final int CF_ACTION_REGISTRATION = 3; 63 static final int CF_ACTION_ERASURE = 4; 64 65 static final int CF_REASON_UNCONDITIONAL = 0; 66 static final int CF_REASON_BUSY = 1; 67 static final int CF_REASON_NO_REPLY = 2; 68 static final int CF_REASON_NOT_REACHABLE = 3; 69 static final int CF_REASON_ALL = 4; 70 static final int CF_REASON_ALL_CONDITIONAL = 5; 71 72 // Used for call barring methods below 73 static final String CB_FACILITY_BAOC = "AO"; 74 static final String CB_FACILITY_BAOIC = "OI"; 75 static final String CB_FACILITY_BAOICxH = "OX"; 76 static final String CB_FACILITY_BAIC = "AI"; 77 static final String CB_FACILITY_BAICr = "IR"; 78 static final String CB_FACILITY_BA_ALL = "AB"; 79 static final String CB_FACILITY_BA_MO = "AG"; 80 static final String CB_FACILITY_BA_MT = "AC"; 81 static final String CB_FACILITY_BA_SIM = "SC"; 82 static final String CB_FACILITY_BA_FD = "FD"; 83 static final String CB_FACILITY_BIC_ACR = "AR"; 84 85 86 // Used for various supp services apis 87 // See 27.007 +CCFC or +CLCK 88 static final int SERVICE_CLASS_NONE = 0; // no user input 89 static final int SERVICE_CLASS_VOICE = (1 << 0); 90 static final int SERVICE_CLASS_DATA = (1 << 1); //synonym for 16+32+64+128 91 static final int SERVICE_CLASS_FAX = (1 << 2); 92 static final int SERVICE_CLASS_SMS = (1 << 3); 93 static final int SERVICE_CLASS_DATA_SYNC = (1 << 4); 94 static final int SERVICE_CLASS_DATA_ASYNC = (1 << 5); 95 static final int SERVICE_CLASS_PACKET = (1 << 6); 96 static final int SERVICE_CLASS_PAD = (1 << 7); 97 static final int SERVICE_CLASS_MAX = (1 << 7); // Max SERVICE_CLASS value 98 99 // Numeric representation of string values returned 100 // by messages sent to setOnUSSD handler 101 static final int USSD_MODE_NOTIFY = 0; 102 static final int USSD_MODE_REQUEST = 1; 103 static final int USSD_MODE_NW_RELEASE = 2; 104 static final int USSD_MODE_LOCAL_CLIENT = 3; 105 static final int USSD_MODE_NOT_SUPPORTED = 4; 106 static final int USSD_MODE_NW_TIMEOUT = 5; 107 108 // GSM SMS fail cause for acknowledgeLastIncomingSMS. From TS 23.040, 9.2.3.22. 109 static final int GSM_SMS_FAIL_CAUSE_MEMORY_CAPACITY_EXCEEDED = 0xD3; 110 static final int GSM_SMS_FAIL_CAUSE_USIM_APP_TOOLKIT_BUSY = 0xD4; 111 static final int GSM_SMS_FAIL_CAUSE_USIM_DATA_DOWNLOAD_ERROR = 0xD5; 112 static final int GSM_SMS_FAIL_CAUSE_UNSPECIFIED_ERROR = 0xFF; 113 114 // CDMA SMS fail cause for acknowledgeLastIncomingCdmaSms. From TS N.S0005, 6.5.2.125. 115 static final int CDMA_SMS_FAIL_CAUSE_INVALID_TELESERVICE_ID = 4; 116 static final int CDMA_SMS_FAIL_CAUSE_RESOURCE_SHORTAGE = 35; 117 static final int CDMA_SMS_FAIL_CAUSE_OTHER_TERMINAL_PROBLEM = 39; 118 static final int CDMA_SMS_FAIL_CAUSE_ENCODING_PROBLEM = 96; 119 120 //***** Methods 121 122 /** 123 * get latest radio power state from modem 124 * @return 125 */ getRadioState()126 int getRadioState(); 127 128 /** 129 * response.obj.result is an int[2] 130 * 131 * response.obj.result[0] is IMS registration state 132 * 0 - Not registered 133 * 1 - Registered 134 * response.obj.result[1] is of type RILConstants.GSM_PHONE or 135 * RILConstants.CDMA_PHONE 136 */ getImsRegistrationState(Message result)137 void getImsRegistrationState(Message result); 138 139 /** 140 * Fires on any RadioState transition 141 * Always fires immediately as well 142 * 143 * do not attempt to calculate transitions by storing getRadioState() values 144 * on previous invocations of this notification. Instead, use the other 145 * registration methods 146 */ 147 @UnsupportedAppUsage registerForRadioStateChanged(Handler h, int what, Object obj)148 void registerForRadioStateChanged(Handler h, int what, Object obj); unregisterForRadioStateChanged(Handler h)149 void unregisterForRadioStateChanged(Handler h); 150 registerForVoiceRadioTechChanged(Handler h, int what, Object obj)151 void registerForVoiceRadioTechChanged(Handler h, int what, Object obj); 152 @UnsupportedAppUsage unregisterForVoiceRadioTechChanged(Handler h)153 void unregisterForVoiceRadioTechChanged(Handler h); 154 @UnsupportedAppUsage registerForImsNetworkStateChanged(Handler h, int what, Object obj)155 void registerForImsNetworkStateChanged(Handler h, int what, Object obj); unregisterForImsNetworkStateChanged(Handler h)156 void unregisterForImsNetworkStateChanged(Handler h); 157 158 /** 159 * Fires on any transition into RadioState.isOn() 160 * Fires immediately if currently in that state 161 * In general, actions should be idempotent. State may change 162 * before event is received. 163 */ 164 @UnsupportedAppUsage registerForOn(Handler h, int what, Object obj)165 void registerForOn(Handler h, int what, Object obj); 166 @UnsupportedAppUsage unregisterForOn(Handler h)167 void unregisterForOn(Handler h); 168 169 /** 170 * Fires on any transition out of RadioState.isAvailable() 171 * Fires immediately if currently in that state 172 * In general, actions should be idempotent. State may change 173 * before event is received. 174 */ 175 @UnsupportedAppUsage registerForAvailable(Handler h, int what, Object obj)176 void registerForAvailable(Handler h, int what, Object obj); 177 @UnsupportedAppUsage unregisterForAvailable(Handler h)178 void unregisterForAvailable(Handler h); 179 180 /** 181 * Fires on any transition into !RadioState.isAvailable() 182 * Fires immediately if currently in that state 183 * In general, actions should be idempotent. State may change 184 * before event is received. 185 */ 186 @UnsupportedAppUsage registerForNotAvailable(Handler h, int what, Object obj)187 void registerForNotAvailable(Handler h, int what, Object obj); unregisterForNotAvailable(Handler h)188 void unregisterForNotAvailable(Handler h); 189 190 /** 191 * Fires on any transition into RADIO_OFF or !RadioState.isAvailable() 192 * Fires immediately if currently in that state 193 * In general, actions should be idempotent. State may change 194 * before event is received. 195 */ 196 @UnsupportedAppUsage registerForOffOrNotAvailable(Handler h, int what, Object obj)197 void registerForOffOrNotAvailable(Handler h, int what, Object obj); 198 @UnsupportedAppUsage unregisterForOffOrNotAvailable(Handler h)199 void unregisterForOffOrNotAvailable(Handler h); 200 201 /** 202 * Fires on any change in ICC status 203 */ registerForIccStatusChanged(Handler h, int what, Object obj)204 void registerForIccStatusChanged(Handler h, int what, Object obj); unregisterForIccStatusChanged(Handler h)205 void unregisterForIccStatusChanged(Handler h); 206 /** Register for ICC slot status changed event */ registerForIccSlotStatusChanged(Handler h, int what, Object obj)207 void registerForIccSlotStatusChanged(Handler h, int what, Object obj); 208 /** Unregister for ICC slot status changed event */ unregisterForIccSlotStatusChanged(Handler h)209 void unregisterForIccSlotStatusChanged(Handler h); 210 registerForCallStateChanged(Handler h, int what, Object obj)211 void registerForCallStateChanged(Handler h, int what, Object obj); unregisterForCallStateChanged(Handler h)212 void unregisterForCallStateChanged(Handler h); 213 /** Register for network state changed event */ registerForNetworkStateChanged(Handler h, int what, Object obj)214 void registerForNetworkStateChanged(Handler h, int what, Object obj); 215 /** Unregister from network state changed event */ unregisterForNetworkStateChanged(Handler h)216 void unregisterForNetworkStateChanged(Handler h); 217 /** Register for data call list changed event */ registerForDataCallListChanged(Handler h, int what, Object obj)218 void registerForDataCallListChanged(Handler h, int what, Object obj); 219 /** Unregister from data call list changed event */ unregisterForDataCallListChanged(Handler h)220 void unregisterForDataCallListChanged(Handler h); 221 222 /** InCall voice privacy notifications */ registerForInCallVoicePrivacyOn(Handler h, int what, Object obj)223 void registerForInCallVoicePrivacyOn(Handler h, int what, Object obj); unregisterForInCallVoicePrivacyOn(Handler h)224 void unregisterForInCallVoicePrivacyOn(Handler h); registerForInCallVoicePrivacyOff(Handler h, int what, Object obj)225 void registerForInCallVoicePrivacyOff(Handler h, int what, Object obj); unregisterForInCallVoicePrivacyOff(Handler h)226 void unregisterForInCallVoicePrivacyOff(Handler h); 227 228 /** Single Radio Voice Call State progress notifications */ registerForSrvccStateChanged(Handler h, int what, Object obj)229 void registerForSrvccStateChanged(Handler h, int what, Object obj); unregisterForSrvccStateChanged(Handler h)230 void unregisterForSrvccStateChanged(Handler h); 231 232 /** 233 * Handlers for subscription status change indications. 234 * 235 * @param h Handler for subscription status change messages. 236 * @param what User-defined message code. 237 * @param obj User object. 238 */ registerForSubscriptionStatusChanged(Handler h, int what, Object obj)239 void registerForSubscriptionStatusChanged(Handler h, int what, Object obj); unregisterForSubscriptionStatusChanged(Handler h)240 void unregisterForSubscriptionStatusChanged(Handler h); 241 242 /** 243 * fires on any change in hardware configuration. 244 */ registerForHardwareConfigChanged(Handler h, int what, Object obj)245 void registerForHardwareConfigChanged(Handler h, int what, Object obj); unregisterForHardwareConfigChanged(Handler h)246 void unregisterForHardwareConfigChanged(Handler h); 247 248 /** 249 * unlike the register* methods, there's only one new 3GPP format SMS handler. 250 * if you need to unregister, you should also tell the radio to stop 251 * sending SMS's to you (via AT+CNMI) 252 * 253 * AsyncResult.result is a String containing the SMS PDU 254 */ setOnNewGsmSms(Handler h, int what, Object obj)255 void setOnNewGsmSms(Handler h, int what, Object obj); unSetOnNewGsmSms(Handler h)256 void unSetOnNewGsmSms(Handler h); 257 258 /** 259 * unlike the register* methods, there's only one new 3GPP2 format SMS handler. 260 * if you need to unregister, you should also tell the radio to stop 261 * sending SMS's to you (via AT+CNMI) 262 * 263 * AsyncResult.result is a String containing the SMS PDU 264 */ setOnNewCdmaSms(Handler h, int what, Object obj)265 void setOnNewCdmaSms(Handler h, int what, Object obj); unSetOnNewCdmaSms(Handler h)266 void unSetOnNewCdmaSms(Handler h); 267 268 /** 269 * Set the handler for SMS Cell Broadcast messages. 270 * 271 * AsyncResult.result is a byte array containing the SMS-CB PDU 272 */ 273 @UnsupportedAppUsage setOnNewGsmBroadcastSms(Handler h, int what, Object obj)274 void setOnNewGsmBroadcastSms(Handler h, int what, Object obj); unSetOnNewGsmBroadcastSms(Handler h)275 void unSetOnNewGsmBroadcastSms(Handler h); 276 277 /** 278 * Register for NEW_SMS_ON_SIM unsolicited message 279 * 280 * AsyncResult.result is an int array containing the index of new SMS 281 */ 282 @UnsupportedAppUsage setOnSmsOnSim(Handler h, int what, Object obj)283 void setOnSmsOnSim(Handler h, int what, Object obj); unSetOnSmsOnSim(Handler h)284 void unSetOnSmsOnSim(Handler h); 285 286 /** 287 * Register for NEW_SMS_STATUS_REPORT unsolicited message 288 * 289 * AsyncResult.result is a String containing the status report PDU 290 */ 291 @UnsupportedAppUsage setOnSmsStatus(Handler h, int what, Object obj)292 void setOnSmsStatus(Handler h, int what, Object obj); unSetOnSmsStatus(Handler h)293 void unSetOnSmsStatus(Handler h); 294 295 /** 296 * unlike the register* methods, there's only one NITZ time handler 297 * 298 * AsyncResult.result is an Object[] 299 * ((Object[])AsyncResult.result)[0] is a String containing the NITZ time string 300 * ((Object[])AsyncResult.result)[1] is a Long containing the milliseconds since boot as 301 * returned by elapsedRealtime() when this NITZ time 302 * was posted. 303 * 304 * Please note that the delivery of this message may be delayed several 305 * seconds on system startup 306 */ 307 @UnsupportedAppUsage setOnNITZTime(Handler h, int what, Object obj)308 void setOnNITZTime(Handler h, int what, Object obj); unSetOnNITZTime(Handler h)309 void unSetOnNITZTime(Handler h); 310 311 /** 312 * unlike the register* methods, there's only one USSD notify handler 313 * 314 * Represents the arrival of a USSD "notify" message, which may 315 * or may not have been triggered by a previous USSD send 316 * 317 * AsyncResult.result is a String[] 318 * ((String[])(AsyncResult.result))[0] contains status code 319 * "0" USSD-Notify -- text in ((const char **)data)[1] 320 * "1" USSD-Request -- text in ((const char **)data)[1] 321 * "2" Session terminated by network 322 * "3" other local client (eg, SIM Toolkit) has responded 323 * "4" Operation not supported 324 * "5" Network timeout 325 * 326 * ((String[])(AsyncResult.result))[1] contains the USSD message 327 * The numeric representations of these are in USSD_MODE_* 328 */ 329 setOnUSSD(Handler h, int what, Object obj)330 void setOnUSSD(Handler h, int what, Object obj); unSetOnUSSD(Handler h)331 void unSetOnUSSD(Handler h); 332 333 /** 334 * unlike the register* methods, there's only one signal strength handler 335 * AsyncResult.result is an int[2] 336 * response.obj.result[0] is received signal strength (0-31, 99) 337 * response.obj.result[1] is bit error rate (0-7, 99) 338 * as defined in TS 27.007 8.5 339 */ 340 341 @UnsupportedAppUsage setOnSignalStrengthUpdate(Handler h, int what, Object obj)342 void setOnSignalStrengthUpdate(Handler h, int what, Object obj); unSetOnSignalStrengthUpdate(Handler h)343 void unSetOnSignalStrengthUpdate(Handler h); 344 345 /** 346 * Sets the handler for SIM/RUIM SMS storage full unsolicited message. 347 * Unlike the register* methods, there's only one notification handler 348 * 349 * @param h Handler for notification message. 350 * @param what User-defined message code. 351 * @param obj User object. 352 */ 353 @UnsupportedAppUsage setOnIccSmsFull(Handler h, int what, Object obj)354 void setOnIccSmsFull(Handler h, int what, Object obj); unSetOnIccSmsFull(Handler h)355 void unSetOnIccSmsFull(Handler h); 356 357 /** 358 * Sets the handler for SIM Refresh notifications. 359 * 360 * @param h Handler for notification message. 361 * @param what User-defined message code. 362 * @param obj User object. 363 */ 364 @UnsupportedAppUsage registerForIccRefresh(Handler h, int what, Object obj)365 void registerForIccRefresh(Handler h, int what, Object obj); unregisterForIccRefresh(Handler h)366 void unregisterForIccRefresh(Handler h); 367 368 @UnsupportedAppUsage setOnIccRefresh(Handler h, int what, Object obj)369 void setOnIccRefresh(Handler h, int what, Object obj); unsetOnIccRefresh(Handler h)370 void unsetOnIccRefresh(Handler h); 371 372 /** 373 * Sets the handler for RING notifications. 374 * Unlike the register* methods, there's only one notification handler 375 * 376 * @param h Handler for notification message. 377 * @param what User-defined message code. 378 * @param obj User object. 379 */ 380 @UnsupportedAppUsage setOnCallRing(Handler h, int what, Object obj)381 void setOnCallRing(Handler h, int what, Object obj); unSetOnCallRing(Handler h)382 void unSetOnCallRing(Handler h); 383 384 /** 385 * Sets the handler for RESTRICTED_STATE changed notification, 386 * eg, for Domain Specific Access Control 387 * unlike the register* methods, there's only one signal strength handler 388 * 389 * AsyncResult.result is an int[1] 390 * response.obj.result[0] is a bitmask of RIL_RESTRICTED_STATE_* values 391 */ 392 setOnRestrictedStateChanged(Handler h, int what, Object obj)393 void setOnRestrictedStateChanged(Handler h, int what, Object obj); unSetOnRestrictedStateChanged(Handler h)394 void unSetOnRestrictedStateChanged(Handler h); 395 396 /** 397 * Sets the handler for Supplementary Service Notifications. 398 * Unlike the register* methods, there's only one notification handler 399 * 400 * @param h Handler for notification message. 401 * @param what User-defined message code. 402 * @param obj User object. 403 */ 404 @UnsupportedAppUsage setOnSuppServiceNotification(Handler h, int what, Object obj)405 void setOnSuppServiceNotification(Handler h, int what, Object obj); unSetOnSuppServiceNotification(Handler h)406 void unSetOnSuppServiceNotification(Handler h); 407 408 /** 409 * Sets the handler for Session End Notifications for CAT. 410 * Unlike the register* methods, there's only one notification handler 411 * 412 * @param h Handler for notification message. 413 * @param what User-defined message code. 414 * @param obj User object. 415 */ 416 @UnsupportedAppUsage setOnCatSessionEnd(Handler h, int what, Object obj)417 void setOnCatSessionEnd(Handler h, int what, Object obj); unSetOnCatSessionEnd(Handler h)418 void unSetOnCatSessionEnd(Handler h); 419 420 /** 421 * Sets the handler for Proactive Commands for CAT. 422 * Unlike the register* methods, there's only one notification handler 423 * 424 * @param h Handler for notification message. 425 * @param what User-defined message code. 426 * @param obj User object. 427 */ 428 @UnsupportedAppUsage setOnCatProactiveCmd(Handler h, int what, Object obj)429 void setOnCatProactiveCmd(Handler h, int what, Object obj); unSetOnCatProactiveCmd(Handler h)430 void unSetOnCatProactiveCmd(Handler h); 431 432 /** 433 * Sets the handler for Event Notifications for CAT. 434 * Unlike the register* methods, there's only one notification handler 435 * 436 * @param h Handler for notification message. 437 * @param what User-defined message code. 438 * @param obj User object. 439 */ 440 @UnsupportedAppUsage setOnCatEvent(Handler h, int what, Object obj)441 void setOnCatEvent(Handler h, int what, Object obj); unSetOnCatEvent(Handler h)442 void unSetOnCatEvent(Handler h); 443 444 /** 445 * Sets the handler for Call Set Up Notifications for CAT. 446 * Unlike the register* methods, there's only one notification handler 447 * 448 * @param h Handler for notification message. 449 * @param what User-defined message code. 450 * @param obj User object. 451 */ 452 @UnsupportedAppUsage setOnCatCallSetUp(Handler h, int what, Object obj)453 void setOnCatCallSetUp(Handler h, int what, Object obj); unSetOnCatCallSetUp(Handler h)454 void unSetOnCatCallSetUp(Handler h); 455 456 /** 457 * Enables/disbables supplementary service related notifications from 458 * the network. 459 * 460 * @param enable true to enable notifications, false to disable. 461 * @param result Message to be posted when command completes. 462 */ setSuppServiceNotifications(boolean enable, Message result)463 void setSuppServiceNotifications(boolean enable, Message result); 464 //void unSetSuppServiceNotifications(Handler h); 465 466 /** 467 * Sets the handler for Alpha Notification during STK Call Control. 468 * Unlike the register* methods, there's only one notification handler 469 * 470 * @param h Handler for notification message. 471 * @param what User-defined message code. 472 * @param obj User object. 473 */ 474 @UnsupportedAppUsage setOnCatCcAlphaNotify(Handler h, int what, Object obj)475 void setOnCatCcAlphaNotify(Handler h, int what, Object obj); unSetOnCatCcAlphaNotify(Handler h)476 void unSetOnCatCcAlphaNotify(Handler h); 477 478 /** 479 * Sets the handler for notifying Suplementary Services (SS) 480 * Data during STK Call Control. 481 * Unlike the register* methods, there's only one notification handler 482 * 483 * @param h Handler for notification message. 484 * @param what User-defined message code. 485 * @param obj User object. 486 */ setOnSs(Handler h, int what, Object obj)487 void setOnSs(Handler h, int what, Object obj); unSetOnSs(Handler h)488 void unSetOnSs(Handler h); 489 490 /** 491 * Register for unsolicited NATT Keepalive Status Indications 492 * 493 * @param h Handler for notification message. 494 * @param what User-defined message code. 495 * @param obj User object. 496 */ setOnRegistrationFailed(Handler h, int what, Object obj)497 default void setOnRegistrationFailed(Handler h, int what, Object obj) {} 498 499 /** 500 * @param h Handler for notification message. 501 */ unSetOnRegistrationFailed(Handler h)502 default void unSetOnRegistrationFailed(Handler h) {} 503 504 /** 505 * Sets the handler for Event Notifications for CDMA Display Info. 506 * Unlike the register* methods, there's only one notification handler 507 * 508 * @param h Handler for notification message. 509 * @param what User-defined message code. 510 * @param obj User object. 511 */ registerForDisplayInfo(Handler h, int what, Object obj)512 void registerForDisplayInfo(Handler h, int what, Object obj); unregisterForDisplayInfo(Handler h)513 void unregisterForDisplayInfo(Handler h); 514 515 /** 516 * Sets the handler for Event Notifications for CallWaiting Info. 517 * Unlike the register* methods, there's only one notification handler 518 * 519 * @param h Handler for notification message. 520 * @param what User-defined message code. 521 * @param obj User object. 522 */ registerForCallWaitingInfo(Handler h, int what, Object obj)523 void registerForCallWaitingInfo(Handler h, int what, Object obj); unregisterForCallWaitingInfo(Handler h)524 void unregisterForCallWaitingInfo(Handler h); 525 526 /** 527 * Sets the handler for Event Notifications for Signal Info. 528 * Unlike the register* methods, there's only one notification handler 529 * 530 * @param h Handler for notification message. 531 * @param what User-defined message code. 532 * @param obj User object. 533 */ registerForSignalInfo(Handler h, int what, Object obj)534 void registerForSignalInfo(Handler h, int what, Object obj); unregisterForSignalInfo(Handler h)535 void unregisterForSignalInfo(Handler h); 536 537 /** 538 * Registers the handler for CDMA number information record 539 * Unlike the register* methods, there's only one notification handler 540 * 541 * @param h Handler for notification message. 542 * @param what User-defined message code. 543 * @param obj User object. 544 */ registerForNumberInfo(Handler h, int what, Object obj)545 void registerForNumberInfo(Handler h, int what, Object obj); unregisterForNumberInfo(Handler h)546 void unregisterForNumberInfo(Handler h); 547 548 /** 549 * Registers the handler for CDMA redirected number Information record 550 * Unlike the register* methods, there's only one notification handler 551 * 552 * @param h Handler for notification message. 553 * @param what User-defined message code. 554 * @param obj User object. 555 */ registerForRedirectedNumberInfo(Handler h, int what, Object obj)556 void registerForRedirectedNumberInfo(Handler h, int what, Object obj); unregisterForRedirectedNumberInfo(Handler h)557 void unregisterForRedirectedNumberInfo(Handler h); 558 559 /** 560 * Registers the handler for CDMA line control information record 561 * Unlike the register* methods, there's only one notification handler 562 * 563 * @param h Handler for notification message. 564 * @param what User-defined message code. 565 * @param obj User object. 566 */ registerForLineControlInfo(Handler h, int what, Object obj)567 void registerForLineControlInfo(Handler h, int what, Object obj); unregisterForLineControlInfo(Handler h)568 void unregisterForLineControlInfo(Handler h); 569 570 /** 571 * Registers the handler for CDMA T53 CLIR information record 572 * Unlike the register* methods, there's only one notification handler 573 * 574 * @param h Handler for notification message. 575 * @param what User-defined message code. 576 * @param obj User object. 577 */ registerFoT53ClirlInfo(Handler h, int what, Object obj)578 void registerFoT53ClirlInfo(Handler h, int what, Object obj); unregisterForT53ClirInfo(Handler h)579 void unregisterForT53ClirInfo(Handler h); 580 581 /** 582 * Registers the handler for CDMA T53 audio control information record 583 * Unlike the register* methods, there's only one notification handler 584 * 585 * @param h Handler for notification message. 586 * @param what User-defined message code. 587 * @param obj User object. 588 */ registerForT53AudioControlInfo(Handler h, int what, Object obj)589 void registerForT53AudioControlInfo(Handler h, int what, Object obj); unregisterForT53AudioControlInfo(Handler h)590 void unregisterForT53AudioControlInfo(Handler h); 591 592 /** 593 * Fires on if Modem enters Emergency Callback mode 594 */ 595 @UnsupportedAppUsage setEmergencyCallbackMode(Handler h, int what, Object obj)596 void setEmergencyCallbackMode(Handler h, int what, Object obj); 597 598 /** 599 * Fires on any CDMA OTA provision status change 600 */ 601 @UnsupportedAppUsage registerForCdmaOtaProvision(Handler h,int what, Object obj)602 void registerForCdmaOtaProvision(Handler h,int what, Object obj); 603 @UnsupportedAppUsage unregisterForCdmaOtaProvision(Handler h)604 void unregisterForCdmaOtaProvision(Handler h); 605 606 /** 607 * Registers the handler when out-band ringback tone is needed.<p> 608 * 609 * Messages received from this: 610 * Message.obj will be an AsyncResult 611 * AsyncResult.userObj = obj 612 * AsyncResult.result = boolean. <p> 613 */ registerForRingbackTone(Handler h, int what, Object obj)614 void registerForRingbackTone(Handler h, int what, Object obj); unregisterForRingbackTone(Handler h)615 void unregisterForRingbackTone(Handler h); 616 617 /** 618 * Registers the handler when mute/unmute need to be resent to get 619 * uplink audio during a call.<p> 620 * 621 * @param h Handler for notification message. 622 * @param what User-defined message code. 623 * @param obj User object. 624 * 625 */ registerForResendIncallMute(Handler h, int what, Object obj)626 void registerForResendIncallMute(Handler h, int what, Object obj); unregisterForResendIncallMute(Handler h)627 void unregisterForResendIncallMute(Handler h); 628 629 /** 630 * Registers the handler for when Cdma subscription changed events 631 * 632 * @param h Handler for notification message. 633 * @param what User-defined message code. 634 * @param obj User object. 635 * 636 */ registerForCdmaSubscriptionChanged(Handler h, int what, Object obj)637 void registerForCdmaSubscriptionChanged(Handler h, int what, Object obj); unregisterForCdmaSubscriptionChanged(Handler h)638 void unregisterForCdmaSubscriptionChanged(Handler h); 639 640 /** 641 * Registers the handler for when Cdma prl changed events 642 * 643 * @param h Handler for notification message. 644 * @param what User-defined message code. 645 * @param obj User object. 646 * 647 */ registerForCdmaPrlChanged(Handler h, int what, Object obj)648 void registerForCdmaPrlChanged(Handler h, int what, Object obj); unregisterForCdmaPrlChanged(Handler h)649 void unregisterForCdmaPrlChanged(Handler h); 650 651 /** 652 * Registers the handler for when Cdma prl changed events 653 * 654 * @param h Handler for notification message. 655 * @param what User-defined message code. 656 * @param obj User object. 657 * 658 */ registerForExitEmergencyCallbackMode(Handler h, int what, Object obj)659 void registerForExitEmergencyCallbackMode(Handler h, int what, Object obj); unregisterForExitEmergencyCallbackMode(Handler h)660 void unregisterForExitEmergencyCallbackMode(Handler h); 661 662 /** 663 * Registers the handler for RIL_UNSOL_RIL_CONNECT events. 664 * 665 * When ril connects or disconnects a message is sent to the registrant 666 * which contains an AsyncResult, ar, in msg.obj. The ar.result is an 667 * Integer which is the version of the ril or -1 if the ril disconnected. 668 * 669 * @param h Handler for notification message. 670 * @param what User-defined message code. 671 * @param obj User object. 672 */ 673 @UnsupportedAppUsage registerForRilConnected(Handler h, int what, Object obj)674 void registerForRilConnected(Handler h, int what, Object obj); 675 @UnsupportedAppUsage unregisterForRilConnected(Handler h)676 void unregisterForRilConnected(Handler h); 677 678 /** 679 * Registers the handler for RIL_UNSOL_SIM_DETACH_FROM_NETWORK_CONFIG_CHANGED events. 680 * 681 * @param h Handler for notification message. 682 * @param what User-defined message code. 683 * @param obj User object. 684 */ registerUiccApplicationEnablementChanged(Handler h, int what, Object obj)685 default void registerUiccApplicationEnablementChanged(Handler h, int what, Object obj) {}; 686 687 /** 688 * Unregisters the handler for RIL_UNSOL_SIM_DETACH_FROM_NETWORK_CONFIG_CHANGED events. 689 * 690 * @param h Handler for notification message. 691 */ unregisterUiccApplicationEnablementChanged(Handler h)692 default void unregisterUiccApplicationEnablementChanged(Handler h) {}; 693 694 /** 695 * Supply the ICC PIN to the ICC card 696 * 697 * returned message 698 * retMsg.obj = AsyncResult ar 699 * ar.exception carries exception on failure 700 * This exception is CommandException with an error of PASSWORD_INCORRECT 701 * if the password is incorrect 702 * 703 * ar.result is an optional array of integers where the first entry 704 * is the number of attempts remaining before the ICC will be PUK locked. 705 * 706 * ar.exception and ar.result are null on success 707 */ 708 709 @UnsupportedAppUsage supplyIccPin(String pin, Message result)710 void supplyIccPin(String pin, Message result); 711 712 /** 713 * Supply the PIN for the app with this AID on the ICC card 714 * 715 * AID (Application ID), See ETSI 102.221 8.1 and 101.220 4 716 * 717 * returned message 718 * retMsg.obj = AsyncResult ar 719 * ar.exception carries exception on failure 720 * This exception is CommandException with an error of PASSWORD_INCORRECT 721 * if the password is incorrect 722 * 723 * ar.result is an optional array of integers where the first entry 724 * is the number of attempts remaining before the ICC will be PUK locked. 725 * 726 * ar.exception and ar.result are null on success 727 */ 728 supplyIccPinForApp(String pin, String aid, Message result)729 void supplyIccPinForApp(String pin, String aid, Message result); 730 731 /** 732 * Supply the ICC PUK and newPin to the ICC card 733 * 734 * returned message 735 * retMsg.obj = AsyncResult ar 736 * ar.exception carries exception on failure 737 * This exception is CommandException with an error of PASSWORD_INCORRECT 738 * if the password is incorrect 739 * 740 * ar.result is an optional array of integers where the first entry 741 * is the number of attempts remaining before the ICC is permanently disabled. 742 * 743 * ar.exception and ar.result are null on success 744 */ 745 supplyIccPuk(String puk, String newPin, Message result)746 void supplyIccPuk(String puk, String newPin, Message result); 747 748 /** 749 * Supply the PUK, new pin for the app with this AID on the ICC card 750 * 751 * AID (Application ID), See ETSI 102.221 8.1 and 101.220 4 752 * 753 * retMsg.obj = AsyncResult ar 754 * ar.exception carries exception on failure 755 * This exception is CommandException with an error of PASSWORD_INCORRECT 756 * if the password is incorrect 757 * 758 * ar.result is an optional array of integers where the first entry 759 * is the number of attempts remaining before the ICC is permanently disabled. 760 * 761 * ar.exception and ar.result are null on success 762 */ 763 supplyIccPukForApp(String puk, String newPin, String aid, Message result)764 void supplyIccPukForApp(String puk, String newPin, String aid, Message result); 765 766 /** 767 * Supply the ICC PIN2 to the ICC card 768 * Only called following operation where ICC_PIN2 was 769 * returned as a a failure from a previous operation 770 * 771 * returned message 772 * retMsg.obj = AsyncResult ar 773 * ar.exception carries exception on failure 774 * This exception is CommandException with an error of PASSWORD_INCORRECT 775 * if the password is incorrect 776 * 777 * ar.result is an optional array of integers where the first entry 778 * is the number of attempts remaining before the ICC will be PUK locked. 779 * 780 * ar.exception and ar.result are null on success 781 */ 782 supplyIccPin2(String pin2, Message result)783 void supplyIccPin2(String pin2, Message result); 784 785 /** 786 * Supply the PIN2 for the app with this AID on the ICC card 787 * Only called following operation where ICC_PIN2 was 788 * returned as a a failure from a previous operation 789 * 790 * AID (Application ID), See ETSI 102.221 8.1 and 101.220 4 791 * 792 * returned message 793 * retMsg.obj = AsyncResult ar 794 * ar.exception carries exception on failure 795 * This exception is CommandException with an error of PASSWORD_INCORRECT 796 * if the password is incorrect 797 * 798 * ar.result is an optional array of integers where the first entry 799 * is the number of attempts remaining before the ICC will be PUK locked. 800 * 801 * ar.exception and ar.result are null on success 802 */ 803 supplyIccPin2ForApp(String pin2, String aid, Message result)804 void supplyIccPin2ForApp(String pin2, String aid, Message result); 805 806 /** 807 * Supply the SIM PUK2 to the SIM card 808 * Only called following operation where SIM_PUK2 was 809 * returned as a a failure from a previous operation 810 * 811 * returned message 812 * retMsg.obj = AsyncResult ar 813 * ar.exception carries exception on failure 814 * This exception is CommandException with an error of PASSWORD_INCORRECT 815 * if the password is incorrect 816 * 817 * ar.result is an optional array of integers where the first entry 818 * is the number of attempts remaining before the ICC is permanently disabled. 819 * 820 * ar.exception and ar.result are null on success 821 */ 822 supplyIccPuk2(String puk2, String newPin2, Message result)823 void supplyIccPuk2(String puk2, String newPin2, Message result); 824 825 /** 826 * Supply the PUK2, newPin2 for the app with this AID on the ICC card 827 * Only called following operation where SIM_PUK2 was 828 * returned as a a failure from a previous operation 829 * 830 * AID (Application ID), See ETSI 102.221 8.1 and 101.220 4 831 * 832 * returned message 833 * retMsg.obj = AsyncResult ar 834 * ar.exception carries exception on failure 835 * This exception is CommandException with an error of PASSWORD_INCORRECT 836 * if the password is incorrect 837 * 838 * ar.result is an optional array of integers where the first entry 839 * is the number of attempts remaining before the ICC is permanently disabled. 840 * 841 * ar.exception and ar.result are null on success 842 */ 843 supplyIccPuk2ForApp(String puk2, String newPin2, String aid, Message result)844 void supplyIccPuk2ForApp(String puk2, String newPin2, String aid, Message result); 845 846 // TODO: Add java doc and indicate that msg.arg1 contains the number of attempts remaining. changeIccPin(String oldPin, String newPin, Message result)847 void changeIccPin(String oldPin, String newPin, Message result); changeIccPinForApp(String oldPin, String newPin, String aidPtr, Message result)848 void changeIccPinForApp(String oldPin, String newPin, String aidPtr, Message result); changeIccPin2(String oldPin2, String newPin2, Message result)849 void changeIccPin2(String oldPin2, String newPin2, Message result); changeIccPin2ForApp(String oldPin2, String newPin2, String aidPtr, Message result)850 void changeIccPin2ForApp(String oldPin2, String newPin2, String aidPtr, Message result); 851 852 @UnsupportedAppUsage changeBarringPassword(String facility, String oldPwd, String newPwd, Message result)853 void changeBarringPassword(String facility, String oldPwd, String newPwd, Message result); 854 supplyNetworkDepersonalization(String netpin, Message result)855 void supplyNetworkDepersonalization(String netpin, Message result); 856 supplySimDepersonalization(PersoSubState persoType, String controlKey, Message result)857 void supplySimDepersonalization(PersoSubState persoType, String controlKey, Message result); 858 859 /** 860 * returned message 861 * retMsg.obj = AsyncResult ar 862 * ar.exception carries exception on failure 863 * ar.userObject contains the orignal value of result.obj 864 * ar.result contains a List of DriverCall 865 * The ar.result List is sorted by DriverCall.index 866 */ getCurrentCalls(Message result)867 void getCurrentCalls (Message result); 868 869 /** 870 * returned message 871 * retMsg.obj = AsyncResult ar 872 * ar.exception carries exception on failure 873 * ar.userObject contains the orignal value of result.obj 874 * ar.result contains a List of DataCallResponse 875 * @deprecated Do not use. 876 */ 877 @UnsupportedAppUsage 878 @Deprecated getPDPContextList(Message result)879 void getPDPContextList(Message result); 880 881 /** 882 * returned message 883 * retMsg.obj = AsyncResult ar 884 * ar.exception carries exception on failure 885 * ar.userObject contains the orignal value of result.obj 886 * ar.result contains a List of DataCallResponse 887 */ 888 @UnsupportedAppUsage getDataCallList(Message result)889 void getDataCallList(Message result); 890 891 /** 892 * returned message 893 * retMsg.obj = AsyncResult ar 894 * ar.exception carries exception on failure 895 * ar.userObject contains the orignal value of result.obj 896 * ar.result is null on success and failure 897 * 898 * CLIR_DEFAULT == on "use subscription default value" 899 * CLIR_SUPPRESSION == on "CLIR suppression" (allow CLI presentation) 900 * CLIR_INVOCATION == on "CLIR invocation" (restrict CLI presentation) 901 */ dial(String address, boolean isEmergencyCall, EmergencyNumber emergencyNumberInfo, boolean hasKnownUserIntentEmergency, int clirMode, Message result)902 void dial(String address, boolean isEmergencyCall, EmergencyNumber emergencyNumberInfo, 903 boolean hasKnownUserIntentEmergency, int clirMode, Message result); 904 905 /** 906 * returned message 907 * retMsg.obj = AsyncResult ar 908 * ar.exception carries exception on failure 909 * ar.userObject contains the orignal value of result.obj 910 * ar.result is null on success and failure 911 * 912 * CLIR_DEFAULT == on "use subscription default value" 913 * CLIR_SUPPRESSION == on "CLIR suppression" (allow CLI presentation) 914 * CLIR_INVOCATION == on "CLIR invocation" (restrict CLI presentation) 915 */ dial(String address, boolean isEmergencyCall, EmergencyNumber emergencyNumberInfo, boolean hasKnownUserIntentEmergency, int clirMode, UUSInfo uusInfo, Message result)916 void dial(String address, boolean isEmergencyCall, EmergencyNumber emergencyNumberInfo, 917 boolean hasKnownUserIntentEmergency, int clirMode, UUSInfo uusInfo, Message result); 918 919 /** 920 * returned message 921 * retMsg.obj = AsyncResult ar 922 * ar.exception carries exception on failure 923 * ar.userObject contains the orignal value of result.obj 924 * ar.result is String containing IMSI on success 925 */ 926 @UnsupportedAppUsage getIMSI(Message result)927 void getIMSI(Message result); 928 929 /** 930 * returned message 931 * retMsg.obj = AsyncResult ar 932 * ar.exception carries exception on failure 933 * ar.userObject contains the orignal value of result.obj 934 * ar.result is String containing IMSI on success 935 */ getIMSIForApp(String aid, Message result)936 void getIMSIForApp(String aid, Message result); 937 938 /** 939 * returned message 940 * retMsg.obj = AsyncResult ar 941 * ar.exception carries exception on failure 942 * ar.userObject contains the orignal value of result.obj 943 * ar.result is String containing IMEI on success 944 */ getIMEI(Message result)945 void getIMEI(Message result); 946 947 /** 948 * returned message 949 * retMsg.obj = AsyncResult ar 950 * ar.exception carries exception on failure 951 * ar.userObject contains the orignal value of result.obj 952 * ar.result is String containing IMEISV on success 953 */ 954 @UnsupportedAppUsage getIMEISV(Message result)955 void getIMEISV(Message result); 956 957 /** 958 * Hang up one individual connection. 959 * returned message 960 * retMsg.obj = AsyncResult ar 961 * ar.exception carries exception on failure 962 * ar.userObject contains the orignal value of result.obj 963 * ar.result is null on success and failure 964 * 965 * 3GPP 22.030 6.5.5 966 * "Releases a specific active call X" 967 */ hangupConnection(int gsmIndex, Message result)968 void hangupConnection (int gsmIndex, Message result); 969 970 /** 971 * 3GPP 22.030 6.5.5 972 * "Releases all held calls or sets User Determined User Busy (UDUB) 973 * for a waiting call." 974 * ar.exception carries exception on failure 975 * ar.userObject contains the orignal value of result.obj 976 * ar.result is null on success and failure 977 */ hangupWaitingOrBackground(Message result)978 void hangupWaitingOrBackground (Message result); 979 980 /** 981 * 3GPP 22.030 6.5.5 982 * "Releases all active calls (if any exist) and accepts 983 * the other (held or waiting) call." 984 * 985 * ar.exception carries exception on failure 986 * ar.userObject contains the orignal value of result.obj 987 * ar.result is null on success and failure 988 */ hangupForegroundResumeBackground(Message result)989 void hangupForegroundResumeBackground (Message result); 990 991 /** 992 * 3GPP 22.030 6.5.5 993 * "Places all active calls (if any exist) on hold and accepts 994 * the other (held or waiting) call." 995 * 996 * ar.exception carries exception on failure 997 * ar.userObject contains the orignal value of result.obj 998 * ar.result is null on success and failure 999 */ 1000 @UnsupportedAppUsage switchWaitingOrHoldingAndActive(Message result)1001 void switchWaitingOrHoldingAndActive (Message result); 1002 1003 /** 1004 * 3GPP 22.030 6.5.5 1005 * "Adds a held call to the conversation" 1006 * 1007 * ar.exception carries exception on failure 1008 * ar.userObject contains the orignal value of result.obj 1009 * ar.result is null on success and failure 1010 */ conference(Message result)1011 void conference (Message result); 1012 1013 /** 1014 * Set preferred Voice Privacy (VP). 1015 * 1016 * @param enable true is enhanced and false is normal VP 1017 * @param result is a callback message 1018 */ setPreferredVoicePrivacy(boolean enable, Message result)1019 void setPreferredVoicePrivacy(boolean enable, Message result); 1020 1021 /** 1022 * Get currently set preferred Voice Privacy (VP) mode. 1023 * 1024 * @param result is a callback message 1025 */ getPreferredVoicePrivacy(Message result)1026 void getPreferredVoicePrivacy(Message result); 1027 1028 /** 1029 * 3GPP 22.030 6.5.5 1030 * "Places all active calls on hold except call X with which 1031 * communication shall be supported." 1032 */ separateConnection(int gsmIndex, Message result)1033 void separateConnection (int gsmIndex, Message result); 1034 1035 /** 1036 * 1037 * ar.exception carries exception on failure 1038 * ar.userObject contains the orignal value of result.obj 1039 * ar.result is null on success and failure 1040 */ 1041 @UnsupportedAppUsage acceptCall(Message result)1042 void acceptCall (Message result); 1043 1044 /** 1045 * also known as UDUB 1046 * ar.exception carries exception on failure 1047 * ar.userObject contains the orignal value of result.obj 1048 * ar.result is null on success and failure 1049 */ rejectCall(Message result)1050 void rejectCall (Message result); 1051 1052 /** 1053 * 3GPP 22.030 6.5.5 1054 * "Connects the two calls and disconnects the subscriber from both calls" 1055 * 1056 * ar.exception carries exception on failure 1057 * ar.userObject contains the orignal value of result.obj 1058 * ar.result is null on success and failure 1059 */ explicitCallTransfer(Message result)1060 void explicitCallTransfer (Message result); 1061 1062 /** 1063 * cause code returned as int[0] in Message.obj.response 1064 * Returns integer cause code defined in TS 24.008 1065 * Annex H or closest approximation. 1066 * Most significant codes: 1067 * - Any defined in 22.001 F.4 (for generating busy/congestion) 1068 * - Cause 68: ACM >= ACMMax 1069 */ getLastCallFailCause(Message result)1070 void getLastCallFailCause (Message result); 1071 1072 1073 /** 1074 * Reason for last PDP context deactivate or failure to activate 1075 * cause code returned as int[0] in Message.obj.response 1076 * returns an integer cause code defined in TS 24.008 1077 * section 6.1.3.1.3 or close approximation 1078 * @deprecated Do not use. 1079 */ 1080 @UnsupportedAppUsage 1081 @Deprecated getLastPdpFailCause(Message result)1082 void getLastPdpFailCause (Message result); 1083 1084 /** 1085 * The preferred new alternative to getLastPdpFailCause 1086 * that is also CDMA-compatible. 1087 */ 1088 @UnsupportedAppUsage getLastDataCallFailCause(Message result)1089 void getLastDataCallFailCause (Message result); 1090 setMute(boolean enableMute, Message response)1091 void setMute (boolean enableMute, Message response); 1092 getMute(Message response)1093 void getMute (Message response); 1094 1095 /** 1096 * response.obj is an AsyncResult 1097 * response.obj.result is an int[2] 1098 * response.obj.result[0] is received signal strength (0-31, 99) 1099 * response.obj.result[1] is bit error rate (0-7, 99) 1100 * as defined in TS 27.007 8.5 1101 */ 1102 @UnsupportedAppUsage getSignalStrength(Message response)1103 void getSignalStrength (Message response); 1104 1105 1106 /** 1107 * response.obj.result is an int[3] 1108 * response.obj.result[0] is registration state 0-5 from TS 27.007 7.2 1109 * response.obj.result[1] is LAC if registered or -1 if not 1110 * response.obj.result[2] is CID if registered or -1 if not 1111 * valid LAC and CIDs are 0x0000 - 0xffff 1112 * 1113 * Please note that registration state 4 ("unknown") is treated 1114 * as "out of service" above 1115 */ 1116 @UnsupportedAppUsage getVoiceRegistrationState(Message response)1117 void getVoiceRegistrationState (Message response); 1118 1119 /** 1120 * response.obj.result is an int[3] 1121 * response.obj.result[0] is registration state 0-5 from TS 27.007 7.2 1122 * response.obj.result[1] is LAC if registered or -1 if not 1123 * response.obj.result[2] is CID if registered or -1 if not 1124 * valid LAC and CIDs are 0x0000 - 0xffff 1125 * 1126 * Please note that registration state 4 ("unknown") is treated 1127 * as "out of service" above 1128 */ getDataRegistrationState(Message response)1129 void getDataRegistrationState (Message response); 1130 1131 /** 1132 * response.obj.result is a String[3] 1133 * response.obj.result[0] is long alpha or null if unregistered 1134 * response.obj.result[1] is short alpha or null if unregistered 1135 * response.obj.result[2] is numeric or null if unregistered 1136 */ 1137 @UnsupportedAppUsage getOperator(Message response)1138 void getOperator(Message response); 1139 1140 /** 1141 * ar.exception carries exception on failure 1142 * ar.userObject contains the orignal value of result.obj 1143 * ar.result is null on success and failure 1144 */ 1145 @UnsupportedAppUsage sendDtmf(char c, Message result)1146 void sendDtmf(char c, Message result); 1147 1148 1149 /** 1150 * ar.exception carries exception on failure 1151 * ar.userObject contains the orignal value of result.obj 1152 * ar.result is null on success and failure 1153 */ startDtmf(char c, Message result)1154 void startDtmf(char c, Message result); 1155 1156 /** 1157 * ar.exception carries exception on failure 1158 * ar.userObject contains the orignal value of result.obj 1159 * ar.result is null on success and failure 1160 */ stopDtmf(Message result)1161 void stopDtmf(Message result); 1162 1163 /** 1164 * ar.exception carries exception on failure 1165 * ar.userObject contains the orignal value of result.obj 1166 * ar.result is null on success and failure 1167 */ sendBurstDtmf(String dtmfString, int on, int off, Message result)1168 void sendBurstDtmf(String dtmfString, int on, int off, Message result); 1169 1170 /** 1171 * smscPDU is smsc address in PDU form GSM BCD format prefixed 1172 * by a length byte (as expected by TS 27.005) or NULL for default SMSC 1173 * pdu is SMS in PDU format as an ASCII hex string 1174 * less the SMSC address 1175 */ sendSMS(String smscPDU, String pdu, Message response)1176 void sendSMS (String smscPDU, String pdu, Message response); 1177 1178 /** 1179 * Send an SMS message, Identical to sendSMS, 1180 * except that more messages are expected to be sent soon 1181 * smscPDU is smsc address in PDU form GSM BCD format prefixed 1182 * by a length byte (as expected by TS 27.005) or NULL for default SMSC 1183 * pdu is SMS in PDU format as an ASCII hex string 1184 * less the SMSC address 1185 */ sendSMSExpectMore(String smscPDU, String pdu, Message response)1186 void sendSMSExpectMore (String smscPDU, String pdu, Message response); 1187 1188 /** 1189 * @param pdu is CDMA-SMS in internal pseudo-PDU format 1190 * @param response sent when operation completes 1191 */ sendCdmaSms(byte[] pdu, Message response)1192 void sendCdmaSms(byte[] pdu, Message response); 1193 1194 /** 1195 * Identical to sendCdmaSms, except that more messages are expected to be sent soon 1196 * @param pdu is CDMA-SMS in internal pseudo-PDU format 1197 * @param response response sent when operation completed 1198 */ sendCdmaSMSExpectMore(byte[] pdu, Message response)1199 void sendCdmaSMSExpectMore(byte[] pdu, Message response); 1200 1201 /** 1202 * send SMS over IMS with 3GPP/GSM SMS format 1203 * @param smscPDU is smsc address in PDU form GSM BCD format prefixed 1204 * by a length byte (as expected by TS 27.005) or NULL for default SMSC 1205 * @param pdu is SMS in PDU format as an ASCII hex string 1206 * less the SMSC address 1207 * @param retry indicates if this is a retry; 0 == not retry, nonzero = retry 1208 * @param messageRef valid field if retry is set to nonzero. 1209 * Contains messageRef from RIL_SMS_Response corresponding to failed MO SMS 1210 * @param response sent when operation completes 1211 */ sendImsGsmSms(String smscPDU, String pdu, int retry, int messageRef, Message response)1212 void sendImsGsmSms (String smscPDU, String pdu, int retry, int messageRef, 1213 Message response); 1214 1215 /** 1216 * send SMS over IMS with 3GPP2/CDMA SMS format 1217 * @param pdu is CDMA-SMS in internal pseudo-PDU format 1218 * @param response sent when operation completes 1219 * @param retry indicates if this is a retry; 0 == not retry, nonzero = retry 1220 * @param messageRef valid field if retry is set to nonzero. 1221 * Contains messageRef from RIL_SMS_Response corresponding to failed MO SMS 1222 * @param response sent when operation completes 1223 */ sendImsCdmaSms(byte[] pdu, int retry, int messageRef, Message response)1224 void sendImsCdmaSms(byte[] pdu, int retry, int messageRef, Message response); 1225 1226 /** 1227 * Deletes the specified SMS record from SIM memory (EF_SMS). 1228 * 1229 * @param index index of the SMS record to delete 1230 * @param response sent when operation completes 1231 */ 1232 @UnsupportedAppUsage deleteSmsOnSim(int index, Message response)1233 void deleteSmsOnSim(int index, Message response); 1234 1235 /** 1236 * Deletes the specified SMS record from RUIM memory (EF_SMS in DF_CDMA). 1237 * 1238 * @param index index of the SMS record to delete 1239 * @param response sent when operation completes 1240 */ 1241 @UnsupportedAppUsage deleteSmsOnRuim(int index, Message response)1242 void deleteSmsOnRuim(int index, Message response); 1243 1244 /** 1245 * Writes an SMS message to SIM memory (EF_SMS). 1246 * 1247 * @param status status of message on SIM. One of: 1248 * SmsManger.STATUS_ON_ICC_READ 1249 * SmsManger.STATUS_ON_ICC_UNREAD 1250 * SmsManger.STATUS_ON_ICC_SENT 1251 * SmsManger.STATUS_ON_ICC_UNSENT 1252 * @param pdu message PDU, as hex string 1253 * @param response sent when operation completes. 1254 * response.obj will be an AsyncResult, and will indicate 1255 * any error that may have occurred (eg, out of memory). 1256 */ 1257 @UnsupportedAppUsage writeSmsToSim(int status, String smsc, String pdu, Message response)1258 void writeSmsToSim(int status, String smsc, String pdu, Message response); 1259 1260 /** 1261 * Writes an SMS message to RUIM memory (EF_SMS). 1262 * 1263 * @param status status of message on SIM. One of: 1264 * SmsManger.STATUS_ON_ICC_READ 1265 * SmsManger.STATUS_ON_ICC_UNREAD 1266 * SmsManger.STATUS_ON_ICC_SENT 1267 * SmsManger.STATUS_ON_ICC_UNSENT 1268 * @param pdu message PDU, as byte array 1269 * @param response sent when operation completes. response.obj will be an AsyncResult, and will 1270 * indicate any error that may have occurred (eg, out of memory). 1271 */ 1272 @UnsupportedAppUsage writeSmsToRuim(int status, byte[] pdu, Message response)1273 void writeSmsToRuim(int status, byte[] pdu, Message response); 1274 1275 @UnsupportedAppUsage setRadioPower(boolean on, Message response)1276 default void setRadioPower(boolean on, Message response) { 1277 setRadioPower(on, false, false, response); 1278 } 1279 1280 /** 1281 * Sets the radio power on/off state (off is sometimes 1282 * called "airplane mode"). 1283 * 1284 * @param on true means "on", false means "off". 1285 * @param forEmergencyCall true means the purpose of turning radio power on is for emergency 1286 * call. No effect if power is set false. 1287 * @param isSelectedPhoneForEmergencyCall true means this phone / modem is selected to place 1288 * emergency call after turning power on. No effect if power 1289 * or forEmergency is set false. 1290 * @param response sent when operation completes. 1291 */ setRadioPower(boolean on, boolean forEmergencyCall, boolean isSelectedPhoneForEmergencyCall, Message response)1292 default void setRadioPower(boolean on, boolean forEmergencyCall, 1293 boolean isSelectedPhoneForEmergencyCall, Message response) {} 1294 1295 @UnsupportedAppUsage acknowledgeLastIncomingGsmSms(boolean success, int cause, Message response)1296 void acknowledgeLastIncomingGsmSms(boolean success, int cause, Message response); 1297 1298 @UnsupportedAppUsage acknowledgeLastIncomingCdmaSms(boolean success, int cause, Message response)1299 void acknowledgeLastIncomingCdmaSms(boolean success, int cause, Message response); 1300 1301 /** 1302 * Acknowledge successful or failed receipt of last incoming SMS, 1303 * including acknowledgement TPDU to send as the RP-User-Data element 1304 * of the RP-ACK or RP-ERROR PDU. 1305 * 1306 * @param success true to send RP-ACK, false to send RP-ERROR 1307 * @param ackPdu the acknowledgement TPDU in hexadecimal format 1308 * @param response sent when operation completes. 1309 */ acknowledgeIncomingGsmSmsWithPdu(boolean success, String ackPdu, Message response)1310 void acknowledgeIncomingGsmSmsWithPdu(boolean success, String ackPdu, Message response); 1311 1312 /** 1313 * parameters equivalent to 27.007 AT+CRSM command 1314 * response.obj will be an AsyncResult 1315 * response.obj.result will be an IccIoResult on success 1316 */ 1317 @UnsupportedAppUsage iccIO(int command, int fileid, String path, int p1, int p2, int p3, String data, String pin2, Message response)1318 void iccIO (int command, int fileid, String path, int p1, int p2, int p3, 1319 String data, String pin2, Message response); 1320 1321 /** 1322 * parameters equivalent to 27.007 AT+CRSM command 1323 * response.obj will be an AsyncResult 1324 * response.obj.userObj will be a IccIoResult on success 1325 */ 1326 @UnsupportedAppUsage iccIOForApp(int command, int fileid, String path, int p1, int p2, int p3, String data, String pin2, String aid, Message response)1327 void iccIOForApp (int command, int fileid, String path, int p1, int p2, int p3, 1328 String data, String pin2, String aid, Message response); 1329 1330 /** 1331 * (AsyncResult)response.obj).result is an int[] with element [0] set to 1332 * 1 for "CLIP is provisioned", and 0 for "CLIP is not provisioned". 1333 * 1334 * @param response is callback message 1335 */ 1336 queryCLIP(Message response)1337 void queryCLIP(Message response); 1338 1339 /** 1340 * response.obj will be a an int[2] 1341 * 1342 * response.obj[0] will be TS 27.007 +CLIR parameter 'n' 1343 * 0 presentation indicator is used according to the subscription of the CLIR service 1344 * 1 CLIR invocation 1345 * 2 CLIR suppression 1346 * 1347 * response.obj[1] will be TS 27.007 +CLIR parameter 'm' 1348 * 0 CLIR not provisioned 1349 * 1 CLIR provisioned in permanent mode 1350 * 2 unknown (e.g. no network, etc.) 1351 * 3 CLIR temporary mode presentation restricted 1352 * 4 CLIR temporary mode presentation allowed 1353 */ 1354 getCLIR(Message response)1355 void getCLIR(Message response); 1356 1357 /** 1358 * clirMode is one of the CLIR_* constants above 1359 * 1360 * response.obj is null 1361 */ 1362 setCLIR(int clirMode, Message response)1363 void setCLIR(int clirMode, Message response); 1364 1365 /** 1366 * (AsyncResult)response.obj).result is an int[] with element [0] set to 1367 * 0 for disabled, 1 for enabled. 1368 * 1369 * @param serviceClass is a sum of SERVICE_CLASS_* 1370 * @param response is callback message 1371 */ 1372 1373 @UnsupportedAppUsage queryCallWaiting(int serviceClass, Message response)1374 void queryCallWaiting(int serviceClass, Message response); 1375 1376 /** 1377 * @param enable is true to enable, false to disable 1378 * @param serviceClass is a sum of SERVICE_CLASS_* 1379 * @param response is callback message 1380 */ 1381 1382 @UnsupportedAppUsage setCallWaiting(boolean enable, int serviceClass, Message response)1383 void setCallWaiting(boolean enable, int serviceClass, Message response); 1384 1385 /** 1386 * @param action is one of CF_ACTION_* 1387 * @param cfReason is one of CF_REASON_* 1388 * @param serviceClass is a sum of SERVICE_CLASSS_* 1389 */ 1390 @UnsupportedAppUsage setCallForward(int action, int cfReason, int serviceClass, String number, int timeSeconds, Message response)1391 void setCallForward(int action, int cfReason, int serviceClass, 1392 String number, int timeSeconds, Message response); 1393 1394 /** 1395 * cfReason is one of CF_REASON_* 1396 * 1397 * ((AsyncResult)response.obj).result will be an array of 1398 * CallForwardInfo's 1399 * 1400 * An array of length 0 means "disabled for all codes" 1401 */ 1402 @UnsupportedAppUsage queryCallForwardStatus(int cfReason, int serviceClass, String number, Message response)1403 void queryCallForwardStatus(int cfReason, int serviceClass, 1404 String number, Message response); 1405 1406 @UnsupportedAppUsage setNetworkSelectionModeAutomatic(Message response)1407 void setNetworkSelectionModeAutomatic(Message response); 1408 1409 /** 1410 * Ask the radio to connect to the input network with specific RadioAccessNetwork 1411 * and change selection mode to manual. 1412 * @param operatorNumeric PLMN ID of the network to select. 1413 * @param ran radio access network type (see {@link AccessNetworkType}). 1414 * @param response callback message. 1415 */ 1416 @UnsupportedAppUsage setNetworkSelectionModeManual(String operatorNumeric, int ran, Message response)1417 void setNetworkSelectionModeManual(String operatorNumeric, int ran, Message response); 1418 1419 /** 1420 * Queries whether the current network selection mode is automatic 1421 * or manual 1422 * 1423 * ((AsyncResult)response.obj).result is an int[] with element [0] being 1424 * a 0 for automatic selection and a 1 for manual selection 1425 */ 1426 1427 @UnsupportedAppUsage getNetworkSelectionMode(Message response)1428 void getNetworkSelectionMode(Message response); 1429 1430 /** 1431 * Queries the currently available networks 1432 * 1433 * ((AsyncResult)response.obj).result is a List of NetworkInfo objects 1434 */ getAvailableNetworks(Message response)1435 void getAvailableNetworks(Message response); 1436 1437 /** 1438 * Starts a radio network scan 1439 * 1440 * ((AsyncResult)response.obj).result is a NetworkScanResult object 1441 */ startNetworkScan(NetworkScanRequest nsr, Message response)1442 void startNetworkScan(NetworkScanRequest nsr, Message response); 1443 1444 /** 1445 * Stops the ongoing network scan 1446 * 1447 * ((AsyncResult)response.obj).result is a NetworkScanResult object 1448 * 1449 */ stopNetworkScan(Message response)1450 void stopNetworkScan(Message response); 1451 1452 /** 1453 * Gets the baseband version 1454 */ 1455 @UnsupportedAppUsage getBasebandVersion(Message response)1456 void getBasebandVersion(Message response); 1457 1458 /** 1459 * (AsyncResult)response.obj).result will be an Integer representing 1460 * the sum of enabled service classes (sum of SERVICE_CLASS_*) 1461 * 1462 * @param facility one of CB_FACILTY_* 1463 * @param password password or "" if not required 1464 * @param serviceClass is a sum of SERVICE_CLASS_* 1465 * @param response is callback message 1466 */ 1467 1468 @UnsupportedAppUsage queryFacilityLock(String facility, String password, int serviceClass, Message response)1469 void queryFacilityLock (String facility, String password, int serviceClass, 1470 Message response); 1471 1472 /** 1473 * (AsyncResult)response.obj).result will be an Integer representing 1474 * the sum of enabled service classes (sum of SERVICE_CLASS_*) for the 1475 * application with appId. 1476 * 1477 * @param facility one of CB_FACILTY_* 1478 * @param password password or "" if not required 1479 * @param serviceClass is a sum of SERVICE_CLASS_* 1480 * @param appId is application Id or null if none 1481 * @param response is callback message 1482 */ 1483 queryFacilityLockForApp(String facility, String password, int serviceClass, String appId, Message response)1484 void queryFacilityLockForApp(String facility, String password, int serviceClass, String appId, 1485 Message response); 1486 1487 /** 1488 * @param facility one of CB_FACILTY_* 1489 * @param lockState true means lock, false means unlock 1490 * @param password password or "" if not required 1491 * @param serviceClass is a sum of SERVICE_CLASS_* 1492 * @param response is callback message 1493 */ 1494 @UnsupportedAppUsage setFacilityLock(String facility, boolean lockState, String password, int serviceClass, Message response)1495 void setFacilityLock (String facility, boolean lockState, String password, 1496 int serviceClass, Message response); 1497 1498 /** 1499 * Set the facility lock for the app with this AID on the ICC card. 1500 * 1501 * @param facility one of CB_FACILTY_* 1502 * @param lockState true means lock, false means unlock 1503 * @param password password or "" if not required 1504 * @param serviceClass is a sum of SERVICE_CLASS_* 1505 * @param appId is application Id or null if none 1506 * @param response is callback message 1507 */ setFacilityLockForApp(String facility, boolean lockState, String password, int serviceClass, String appId, Message response)1508 void setFacilityLockForApp(String facility, boolean lockState, String password, 1509 int serviceClass, String appId, Message response); 1510 sendUSSD(String ussdString, Message response)1511 void sendUSSD (String ussdString, Message response); 1512 1513 /** 1514 * Cancels a pending USSD session if one exists. 1515 * @param response callback message 1516 */ cancelPendingUssd(Message response)1517 void cancelPendingUssd (Message response); 1518 resetRadio(Message result)1519 void resetRadio(Message result); 1520 1521 /** 1522 * Assign a specified band for RF configuration. 1523 * 1524 * @param bandMode one of BM_*_BAND 1525 * @param response is callback message 1526 */ setBandMode(int bandMode, Message response)1527 void setBandMode (int bandMode, Message response); 1528 1529 /** 1530 * Query the list of band mode supported by RF. 1531 * 1532 * @param response is callback message 1533 * ((AsyncResult)response.obj).result is an int[] where int[0] is 1534 * the size of the array and the rest of each element representing 1535 * one available BM_*_BAND 1536 */ queryAvailableBandMode(Message response)1537 void queryAvailableBandMode (Message response); 1538 1539 /** 1540 * Requests to set the preferred network type for searching and registering 1541 * (CS/PS domain, RAT, and operation mode) 1542 * @param networkType one of NT_*_TYPE 1543 * @param response is callback message 1544 */ 1545 @UnsupportedAppUsage setPreferredNetworkType(int networkType , Message response)1546 void setPreferredNetworkType(int networkType , Message response); 1547 1548 /** 1549 * Query the preferred network type setting 1550 * 1551 * @param response is callback message to report one of NT_*_TYPE 1552 */ 1553 @UnsupportedAppUsage getPreferredNetworkType(Message response)1554 void getPreferredNetworkType(Message response); 1555 1556 /** 1557 * Request to enable/disable network state change notifications when 1558 * location information (lac and/or cid) has changed. 1559 * 1560 * @param enable true to enable, false to disable 1561 * @param workSource calling WorkSource 1562 * @param response callback message 1563 */ setLocationUpdates(boolean enable, WorkSource workSource, Message response)1564 default void setLocationUpdates(boolean enable, WorkSource workSource, Message response) {} 1565 1566 /** 1567 * To be deleted 1568 */ setLocationUpdates(boolean enable, Message response)1569 default void setLocationUpdates(boolean enable, Message response) {} 1570 1571 /** 1572 * Gets the default SMSC address. 1573 * 1574 * @param result Callback message contains the SMSC address. 1575 */ 1576 @UnsupportedAppUsage getSmscAddress(Message result)1577 void getSmscAddress(Message result); 1578 1579 /** 1580 * Sets the default SMSC address. 1581 * 1582 * @param address new SMSC address 1583 * @param result Callback message is empty on completion 1584 */ 1585 @UnsupportedAppUsage setSmscAddress(String address, Message result)1586 void setSmscAddress(String address, Message result); 1587 1588 /** 1589 * Indicates whether there is storage available for new SMS messages. 1590 * @param available true if storage is available 1591 * @param result callback message 1592 */ 1593 @UnsupportedAppUsage reportSmsMemoryStatus(boolean available, Message result)1594 void reportSmsMemoryStatus(boolean available, Message result); 1595 1596 /** 1597 * Indicates to the vendor ril that StkService is running 1598 * and is ready to receive RIL_UNSOL_STK_XXXX commands. 1599 * 1600 * @param result callback message 1601 */ 1602 @UnsupportedAppUsage reportStkServiceIsRunning(Message result)1603 void reportStkServiceIsRunning(Message result); 1604 1605 @UnsupportedAppUsage invokeOemRilRequestRaw(byte[] data, Message response)1606 void invokeOemRilRequestRaw(byte[] data, Message response); 1607 1608 /** 1609 * Sends carrier specific information to the vendor ril that can be used to 1610 * encrypt the IMSI and IMPI. 1611 * 1612 * @param publicKey the public key of the carrier used to encrypt IMSI/IMPI. 1613 * @param keyIdentifier the key identifier is optional information that is carrier 1614 * specific. 1615 * @param response callback message 1616 */ setCarrierInfoForImsiEncryption(ImsiEncryptionInfo imsiEncryptionInfo, Message response)1617 void setCarrierInfoForImsiEncryption(ImsiEncryptionInfo imsiEncryptionInfo, 1618 Message response); 1619 invokeOemRilRequestStrings(String[] strings, Message response)1620 void invokeOemRilRequestStrings(String[] strings, Message response); 1621 1622 /** 1623 * Fires when RIL_UNSOL_OEM_HOOK_RAW is received from the RIL. 1624 */ setOnUnsolOemHookRaw(Handler h, int what, Object obj)1625 void setOnUnsolOemHookRaw(Handler h, int what, Object obj); unSetOnUnsolOemHookRaw(Handler h)1626 void unSetOnUnsolOemHookRaw(Handler h); 1627 1628 /** 1629 * Send TERMINAL RESPONSE to the SIM, after processing a proactive command 1630 * sent by the SIM. 1631 * 1632 * @param contents String containing SAT/USAT response in hexadecimal 1633 * format starting with first byte of response data. See 1634 * TS 102 223 for details. 1635 * @param response Callback message 1636 */ 1637 @UnsupportedAppUsage sendTerminalResponse(String contents, Message response)1638 public void sendTerminalResponse(String contents, Message response); 1639 1640 /** 1641 * Send ENVELOPE to the SIM, after processing a proactive command sent by 1642 * the SIM. 1643 * 1644 * @param contents String containing SAT/USAT response in hexadecimal 1645 * format starting with command tag. See TS 102 223 for 1646 * details. 1647 * @param response Callback message 1648 */ 1649 @UnsupportedAppUsage sendEnvelope(String contents, Message response)1650 public void sendEnvelope(String contents, Message response); 1651 1652 /** 1653 * Send ENVELOPE to the SIM, such as an SMS-PP data download envelope 1654 * for a SIM data download message. This method has one difference 1655 * from {@link #sendEnvelope}: The SW1 and SW2 status bytes from the UICC response 1656 * are returned along with the response data. 1657 * 1658 * response.obj will be an AsyncResult 1659 * response.obj.result will be an IccIoResult on success 1660 * 1661 * @param contents String containing SAT/USAT response in hexadecimal 1662 * format starting with command tag. See TS 102 223 for 1663 * details. 1664 * @param response Callback message 1665 */ sendEnvelopeWithStatus(String contents, Message response)1666 public void sendEnvelopeWithStatus(String contents, Message response); 1667 1668 /** 1669 * Accept or reject the call setup request from SIM. 1670 * 1671 * @param accept true if the call is to be accepted, false otherwise. 1672 * @param response Callback message 1673 */ 1674 @UnsupportedAppUsage handleCallSetupRequestFromSim(boolean accept, Message response)1675 public void handleCallSetupRequestFromSim(boolean accept, Message response); 1676 1677 /** 1678 * Activate or deactivate cell broadcast SMS for GSM. 1679 * 1680 * @param activate 1681 * true = activate, false = deactivate 1682 * @param result Callback message is empty on completion 1683 */ setGsmBroadcastActivation(boolean activate, Message result)1684 public void setGsmBroadcastActivation(boolean activate, Message result); 1685 1686 /** 1687 * Configure cell broadcast SMS for GSM. 1688 * 1689 * @param response Callback message is empty on completion 1690 */ setGsmBroadcastConfig(SmsBroadcastConfigInfo[] config, Message response)1691 public void setGsmBroadcastConfig(SmsBroadcastConfigInfo[] config, Message response); 1692 1693 /** 1694 * Query the current configuration of cell broadcast SMS of GSM. 1695 * 1696 * @param response 1697 * Callback message contains the configuration from the modem 1698 * on completion 1699 */ getGsmBroadcastConfig(Message response)1700 public void getGsmBroadcastConfig(Message response); 1701 1702 //***** new Methods for CDMA support 1703 1704 /** 1705 * Request the device ESN / MEID / IMEI / IMEISV. 1706 * "response" is const char ** 1707 * [0] is IMEI if GSM subscription is available 1708 * [1] is IMEISV if GSM subscription is available 1709 * [2] is ESN if CDMA subscription is available 1710 * [3] is MEID if CDMA subscription is available 1711 */ getDeviceIdentity(Message response)1712 public void getDeviceIdentity(Message response); 1713 1714 /** 1715 * Request the device MDN / H_SID / H_NID / MIN. 1716 * "response" is const char ** 1717 * [0] is MDN if CDMA subscription is available 1718 * [1] is a comma separated list of H_SID (Home SID) in decimal format 1719 * if CDMA subscription is available 1720 * [2] is a comma separated list of H_NID (Home NID) in decimal format 1721 * if CDMA subscription is available 1722 * [3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available 1723 */ 1724 @UnsupportedAppUsage getCDMASubscription(Message response)1725 public void getCDMASubscription(Message response); 1726 1727 /** 1728 * Send Flash Code. 1729 * "response" is is NULL 1730 * [0] is a FLASH string 1731 */ sendCDMAFeatureCode(String FeatureCode, Message response)1732 public void sendCDMAFeatureCode(String FeatureCode, Message response); 1733 1734 /** Set the Phone type created */ 1735 @UnsupportedAppUsage setPhoneType(int phoneType)1736 void setPhoneType(int phoneType); 1737 1738 /** 1739 * Query the CDMA roaming preference setting 1740 * 1741 * @param response is callback message to report one of CDMA_RM_* 1742 */ queryCdmaRoamingPreference(Message response)1743 void queryCdmaRoamingPreference(Message response); 1744 1745 /** 1746 * Requests to set the CDMA roaming preference 1747 * @param cdmaRoamingType one of CDMA_RM_* 1748 * @param response is callback message 1749 */ setCdmaRoamingPreference(int cdmaRoamingType, Message response)1750 void setCdmaRoamingPreference(int cdmaRoamingType, Message response); 1751 1752 /** 1753 * Requests to set the CDMA subscription mode 1754 * @param cdmaSubscriptionType one of CDMA_SUBSCRIPTION_* 1755 * @param response is callback message 1756 */ setCdmaSubscriptionSource(int cdmaSubscriptionType, Message response)1757 void setCdmaSubscriptionSource(int cdmaSubscriptionType, Message response); 1758 1759 /** 1760 * Requests to get the CDMA subscription srouce 1761 * @param response is callback message 1762 */ getCdmaSubscriptionSource(Message response)1763 void getCdmaSubscriptionSource(Message response); 1764 1765 /** 1766 * Set the TTY mode 1767 * 1768 * @param ttyMode one of the following: 1769 * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF} 1770 * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL} 1771 * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO} 1772 * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO} 1773 * @param response is callback message 1774 */ 1775 @UnsupportedAppUsage setTTYMode(int ttyMode, Message response)1776 void setTTYMode(int ttyMode, Message response); 1777 1778 /** 1779 * Query the TTY mode 1780 * (AsyncResult)response.obj).result is an int[] with element [0] set to 1781 * tty mode: 1782 * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF} 1783 * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL} 1784 * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO} 1785 * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO} 1786 * @param response is callback message 1787 */ 1788 @UnsupportedAppUsage queryTTYMode(Message response)1789 void queryTTYMode(Message response); 1790 1791 /** 1792 * Setup a packet data connection On successful completion, the result 1793 * message will return a SetupDataResult object containing the connection information. 1794 * 1795 * @param accessNetworkType 1796 * Access network to use. Values is one of AccessNetworkConstants.AccessNetworkType. 1797 * @param dataProfile 1798 * Data profile for data call setup 1799 * @param isRoaming 1800 * Device is roaming or not 1801 * @param allowRoaming 1802 * Flag indicating data roaming is enabled or not 1803 * @param reason 1804 * The reason for data setup 1805 * @param linkProperties 1806 * If the reason is for handover, this indicates the link properties of the existing 1807 * data connection 1808 * @param result 1809 * Callback message 1810 */ setupDataCall(int accessNetworkType, DataProfile dataProfile, boolean isRoaming, boolean allowRoaming, int reason, LinkProperties linkProperties, Message result)1811 void setupDataCall(int accessNetworkType, DataProfile dataProfile, boolean isRoaming, 1812 boolean allowRoaming, int reason, LinkProperties linkProperties, 1813 Message result); 1814 1815 /** 1816 * Deactivate packet data connection 1817 * 1818 * @param cid 1819 * The connection ID 1820 * @param reason 1821 * Data disconnect reason. 1822 * @param result 1823 * Callback message is empty on completion 1824 */ deactivateDataCall(int cid, int reason, Message result)1825 public void deactivateDataCall(int cid, int reason, Message result); 1826 1827 /** 1828 * Activate or deactivate cell broadcast SMS for CDMA. 1829 * 1830 * @param activate 1831 * true = activate, false = deactivate 1832 * @param result 1833 * Callback message is empty on completion 1834 */ 1835 @UnsupportedAppUsage setCdmaBroadcastActivation(boolean activate, Message result)1836 public void setCdmaBroadcastActivation(boolean activate, Message result); 1837 1838 /** 1839 * Configure cdma cell broadcast SMS. 1840 * 1841 * @param response 1842 * Callback message is empty on completion 1843 */ setCdmaBroadcastConfig(CdmaSmsBroadcastConfigInfo[] configs, Message response)1844 public void setCdmaBroadcastConfig(CdmaSmsBroadcastConfigInfo[] configs, Message response); 1845 1846 /** 1847 * Query the current configuration of cdma cell broadcast SMS. 1848 * 1849 * @param result 1850 * Callback message contains the configuration from the modem on completion 1851 */ 1852 @UnsupportedAppUsage getCdmaBroadcastConfig(Message result)1853 public void getCdmaBroadcastConfig(Message result); 1854 1855 /** 1856 * Requests the radio's system selection module to exit emergency callback mode. 1857 * This function should only be called from for CDMA. 1858 * 1859 * @param response callback message 1860 */ 1861 @UnsupportedAppUsage exitEmergencyCallbackMode(Message response)1862 public void exitEmergencyCallbackMode(Message response); 1863 1864 /** 1865 * Request the status of the ICC and UICC cards. 1866 * 1867 * @param result 1868 * Callback message containing {@link IccCardStatus} structure for the card. 1869 */ 1870 @UnsupportedAppUsage getIccCardStatus(Message result)1871 public void getIccCardStatus(Message result); 1872 1873 /** 1874 * Request the status of all the physical UICC slots. 1875 * 1876 * @param result Callback message containing a {@link java.util.ArrayList} of 1877 * {@link com.android.internal.telephony.uicc.IccSlotStatus} instances for all the slots. 1878 */ getIccSlotsStatus(Message result)1879 void getIccSlotsStatus(Message result); 1880 1881 /** 1882 * Set the mapping from logical slots to physical slots. 1883 * 1884 * @param physicalSlots Mapping from logical slots to physical slots. 1885 * @param result Callback message is empty on completion. 1886 */ setLogicalToPhysicalSlotMapping(int[] physicalSlots, Message result)1887 void setLogicalToPhysicalSlotMapping(int[] physicalSlots, Message result); 1888 1889 /** 1890 * Request the SIM application on the UICC to perform authentication 1891 * challenge/response algorithm. The data string and challenge response are 1892 * Base64 encoded Strings. 1893 * Can support EAP-SIM, EAP-AKA with results encoded per 3GPP TS 31.102. 1894 * 1895 * @param authContext is the P2 parameter that specifies the authentication context per 3GPP TS 1896 * 31.102 (Section 7.1.2) 1897 * @param data authentication challenge data 1898 * @param aid used to determine which application/slot to send the auth command to. See ETSI 1899 * 102.221 8.1 and 101.220 4 1900 * @param response a callback message with the String response in the obj field 1901 */ 1902 @UnsupportedAppUsage requestIccSimAuthentication(int authContext, String data, String aid, Message response)1903 public void requestIccSimAuthentication(int authContext, String data, String aid, Message response); 1904 1905 /** 1906 * Get the current Voice Radio Technology. 1907 * 1908 * AsyncResult.result is an int array with the first value 1909 * being one of the ServiceState.RIL_RADIO_TECHNOLOGY_xxx values. 1910 * 1911 * @param result is sent back to handler and result.obj is a AsyncResult 1912 */ getVoiceRadioTechnology(Message result)1913 void getVoiceRadioTechnology(Message result); 1914 1915 /** 1916 * Return the current set of CellInfo records 1917 * 1918 * AsyncResult.result is a of Collection<CellInfo> 1919 * 1920 * @param result is sent back to handler and result.obj is a AsyncResult 1921 * @param workSource calling WorkSource 1922 */ getCellInfoList(Message result, WorkSource workSource)1923 default void getCellInfoList(Message result, WorkSource workSource) {} 1924 1925 /** 1926 * Sets the minimum time in milli-seconds between when RIL_UNSOL_CELL_INFO_LIST 1927 * should be invoked. 1928 * 1929 * The default, 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported 1930 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue 1931 * A RIL_UNSOL_CELL_INFO_LIST. 1932 * 1933 * 1934 1935 * @param rateInMillis is sent back to handler and result.obj is a AsyncResult 1936 * @param response.obj is AsyncResult ar when sent to associated handler 1937 * ar.exception carries exception on failure or null on success 1938 * otherwise the error. 1939 * @param workSource calling WorkSource 1940 */ setCellInfoListRate(int rateInMillis, Message response, WorkSource workSource)1941 default void setCellInfoListRate(int rateInMillis, Message response, WorkSource workSource){} 1942 1943 /** 1944 * Fires when RIL_UNSOL_CELL_INFO_LIST is received from the RIL. 1945 */ 1946 @UnsupportedAppUsage registerForCellInfoList(Handler h, int what, Object obj)1947 void registerForCellInfoList(Handler h, int what, Object obj); unregisterForCellInfoList(Handler h)1948 void unregisterForCellInfoList(Handler h); 1949 1950 /** 1951 * Fires when a new {@link android.telephony.PhysicalChannelConfig} list is received from the 1952 * RIL. 1953 */ registerForPhysicalChannelConfiguration(Handler h, int what, Object obj)1954 void registerForPhysicalChannelConfiguration(Handler h, int what, Object obj); 1955 1956 /** 1957 * Unregisters the handler for {@link android.telephony.PhysicalChannelConfig} updates. 1958 */ unregisterForPhysicalChannelConfiguration(Handler h)1959 void unregisterForPhysicalChannelConfiguration(Handler h); 1960 1961 /** 1962 * Set Initial Attach Apn 1963 * 1964 * @param dataProfile 1965 * data profile for initial APN attach 1966 * @param isRoaming 1967 * indicating the device is roaming or not 1968 * @param result 1969 * callback message contains the information of SUCCESS/FAILURE 1970 */ setInitialAttachApn(DataProfile dataProfile, boolean isRoaming, Message result)1971 void setInitialAttachApn(DataProfile dataProfile, boolean isRoaming, Message result); 1972 1973 /** 1974 * Set data profiles in modem 1975 * 1976 * @param dps 1977 * Array of the data profiles set to modem 1978 * @param isRoaming 1979 * Indicating if the device is roaming or not 1980 * @param result 1981 * callback message contains the information of SUCCESS/FAILURE 1982 */ setDataProfile(DataProfile[] dps, boolean isRoaming, Message result)1983 void setDataProfile(DataProfile[] dps, boolean isRoaming, Message result); 1984 1985 /** 1986 * Notifiy that we are testing an emergency call 1987 */ testingEmergencyCall()1988 public void testingEmergencyCall(); 1989 1990 /** 1991 * Open a logical channel to the SIM. 1992 * 1993 * Input parameters equivalent to TS 27.007 AT+CCHO command. 1994 * 1995 * @param AID Application id. See ETSI 102.221 and 101.220. 1996 * @param p2 P2 parameter (described in ISO 7816-4). 1997 * @param response Callback message. response.obj will be an int [1] with 1998 * element [0] set to the id of the logical channel. 1999 */ iccOpenLogicalChannel(String AID, int p2, Message response)2000 public void iccOpenLogicalChannel(String AID, int p2, Message response); 2001 2002 /** 2003 * Close a previously opened logical channel to the SIM. 2004 * 2005 * Input parameters equivalent to TS 27.007 AT+CCHC command. 2006 * 2007 * @param channel Channel id. Id of the channel to be closed. 2008 * @param response Callback message. 2009 */ iccCloseLogicalChannel(int channel, Message response)2010 public void iccCloseLogicalChannel(int channel, Message response); 2011 2012 /** 2013 * Exchange APDUs with the SIM on a logical channel. 2014 * 2015 * Input parameters equivalent to TS 27.007 AT+CGLA command. 2016 * 2017 * @param channel Channel id of the channel to use for communication. Has to 2018 * be greater than zero. 2019 * @param cla Class of the APDU command. 2020 * @param instruction Instruction of the APDU command. 2021 * @param p1 P1 value of the APDU command. 2022 * @param p2 P2 value of the APDU command. 2023 * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU 2024 * is sent to the SIM. 2025 * @param data Data to be sent with the APDU. 2026 * @param response Callback message. response.obj.userObj will be 2027 * an IccIoResult on success. 2028 */ iccTransmitApduLogicalChannel(int channel, int cla, int instruction, int p1, int p2, int p3, String data, Message response)2029 public void iccTransmitApduLogicalChannel(int channel, int cla, int instruction, 2030 int p1, int p2, int p3, String data, Message response); 2031 2032 /** 2033 * Exchange APDUs with the SIM on a basic channel. 2034 * 2035 * Input parameters equivalent to TS 27.007 AT+CSIM command. 2036 * 2037 * @param cla Class of the APDU command. 2038 * @param instruction Instruction of the APDU command. 2039 * @param p1 P1 value of the APDU command. 2040 * @param p2 P2 value of the APDU command. 2041 * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU 2042 * is sent to the SIM. 2043 * @param data Data to be sent with the APDU. 2044 * @param response Callback message. response.obj.userObj will be 2045 * an IccIoResult on success. 2046 */ iccTransmitApduBasicChannel(int cla, int instruction, int p1, int p2, int p3, String data, Message response)2047 public void iccTransmitApduBasicChannel(int cla, int instruction, int p1, int p2, 2048 int p3, String data, Message response); 2049 2050 /** 2051 * Read one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}. 2052 * Used for device configuration by some CDMA operators. 2053 * 2054 * @param itemID the ID of the item to read 2055 * @param response callback message with the String response in the obj field 2056 * @param workSource calling WorkSource 2057 */ nvReadItem(int itemID, Message response, WorkSource workSource)2058 default void nvReadItem(int itemID, Message response, WorkSource workSource) {} 2059 2060 /** 2061 * Write one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}. 2062 * Used for device configuration by some CDMA operators. 2063 * 2064 * @param itemID the ID of the item to read 2065 * @param itemValue the value to write, as a String 2066 * @param response Callback message. 2067 * @param workSource calling WorkSource 2068 */ nvWriteItem(int itemID, String itemValue, Message response, WorkSource workSource)2069 default void nvWriteItem(int itemID, String itemValue, Message response, 2070 WorkSource workSource) {} 2071 2072 /** 2073 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage. 2074 * Used for device configuration by some CDMA operators. 2075 * 2076 * @param preferredRoamingList byte array containing the new PRL 2077 * @param response Callback message. 2078 */ nvWriteCdmaPrl(byte[] preferredRoamingList, Message response)2079 void nvWriteCdmaPrl(byte[] preferredRoamingList, Message response); 2080 2081 /** 2082 * Perform the specified type of NV config reset. The radio will be taken offline 2083 * and the device must be rebooted after erasing the NV. Used for device 2084 * configuration by some CDMA operators. 2085 * 2086 * @param resetType reset type: 1: reload NV reset, 2: erase NV reset, 3: factory NV reset 2087 * @param response Callback message. 2088 */ nvResetConfig(int resetType, Message response)2089 void nvResetConfig(int resetType, Message response); 2090 2091 /** 2092 * returned message 2093 * retMsg.obj = AsyncResult ar 2094 * ar.exception carries exception on failure 2095 * ar.userObject contains the orignal value of result.obj 2096 * ar.result contains a List of HardwareConfig 2097 */ getHardwareConfig(Message result)2098 void getHardwareConfig (Message result); 2099 2100 /** 2101 * @return version of the ril. 2102 */ getRilVersion()2103 int getRilVersion(); 2104 2105 /** 2106 * Sets user selected subscription at Modem. 2107 * 2108 * @param slotId 2109 * Slot. 2110 * @param appIndex 2111 * Application index in the card. 2112 * @param subId 2113 * Indicates subscription 0 or subscription 1. 2114 * @param subStatus 2115 * Activation status, 1 = activate and 0 = deactivate. 2116 * @param result 2117 * Callback message contains the information of SUCCESS/FAILURE. 2118 */ 2119 // FIXME Update the doc and consider modifying the request to make more generic. 2120 @UnsupportedAppUsage setUiccSubscription(int slotId, int appIndex, int subId, int subStatus, Message result)2121 public void setUiccSubscription(int slotId, int appIndex, int subId, int subStatus, 2122 Message result); 2123 2124 /** 2125 * Tells the modem if data is allowed or not. 2126 * 2127 * @param allowed 2128 * true = allowed, false = not alowed 2129 * @param result 2130 * Callback message contains the information of SUCCESS/FAILURE. 2131 */ 2132 // FIXME We may need to pass AID and slotid also 2133 @UnsupportedAppUsage setDataAllowed(boolean allowed, Message result)2134 public void setDataAllowed(boolean allowed, Message result); 2135 2136 /** 2137 * Inform RIL that the device is shutting down 2138 * 2139 * @param result Callback message contains the information of SUCCESS/FAILURE 2140 */ 2141 @UnsupportedAppUsage requestShutdown(Message result)2142 public void requestShutdown(Message result); 2143 2144 /** 2145 * Set phone radio type and access technology. 2146 * 2147 * @param rc the phone radio capability defined in 2148 * RadioCapability. It's a input object used to transfer parameter to logic modem 2149 * 2150 * @param result Callback message. 2151 */ setRadioCapability(RadioCapability rc, Message result)2152 public void setRadioCapability(RadioCapability rc, Message result); 2153 2154 /** 2155 * Get phone radio capability 2156 * 2157 * @param result Callback message. 2158 */ getRadioCapability(Message result)2159 public void getRadioCapability(Message result); 2160 2161 /** 2162 * Registers the handler when phone radio capability is changed. 2163 * 2164 * @param h Handler for notification message. 2165 * @param what User-defined message code. 2166 * @param obj User object. 2167 */ registerForRadioCapabilityChanged(Handler h, int what, Object obj)2168 public void registerForRadioCapabilityChanged(Handler h, int what, Object obj); 2169 2170 /** 2171 * Unregister for notifications when phone radio capability is changed. 2172 * 2173 * @param h Handler to be removed from the registrant list. 2174 */ unregisterForRadioCapabilityChanged(Handler h)2175 public void unregisterForRadioCapabilityChanged(Handler h); 2176 2177 /** 2178 * Start LCE (Link Capacity Estimation) service with a desired reporting interval. 2179 * 2180 * @param reportIntervalMs 2181 * LCE info reporting interval (ms). 2182 * 2183 * @param result Callback message contains the current LCE status. 2184 * {byte status, int actualIntervalMs} 2185 */ startLceService(int reportIntervalMs, boolean pullMode, Message result)2186 public void startLceService(int reportIntervalMs, boolean pullMode, Message result); 2187 2188 /** 2189 * Stop LCE service. 2190 * 2191 * @param result Callback message contains the current LCE status: 2192 * {byte status, int actualIntervalMs} 2193 * 2194 */ stopLceService(Message result)2195 public void stopLceService(Message result); 2196 2197 /** 2198 * Pull LCE service for capacity data. 2199 * 2200 * @param result Callback message contains the capacity info: 2201 * {int capacityKbps, byte confidenceLevel, byte lceSuspendedTemporarily} 2202 */ pullLceData(Message result)2203 public void pullLceData(Message result); 2204 2205 /** 2206 * Register a LCE info listener. 2207 * 2208 * @param h Handler for notification message. 2209 * @param what User-defined message code. 2210 * @param obj User object. 2211 */ registerForLceInfo(Handler h, int what, Object obj)2212 void registerForLceInfo(Handler h, int what, Object obj); 2213 2214 /** 2215 * Unregister the LCE Info listener. 2216 * 2217 * @param h handle to be removed. 2218 */ unregisterForLceInfo(Handler h)2219 void unregisterForLceInfo(Handler h); 2220 2221 /** 2222 * 2223 * Get modem activity info and stats 2224 * 2225 * @param result Callback message contains the modem activity information 2226 * @param workSource calling WorkSource 2227 */ getModemActivityInfo(Message result, WorkSource workSource)2228 default void getModemActivityInfo(Message result, WorkSource workSource) {} 2229 2230 /** 2231 * Set allowed carriers 2232 * 2233 * @param carriers Allowed carriers 2234 * @param result Callback message contains the result of the operation 2235 * @param workSource calling WorkSource 2236 */ setAllowedCarriers(CarrierRestrictionRules carrierRestrictionRules, Message result, WorkSource workSource)2237 default void setAllowedCarriers(CarrierRestrictionRules carrierRestrictionRules, 2238 Message result, WorkSource workSource) {} 2239 2240 /** 2241 * Get allowed carriers 2242 * 2243 * @param result Callback message contains the allowed carriers 2244 * @param workSource calling WorkSource 2245 */ getAllowedCarriers(Message result, WorkSource workSource)2246 default void getAllowedCarriers(Message result, WorkSource workSource) {} 2247 2248 /** 2249 * Register for unsolicited PCO data. This information is carrier-specific, 2250 * opaque binary blobs destined for carrier apps for interpretation. 2251 * 2252 * @param h Handler for notification message. 2253 * @param what User-defined message code. 2254 * @param obj User object. 2255 */ registerForPcoData(Handler h, int what, Object obj)2256 public void registerForPcoData(Handler h, int what, Object obj); 2257 2258 /** 2259 * Unregister for PCO data. 2260 * 2261 * @param h handler to be removed 2262 */ unregisterForPcoData(Handler h)2263 public void unregisterForPcoData(Handler h); 2264 2265 /** 2266 * Register for modem reset indication. 2267 * 2268 * @param h Handler for the notification message 2269 * @param what User-defined message code 2270 * @param obj User object 2271 */ registerForModemReset(Handler h, int what, Object obj)2272 void registerForModemReset(Handler h, int what, Object obj); 2273 2274 /** 2275 * Unregister for modem reset 2276 * 2277 * @param h handler to be removed 2278 */ unregisterForModemReset(Handler h)2279 void unregisterForModemReset(Handler h); 2280 2281 /** 2282 * Send the updated device state 2283 * 2284 * @param stateType Device state type 2285 * @param state True if enabled, otherwise disabled 2286 * @param result callback message contains the information of SUCCESS/FAILURE 2287 */ sendDeviceState(int stateType, boolean state, Message result)2288 void sendDeviceState(int stateType, boolean state, Message result); 2289 2290 /** 2291 * Send the device state to the modem 2292 * 2293 * @param filter unsolicited response filter. See DeviceStateMonitor.UnsolicitedResponseFilter 2294 * @param result callback message contains the information of SUCCESS/FAILURE 2295 */ setUnsolResponseFilter(int filter, Message result)2296 void setUnsolResponseFilter(int filter, Message result); 2297 2298 /** 2299 * Sets the signal strength reporting criteria. 2300 * 2301 * The resulting reporting rules are the AND of all the supplied criteria. For each RAN 2302 * The hysteresisDb and thresholds apply to only the following measured quantities: 2303 * -GERAN - RSSI 2304 * -CDMA2000 - RSSI 2305 * -UTRAN - RSCP 2306 * -EUTRAN - RSRP/RSRQ/RSSNR 2307 * -NGRAN - SSRSRP/SSRSRQ/SSSINR 2308 * 2309 * Note: Reporting criteria must be individually set for each RAN. For any unset reporting 2310 * criteria, the value is implementation-defined. 2311 * 2312 * Response callback is 2313 * IRadioResponse.setSignalStrengthReportingCriteriaResponse_1_5() 2314 * 2315 * @param signalThresholdInfo Signal threshold info including the threshold values, 2316 * hysteresisDb, and hysteresisMs. See @1.5::SignalThresholdInfo 2317 * for details. 2318 * @param ran The type of network for which to apply these thresholds. 2319 * @param result callback message contains the information of SUCCESS/FAILURE 2320 */ setSignalStrengthReportingCriteria(SignalThresholdInfo signalThresholdInfo, int ran, Message result)2321 void setSignalStrengthReportingCriteria(SignalThresholdInfo signalThresholdInfo, int ran, 2322 Message result); 2323 2324 /** 2325 * Send the link capacity reporting criteria to the modem 2326 * 2327 * @param hysteresisMs A hysteresis time in milliseconds. A value of 0 disables hysteresis. 2328 * @param hysteresisDlKbps An interval in kbps defining the required magnitude change between DL 2329 * reports. A value of 0 disables hysteresis. 2330 * @param hysteresisUlKbps An interval in kbps defining the required magnitude change between UL 2331 * reports. A value of 0 disables hysteresis. 2332 * @param thresholdsDlKbps An array of trigger thresholds in kbps for downlink reports. A size 2333 * of 0 disables thresholds. 2334 * @param thresholdsUlKbps An array of trigger thresholds in kbps for uplink reports. A size 2335 * of 0 disables thresholds. 2336 * @param ran RadioAccessNetwork for which to apply criteria. 2337 * @param result callback message contains the information of SUCCESS/FAILURE 2338 */ setLinkCapacityReportingCriteria(int hysteresisMs, int hysteresisDlKbps, int hysteresisUlKbps, int[] thresholdsDlKbps, int[] thresholdsUlKbps, int ran, Message result)2339 void setLinkCapacityReportingCriteria(int hysteresisMs, int hysteresisDlKbps, 2340 int hysteresisUlKbps, int[] thresholdsDlKbps, int[] thresholdsUlKbps, int ran, 2341 Message result); 2342 2343 /** 2344 * Set SIM card power up or down 2345 * 2346 * @param state State of SIM (power down, power up, pass through) 2347 * - {@link android.telephony.TelephonyManager#CARD_POWER_DOWN} 2348 * - {@link android.telephony.TelephonyManager#CARD_POWER_UP} 2349 * - {@link android.telephony.TelephonyManager#CARD_POWER_UP_PASS_THROUGH} 2350 * @param result callback message contains the information of SUCCESS/FAILURE 2351 * @param workSource calling WorkSource 2352 */ setSimCardPower(int state, Message result, WorkSource workSource)2353 default void setSimCardPower(int state, Message result, WorkSource workSource) {} 2354 2355 /** 2356 * Register for unsolicited Carrier Public Key. 2357 * 2358 * @param h Handler for notification message. 2359 * @param what User-defined message code. 2360 * @param obj User object. 2361 */ registerForCarrierInfoForImsiEncryption(Handler h, int what, Object obj)2362 void registerForCarrierInfoForImsiEncryption(Handler h, int what, Object obj); 2363 2364 /** 2365 * DeRegister for unsolicited Carrier Public Key. 2366 * 2367 * @param h Handler for notification message. 2368 */ unregisterForCarrierInfoForImsiEncryption(Handler h)2369 void unregisterForCarrierInfoForImsiEncryption(Handler h); 2370 2371 /** 2372 * Register for unsolicited Network Scan result. 2373 * 2374 * @param h Handler for notification message. 2375 * @param what User-defined message code. 2376 * @param obj User object. 2377 */ registerForNetworkScanResult(Handler h, int what, Object obj)2378 void registerForNetworkScanResult(Handler h, int what, Object obj); 2379 2380 /** 2381 * DeRegister for unsolicited Network Scan result. 2382 * 2383 * @param h Handler for notification message. 2384 */ unregisterForNetworkScanResult(Handler h)2385 void unregisterForNetworkScanResult(Handler h); 2386 2387 /** 2388 * Register for unsolicited NATT Keepalive Status Indications 2389 * 2390 * @param h Handler for notification message. 2391 * @param what User-defined message code. 2392 * @param obj User object. 2393 */ registerForNattKeepaliveStatus(Handler h, int what, Object obj)2394 void registerForNattKeepaliveStatus(Handler h, int what, Object obj); 2395 2396 /** 2397 * Deregister for unsolicited NATT Keepalive Status Indications. 2398 * 2399 * @param h Handler for notification message. 2400 */ unregisterForNattKeepaliveStatus(Handler h)2401 void unregisterForNattKeepaliveStatus(Handler h); 2402 2403 /** 2404 * Register for unsolicited Emergency Number List Indications 2405 * 2406 * @param h Handler for notification message. 2407 * @param what User-defined message code. 2408 * @param obj User object. 2409 */ registerForEmergencyNumberList(Handler h, int what, Object obj)2410 void registerForEmergencyNumberList(Handler h, int what, Object obj); 2411 2412 /** 2413 * Deregister for unsolicited Emergency Number List Indications 2414 * 2415 * @param h Handler for notification message. 2416 */ unregisterForEmergencyNumberList(Handler h)2417 void unregisterForEmergencyNumberList(Handler h); 2418 2419 /** 2420 * Start sending NATT Keepalive packets on a specified data connection 2421 * 2422 * @param contextId cid that identifies the data connection for this keepalive 2423 * @param packetData the keepalive packet data description 2424 * @param intervalMillis a time interval in ms between keepalive packet transmissions 2425 * @param result a Message to return to the requester 2426 */ startNattKeepalive( int contextId, KeepalivePacketData packetData, int intervalMillis, Message result)2427 void startNattKeepalive( 2428 int contextId, KeepalivePacketData packetData, int intervalMillis, Message result); 2429 2430 /** 2431 * Stop sending NATT Keepalive packets on a specified data connection 2432 * 2433 * @param sessionHandle the keepalive session handle (from the modem) to stop 2434 * @param result a Message to return to the requester 2435 */ stopNattKeepalive(int sessionHandle, Message result)2436 void stopNattKeepalive(int sessionHandle, Message result); 2437 2438 /** 2439 * Enable or disable the logical modem. 2440 * 2441 * @param enable whether to enable or disable the modem 2442 * @param result a Message to return to the requester 2443 */ enableModem(boolean enable, Message result)2444 default void enableModem(boolean enable, Message result) {}; 2445 2446 /** 2447 * Notify CommandsInterface that whether its corresponding slot is active or not. If not, 2448 * it means it has no RIL service or logical modem to connect to. 2449 * 2450 * @param active whether there's a matching active SIM slot. 2451 */ onSlotActiveStatusChange(boolean active)2452 default void onSlotActiveStatusChange(boolean active) {} 2453 2454 /** 2455 * Query whether logical modem is enabled or disabled 2456 * 2457 * @param result a Message to return to the requester 2458 */ getModemStatus(Message result)2459 default void getModemStatus(Message result) {}; 2460 2461 /** 2462 * Enable or disable uicc applications on the SIM. 2463 * 2464 * @param enable enable or disable UiccApplications on the SIM. 2465 * @param onCompleteMessage a Message to return to the requester 2466 */ enableUiccApplications(boolean enable, Message onCompleteMessage)2467 default void enableUiccApplications(boolean enable, Message onCompleteMessage) {} 2468 2469 /** 2470 * Specify which bands modem's background scan must act on. 2471 * If {@code specifiers} is non-empty, the scan will be restricted to the bands specified. 2472 * Otherwise, it scans all bands. 2473 * 2474 * For example, CBRS is only on LTE band 48. By specifying this band, 2475 * modem saves more power. 2476 * 2477 * @param specifiers which bands to scan. 2478 * @param onComplete a message to send when complete. 2479 */ setSystemSelectionChannels(@onNull List<RadioAccessSpecifier> specifiers, Message onComplete)2480 default void setSystemSelectionChannels(@NonNull List<RadioAccessSpecifier> specifiers, 2481 Message onComplete) {} 2482 2483 /** 2484 * Whether uicc applications are enabled or not. 2485 * 2486 * @param onCompleteMessage a Message to return to the requester 2487 */ areUiccApplicationsEnabled(Message onCompleteMessage)2488 default void areUiccApplicationsEnabled(Message onCompleteMessage) {} 2489 2490 /** 2491 * Whether {@link #enableUiccApplications} is supported, based on IRadio version. 2492 */ canToggleUiccApplicationsEnablement()2493 default boolean canToggleUiccApplicationsEnablement() { 2494 return false; 2495 } 2496 getClientRequestStats()2497 default List<ClientRequestStats> getClientRequestStats() { 2498 return null; 2499 } 2500 2501 /** 2502 * Registers the handler for RIL_UNSOL_BARRING_INFO_CHANGED events. 2503 * 2504 * @param h Handler for notification message. 2505 * @param what User-defined message code. 2506 * @param obj User object. 2507 */ registerForBarringInfoChanged(Handler h, int what, Object obj)2508 default void registerForBarringInfoChanged(Handler h, int what, Object obj) {}; 2509 2510 /** 2511 * Unregisters the handler for RIL_UNSOL_BARRING_INFO_CHANGED events. 2512 * 2513 * @param h Handler for notification message. 2514 */ unregisterForBarringInfoChanged(Handler h)2515 default void unregisterForBarringInfoChanged(Handler h) {}; 2516 2517 /** 2518 * Get all the barring info for the current camped cell applicable to the current user. 2519 * 2520 * AsyncResult.result is the object of {@link android.telephony.BarringInfo}. 2521 * 2522 * @param result Message will be sent back to handler and result.obj will be the AsycResult. 2523 */ getBarringInfo(Message result)2524 default void getBarringInfo(Message result) {}; 2525 } 2526