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