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 com.android.internal.telephony.gsm.SmsBroadcastConfigInfo; 20 21 import android.os.Message; 22 import android.os.Handler; 23 24 /** 25 * {@hide} 26 */ 27 public interface CommandsInterface { 28 enum RadioState { 29 RADIO_OFF(0), /* Radio explictly powered off (eg CFUN=0) */ 30 RADIO_UNAVAILABLE(0), /* Radio unavailable (eg, resetting or not booted) */ 31 SIM_NOT_READY(1), /* Radio is on, but the SIM interface is not ready */ 32 SIM_LOCKED_OR_ABSENT(1), /* SIM PIN locked, PUK required, network 33 personalization, or SIM absent */ 34 SIM_READY(1), /* Radio is on and SIM interface is available */ 35 RUIM_NOT_READY(2), /* Radio is on, but the RUIM interface is not ready */ 36 RUIM_READY(2), /* Radio is on and the RUIM interface is available */ 37 RUIM_LOCKED_OR_ABSENT(2), /* RUIM PIN locked, PUK required, network 38 personalization locked, or RUIM absent */ 39 NV_NOT_READY(3), /* Radio is on, but the NV interface is not available */ 40 NV_READY(3); /* Radio is on and the NV interface is available */ 41 42 public boolean isOn() /* and available...*/ { 43 return this == SIM_NOT_READY 44 || this == SIM_LOCKED_OR_ABSENT 45 || this == SIM_READY 46 || this == RUIM_NOT_READY 47 || this == RUIM_READY 48 || this == RUIM_LOCKED_OR_ABSENT 49 || this == NV_NOT_READY 50 || this == NV_READY; 51 } 52 private int stateType; 53 private RadioState (int type) { 54 stateType = type; 55 } 56 57 public int getType() { 58 return stateType; 59 } 60 61 public boolean isAvailable() { 62 return this != RADIO_UNAVAILABLE; 63 } 64 65 public boolean isSIMReady() { 66 return this == SIM_READY; 67 } 68 69 public boolean isRUIMReady() { 70 return this == RUIM_READY; 71 } 72 73 public boolean isNVReady() { 74 return this == NV_READY; 75 } 76 77 public boolean isGsm() { 78 if (BaseCommands.getLteOnCdmaModeStatic() == Phone.LTE_ON_CDMA_TRUE) { 79 return false; 80 } else { 81 return this == SIM_NOT_READY 82 || this == SIM_LOCKED_OR_ABSENT 83 || this == SIM_READY; 84 } 85 } 86 87 public boolean isCdma() { 88 if (BaseCommands.getLteOnCdmaModeStatic() == Phone.LTE_ON_CDMA_TRUE) { 89 return true; 90 } else { 91 return this == RUIM_NOT_READY 92 || this == RUIM_READY 93 || this == RUIM_LOCKED_OR_ABSENT 94 || this == NV_NOT_READY 95 || this == NV_READY; 96 } 97 } 98 } 99 100 //***** Constants 101 102 // Used as parameter to dial() and setCLIR() below 103 static final int CLIR_DEFAULT = 0; // "use subscription default value" 104 static final int CLIR_INVOCATION = 1; // (restrict CLI presentation) 105 static final int CLIR_SUPPRESSION = 2; // (allow CLI presentation) 106 107 108 // Used as parameters for call forward methods below 109 static final int CF_ACTION_DISABLE = 0; 110 static final int CF_ACTION_ENABLE = 1; 111 // static final int CF_ACTION_UNUSED = 2; 112 static final int CF_ACTION_REGISTRATION = 3; 113 static final int CF_ACTION_ERASURE = 4; 114 115 static final int CF_REASON_UNCONDITIONAL = 0; 116 static final int CF_REASON_BUSY = 1; 117 static final int CF_REASON_NO_REPLY = 2; 118 static final int CF_REASON_NOT_REACHABLE = 3; 119 static final int CF_REASON_ALL = 4; 120 static final int CF_REASON_ALL_CONDITIONAL = 5; 121 122 // Used for call barring methods below 123 static final String CB_FACILITY_BAOC = "AO"; 124 static final String CB_FACILITY_BAOIC = "OI"; 125 static final String CB_FACILITY_BAOICxH = "OX"; 126 static final String CB_FACILITY_BAIC = "AI"; 127 static final String CB_FACILITY_BAICr = "IR"; 128 static final String CB_FACILITY_BA_ALL = "AB"; 129 static final String CB_FACILITY_BA_MO = "AG"; 130 static final String CB_FACILITY_BA_MT = "AC"; 131 static final String CB_FACILITY_BA_SIM = "SC"; 132 static final String CB_FACILITY_BA_FD = "FD"; 133 134 135 // Used for various supp services apis 136 // See 27.007 +CCFC or +CLCK 137 static final int SERVICE_CLASS_NONE = 0; // no user input 138 static final int SERVICE_CLASS_VOICE = (1 << 0); 139 static final int SERVICE_CLASS_DATA = (1 << 1); //synonym for 16+32+64+128 140 static final int SERVICE_CLASS_FAX = (1 << 2); 141 static final int SERVICE_CLASS_SMS = (1 << 3); 142 static final int SERVICE_CLASS_DATA_SYNC = (1 << 4); 143 static final int SERVICE_CLASS_DATA_ASYNC = (1 << 5); 144 static final int SERVICE_CLASS_PACKET = (1 << 6); 145 static final int SERVICE_CLASS_PAD = (1 << 7); 146 static final int SERVICE_CLASS_MAX = (1 << 7); // Max SERVICE_CLASS value 147 148 // Numeric representation of string values returned 149 // by messages sent to setOnUSSD handler 150 static final int USSD_MODE_NOTIFY = 0; 151 static final int USSD_MODE_REQUEST = 1; 152 153 // SIM Refresh results, passed up from RIL. 154 static final int SIM_REFRESH_FILE_UPDATED = 0; // Single file updated 155 static final int SIM_REFRESH_INIT = 1; // SIM initialized; reload all 156 static final int SIM_REFRESH_RESET = 2; // SIM reset; may be locked 157 158 // GSM SMS fail cause for acknowledgeLastIncomingSMS. From TS 23.040, 9.2.3.22. 159 static final int GSM_SMS_FAIL_CAUSE_MEMORY_CAPACITY_EXCEEDED = 0xD3; 160 static final int GSM_SMS_FAIL_CAUSE_USIM_APP_TOOLKIT_BUSY = 0xD4; 161 static final int GSM_SMS_FAIL_CAUSE_USIM_DATA_DOWNLOAD_ERROR = 0xD5; 162 static final int GSM_SMS_FAIL_CAUSE_UNSPECIFIED_ERROR = 0xFF; 163 164 // CDMA SMS fail cause for acknowledgeLastIncomingCdmaSms. From TS N.S0005, 6.5.2.125. 165 static final int CDMA_SMS_FAIL_CAUSE_INVALID_TELESERVICE_ID = 4; 166 static final int CDMA_SMS_FAIL_CAUSE_RESOURCE_SHORTAGE = 35; 167 static final int CDMA_SMS_FAIL_CAUSE_OTHER_TERMINAL_PROBLEM = 39; 168 static final int CDMA_SMS_FAIL_CAUSE_ENCODING_PROBLEM = 96; 169 170 //***** Methods 171 172 RadioState getRadioState(); 173 RadioState getSimState(); 174 RadioState getRuimState(); 175 RadioState getNvState(); 176 177 /** 178 * Fires on any RadioState transition 179 * Always fires immediately as well 180 * 181 * do not attempt to calculate transitions by storing getRadioState() values 182 * on previous invocations of this notification. Instead, use the other 183 * registration methods 184 */ 185 void registerForRadioStateChanged(Handler h, int what, Object obj); 186 void unregisterForRadioStateChanged(Handler h); 187 188 /** 189 * Fires on any transition into RadioState.isOn() 190 * Fires immediately if currently in that state 191 * In general, actions should be idempotent. State may change 192 * before event is received. 193 */ 194 void registerForOn(Handler h, int what, Object obj); 195 void unregisterForOn(Handler h); 196 197 /** 198 * Fires on any transition out of RadioState.isAvailable() 199 * Fires immediately if currently in that state 200 * In general, actions should be idempotent. State may change 201 * before event is received. 202 */ 203 void registerForAvailable(Handler h, int what, Object obj); 204 void unregisterForAvailable(Handler h); 205 206 /** 207 * Fires on any transition into !RadioState.isAvailable() 208 * Fires immediately if currently in that state 209 * In general, actions should be idempotent. State may change 210 * before event is received. 211 */ 212 void registerForNotAvailable(Handler h, int what, Object obj); 213 void unregisterForNotAvailable(Handler h); 214 215 /** 216 * Fires on any transition into RADIO_OFF or !RadioState.isAvailable() 217 * Fires immediately if currently in that state 218 * In general, actions should be idempotent. State may change 219 * before event is received. 220 */ 221 void registerForOffOrNotAvailable(Handler h, int what, Object obj); 222 void unregisterForOffOrNotAvailable(Handler h); 223 224 /** 225 * Fires on any transition into SIM_READY 226 * Fires immediately if if currently in that state 227 * In general, actions should be idempotent. State may change 228 * before event is received. 229 */ 230 void registerForSIMReady(Handler h, int what, Object obj); 231 void unregisterForSIMReady(Handler h); 232 233 /** Any transition into SIM_LOCKED_OR_ABSENT */ 234 void registerForSIMLockedOrAbsent(Handler h, int what, Object obj); 235 void unregisterForSIMLockedOrAbsent(Handler h); 236 237 void registerForIccStatusChanged(Handler h, int what, Object obj); 238 void unregisterForIccStatusChanged(Handler h); 239 240 void registerForCallStateChanged(Handler h, int what, Object obj); 241 void unregisterForCallStateChanged(Handler h); 242 void registerForVoiceNetworkStateChanged(Handler h, int what, Object obj); 243 void unregisterForVoiceNetworkStateChanged(Handler h); 244 void registerForDataNetworkStateChanged(Handler h, int what, Object obj); 245 void unregisterForDataNetworkStateChanged(Handler h); 246 247 void registerForRadioTechnologyChanged(Handler h, int what, Object obj); 248 void unregisterForRadioTechnologyChanged(Handler h); 249 void registerForNVReady(Handler h, int what, Object obj); 250 void unregisterForNVReady(Handler h); 251 void registerForRUIMLockedOrAbsent(Handler h, int what, Object obj); 252 void unregisterForRUIMLockedOrAbsent(Handler h); 253 254 /** InCall voice privacy notifications */ 255 void registerForInCallVoicePrivacyOn(Handler h, int what, Object obj); 256 void unregisterForInCallVoicePrivacyOn(Handler h); 257 void registerForInCallVoicePrivacyOff(Handler h, int what, Object obj); 258 void unregisterForInCallVoicePrivacyOff(Handler h); 259 260 /** 261 * Fires on any transition into RUIM_READY 262 * Fires immediately if if currently in that state 263 * In general, actions should be idempotent. State may change 264 * before event is received. 265 */ 266 void registerForRUIMReady(Handler h, int what, Object obj); 267 void unregisterForRUIMReady(Handler h); 268 269 /** 270 * unlike the register* methods, there's only one new 3GPP format SMS handler. 271 * if you need to unregister, you should also tell the radio to stop 272 * sending SMS's to you (via AT+CNMI) 273 * 274 * AsyncResult.result is a String containing the SMS PDU 275 */ 276 void setOnNewGsmSms(Handler h, int what, Object obj); 277 void unSetOnNewGsmSms(Handler h); 278 279 /** 280 * unlike the register* methods, there's only one new 3GPP2 format SMS handler. 281 * if you need to unregister, you should also tell the radio to stop 282 * sending SMS's to you (via AT+CNMI) 283 * 284 * AsyncResult.result is a String containing the SMS PDU 285 */ 286 void setOnNewCdmaSms(Handler h, int what, Object obj); 287 void unSetOnNewCdmaSms(Handler h); 288 289 /** 290 * Set the handler for SMS Cell Broadcast messages. 291 * 292 * AsyncResult.result is a byte array containing the SMS-CB PDU 293 */ 294 void setOnNewGsmBroadcastSms(Handler h, int what, Object obj); 295 void unSetOnNewGsmBroadcastSms(Handler h); 296 297 /** 298 * Register for NEW_SMS_ON_SIM unsolicited message 299 * 300 * AsyncResult.result is an int array containing the index of new SMS 301 */ 302 void setOnSmsOnSim(Handler h, int what, Object obj); 303 void unSetOnSmsOnSim(Handler h); 304 305 /** 306 * Register for NEW_SMS_STATUS_REPORT unsolicited message 307 * 308 * AsyncResult.result is a String containing the status report PDU 309 */ 310 void setOnSmsStatus(Handler h, int what, Object obj); 311 void unSetOnSmsStatus(Handler h); 312 313 /** 314 * unlike the register* methods, there's only one NITZ time handler 315 * 316 * AsyncResult.result is an Object[] 317 * ((Object[])AsyncResult.result)[0] is a String containing the NITZ time string 318 * ((Object[])AsyncResult.result)[1] is a Long containing the milliseconds since boot as 319 * returned by elapsedRealtime() when this NITZ time 320 * was posted. 321 * 322 * Please note that the delivery of this message may be delayed several 323 * seconds on system startup 324 */ 325 void setOnNITZTime(Handler h, int what, Object obj); 326 void unSetOnNITZTime(Handler h); 327 328 /** 329 * unlike the register* methods, there's only one USSD notify handler 330 * 331 * Represents the arrival of a USSD "notify" message, which may 332 * or may not have been triggered by a previous USSD send 333 * 334 * AsyncResult.result is a String[] 335 * ((String[])(AsyncResult.result))[0] contains status code 336 * "0" USSD-Notify -- text in ((const char **)data)[1] 337 * "1" USSD-Request -- text in ((const char **)data)[1] 338 * "2" Session terminated by network 339 * "3" other local client (eg, SIM Toolkit) has responded 340 * "4" Operation not supported 341 * "5" Network timeout 342 * 343 * ((String[])(AsyncResult.result))[1] contains the USSD message 344 * The numeric representations of these are in USSD_MODE_* 345 */ 346 347 void setOnUSSD(Handler h, int what, Object obj); 348 void unSetOnUSSD(Handler h); 349 350 /** 351 * unlike the register* methods, there's only one signal strength handler 352 * AsyncResult.result is an int[2] 353 * response.obj.result[0] is received signal strength (0-31, 99) 354 * response.obj.result[1] is bit error rate (0-7, 99) 355 * as defined in TS 27.007 8.5 356 */ 357 358 void setOnSignalStrengthUpdate(Handler h, int what, Object obj); 359 void unSetOnSignalStrengthUpdate(Handler h); 360 361 /** 362 * Sets the handler for SIM/RUIM SMS storage full unsolicited message. 363 * Unlike the register* methods, there's only one notification handler 364 * 365 * @param h Handler for notification message. 366 * @param what User-defined message code. 367 * @param obj User object. 368 */ 369 void setOnIccSmsFull(Handler h, int what, Object obj); 370 void unSetOnIccSmsFull(Handler h); 371 372 /** 373 * Sets the handler for SIM Refresh notifications. 374 * 375 * @param h Handler for notification message. 376 * @param what User-defined message code. 377 * @param obj User object. 378 */ 379 void registerForIccRefresh(Handler h, int what, Object obj); 380 void unregisterForIccRefresh(Handler h); 381 382 void setOnIccRefresh(Handler h, int what, Object obj); 383 void unsetOnIccRefresh(Handler h); 384 385 /** 386 * Sets the handler for RING notifications. 387 * Unlike the register* methods, there's only one notification handler 388 * 389 * @param h Handler for notification message. 390 * @param what User-defined message code. 391 * @param obj User object. 392 */ 393 void setOnCallRing(Handler h, int what, Object obj); 394 void unSetOnCallRing(Handler h); 395 396 /** 397 * Sets the handler for RESTRICTED_STATE changed notification, 398 * eg, for Domain Specific Access Control 399 * unlike the register* methods, there's only one signal strength handler 400 * 401 * AsyncResult.result is an int[1] 402 * response.obj.result[0] is a bitmask of RIL_RESTRICTED_STATE_* values 403 */ 404 405 void setOnRestrictedStateChanged(Handler h, int what, Object obj); 406 void unSetOnRestrictedStateChanged(Handler h); 407 408 /** 409 * Sets the handler for Supplementary Service Notifications. 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 setOnSuppServiceNotification(Handler h, int what, Object obj); 417 void unSetOnSuppServiceNotification(Handler h); 418 419 /** 420 * Sets the handler for Session End 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 setOnCatSessionEnd(Handler h, int what, Object obj); 428 void unSetOnCatSessionEnd(Handler h); 429 430 /** 431 * Sets the handler for Proactive Commands for CAT. 432 * Unlike the register* methods, there's only one notification handler 433 * 434 * @param h Handler for notification message. 435 * @param what User-defined message code. 436 * @param obj User object. 437 */ 438 void setOnCatProactiveCmd(Handler h, int what, Object obj); 439 void unSetOnCatProactiveCmd(Handler h); 440 441 /** 442 * Sets the handler for Event Notifications for CAT. 443 * Unlike the register* methods, there's only one notification handler 444 * 445 * @param h Handler for notification message. 446 * @param what User-defined message code. 447 * @param obj User object. 448 */ 449 void setOnCatEvent(Handler h, int what, Object obj); 450 void unSetOnCatEvent(Handler h); 451 452 /** 453 * Sets the handler for Call Set Up Notifications for CAT. 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 setOnCatCallSetUp(Handler h, int what, Object obj); 461 void unSetOnCatCallSetUp(Handler h); 462 463 /** 464 * Enables/disbables supplementary service related notifications from 465 * the network. 466 * 467 * @param enable true to enable notifications, false to disable. 468 * @param result Message to be posted when command completes. 469 */ 470 void setSuppServiceNotifications(boolean enable, Message result); 471 //void unSetSuppServiceNotifications(Handler h); 472 473 /** 474 * Sets the handler for Event Notifications for CDMA Display Info. 475 * Unlike the register* methods, there's only one notification handler 476 * 477 * @param h Handler for notification message. 478 * @param what User-defined message code. 479 * @param obj User object. 480 */ 481 void registerForDisplayInfo(Handler h, int what, Object obj); 482 void unregisterForDisplayInfo(Handler h); 483 484 /** 485 * Sets the handler for Event Notifications for CallWaiting Info. 486 * Unlike the register* methods, there's only one notification handler 487 * 488 * @param h Handler for notification message. 489 * @param what User-defined message code. 490 * @param obj User object. 491 */ 492 void registerForCallWaitingInfo(Handler h, int what, Object obj); 493 void unregisterForCallWaitingInfo(Handler h); 494 495 /** 496 * Sets the handler for Event Notifications for Signal Info. 497 * Unlike the register* methods, there's only one notification handler 498 * 499 * @param h Handler for notification message. 500 * @param what User-defined message code. 501 * @param obj User object. 502 */ 503 void registerForSignalInfo(Handler h, int what, Object obj); 504 void unregisterForSignalInfo(Handler h); 505 506 /** 507 * Registers the handler for CDMA number information record 508 * Unlike the register* methods, there's only one notification handler 509 * 510 * @param h Handler for notification message. 511 * @param what User-defined message code. 512 * @param obj User object. 513 */ 514 void registerForNumberInfo(Handler h, int what, Object obj); 515 void unregisterForNumberInfo(Handler h); 516 517 /** 518 * Registers the handler for CDMA redirected number Information record 519 * Unlike the register* methods, there's only one notification handler 520 * 521 * @param h Handler for notification message. 522 * @param what User-defined message code. 523 * @param obj User object. 524 */ 525 void registerForRedirectedNumberInfo(Handler h, int what, Object obj); 526 void unregisterForRedirectedNumberInfo(Handler h); 527 528 /** 529 * Registers the handler for CDMA line control information record 530 * Unlike the register* methods, there's only one notification handler 531 * 532 * @param h Handler for notification message. 533 * @param what User-defined message code. 534 * @param obj User object. 535 */ 536 void registerForLineControlInfo(Handler h, int what, Object obj); 537 void unregisterForLineControlInfo(Handler h); 538 539 /** 540 * Registers the handler for CDMA T53 CLIR information record 541 * Unlike the register* methods, there's only one notification handler 542 * 543 * @param h Handler for notification message. 544 * @param what User-defined message code. 545 * @param obj User object. 546 */ 547 void registerFoT53ClirlInfo(Handler h, int what, Object obj); 548 void unregisterForT53ClirInfo(Handler h); 549 550 /** 551 * Registers the handler for CDMA T53 audio control information record 552 * Unlike the register* methods, there's only one notification handler 553 * 554 * @param h Handler for notification message. 555 * @param what User-defined message code. 556 * @param obj User object. 557 */ 558 void registerForT53AudioControlInfo(Handler h, int what, Object obj); 559 void unregisterForT53AudioControlInfo(Handler h); 560 561 /** 562 * Fires on if Modem enters Emergency Callback mode 563 */ 564 void setEmergencyCallbackMode(Handler h, int what, Object obj); 565 566 /** 567 * Fires on any CDMA OTA provision status change 568 */ 569 void registerForCdmaOtaProvision(Handler h,int what, Object obj); 570 void unregisterForCdmaOtaProvision(Handler h); 571 572 /** 573 * Registers the handler when out-band ringback tone is needed.<p> 574 * 575 * Messages received from this: 576 * Message.obj will be an AsyncResult 577 * AsyncResult.userObj = obj 578 * AsyncResult.result = boolean. <p> 579 */ 580 void registerForRingbackTone(Handler h, int what, Object obj); 581 void unregisterForRingbackTone(Handler h); 582 583 /** 584 * Registers the handler when mute/unmute need to be resent to get 585 * uplink audio during a call.<p> 586 * 587 * @param h Handler for notification message. 588 * @param what User-defined message code. 589 * @param obj User object. 590 * 591 */ 592 void registerForResendIncallMute(Handler h, int what, Object obj); 593 void unregisterForResendIncallMute(Handler h); 594 595 /** 596 * Registers the handler for when Cdma subscription changed events 597 * 598 * @param h Handler for notification message. 599 * @param what User-defined message code. 600 * @param obj User object. 601 * 602 */ 603 void registerForCdmaSubscriptionChanged(Handler h, int what, Object obj); 604 void unregisterForCdmaSubscriptionChanged(Handler h); 605 606 /** 607 * Registers the handler for when Cdma prl changed events 608 * 609 * @param h Handler for notification message. 610 * @param what User-defined message code. 611 * @param obj User object. 612 * 613 */ 614 void registerForCdmaPrlChanged(Handler h, int what, Object obj); 615 void unregisterForCdmaPrlChanged(Handler h); 616 617 /** 618 * Registers the handler for when Cdma prl changed events 619 * 620 * @param h Handler for notification message. 621 * @param what User-defined message code. 622 * @param obj User object. 623 * 624 */ 625 void registerForExitEmergencyCallbackMode(Handler h, int what, Object obj); 626 void unregisterForExitEmergencyCallbackMode(Handler h); 627 628 /** 629 * Registers the handler for RIL_UNSOL_RIL_CONNECT events. 630 * 631 * When ril connects or disconnects a message is sent to the registrant 632 * which contains an AsyncResult, ar, in msg.obj. The ar.result is an 633 * Integer which is the version of the ril or -1 if the ril disconnected. 634 * 635 * @param h Handler for notification message. 636 * @param what User-defined message code. 637 * @param obj User object. 638 */ 639 void registerForRilConnected(Handler h, int what, Object obj); 640 void unregisterForRilConnected(Handler h); 641 642 /** 643 * Supply the ICC PIN to the ICC card 644 * 645 * returned message 646 * retMsg.obj = AsyncResult ar 647 * ar.exception carries exception on failure 648 * This exception is CommandException with an error of PASSWORD_INCORRECT 649 * if the password is incorrect 650 * 651 * ar.exception and ar.result are null on success 652 */ 653 654 void supplyIccPin(String pin, Message result); 655 656 /** 657 * Supply the PIN for the app with this AID on the ICC card 658 * 659 * AID (Application ID), See ETSI 102.221 8.1 and 101.220 4 660 * 661 * returned message 662 * retMsg.obj = AsyncResult ar 663 * ar.exception carries exception on failure 664 * This exception is CommandException with an error of PASSWORD_INCORRECT 665 * if the password is incorrect 666 * 667 * ar.exception and ar.result are null on success 668 */ 669 670 void supplyIccPinForApp(String pin, String aid, Message result); 671 672 /** 673 * Supply the ICC PUK and newPin to the ICC card 674 * 675 * returned message 676 * retMsg.obj = AsyncResult ar 677 * ar.exception carries exception on failure 678 * This exception is CommandException with an error of PASSWORD_INCORRECT 679 * if the password is incorrect 680 * 681 * ar.exception and ar.result are null on success 682 */ 683 684 void supplyIccPuk(String puk, String newPin, Message result); 685 686 /** 687 * Supply the PUK, new pin for the app with this AID on the ICC card 688 * 689 * AID (Application ID), See ETSI 102.221 8.1 and 101.220 4 690 * 691 * returned message 692 * retMsg.obj = AsyncResult ar 693 * ar.exception carries exception on failure 694 * This exception is CommandException with an error of PASSWORD_INCORRECT 695 * if the password is incorrect 696 * 697 * ar.exception and ar.result are null on success 698 */ 699 700 void supplyIccPukForApp(String puk, String newPin, String aid, Message result); 701 702 /** 703 * Supply the ICC PIN2 to the ICC card 704 * Only called following operation where ICC_PIN2 was 705 * returned as a a failure from a previous operation 706 * 707 * returned message 708 * retMsg.obj = AsyncResult ar 709 * ar.exception carries exception on failure 710 * This exception is CommandException with an error of PASSWORD_INCORRECT 711 * if the password is incorrect 712 * 713 * ar.exception and ar.result are null on success 714 */ 715 716 void supplyIccPin2(String pin2, Message result); 717 718 /** 719 * Supply the PIN2 for the app with this AID on the ICC card 720 * Only called following operation where ICC_PIN2 was 721 * returned as a a failure from a previous operation 722 * 723 * AID (Application ID), See ETSI 102.221 8.1 and 101.220 4 724 * 725 * returned message 726 * retMsg.obj = AsyncResult ar 727 * ar.exception carries exception on failure 728 * This exception is CommandException with an error of PASSWORD_INCORRECT 729 * if the password is incorrect 730 * 731 * ar.exception and ar.result are null on success 732 */ 733 734 void supplyIccPin2ForApp(String pin2, String aid, Message result); 735 736 /** 737 * Supply the SIM PUK2 to the SIM card 738 * Only called following operation where SIM_PUK2 was 739 * returned as a a failure from a previous operation 740 * 741 * returned message 742 * retMsg.obj = AsyncResult ar 743 * ar.exception carries exception on failure 744 * This exception is CommandException with an error of PASSWORD_INCORRECT 745 * if the password is incorrect 746 * 747 * ar.exception and ar.result are null on success 748 */ 749 750 void supplyIccPuk2(String puk2, String newPin2, Message result); 751 752 /** 753 * Supply the PUK2, newPin2 for the app with this AID on the ICC card 754 * Only called following operation where SIM_PUK2 was 755 * returned as a a failure from a previous operation 756 * 757 * AID (Application ID), See ETSI 102.221 8.1 and 101.220 4 758 * 759 * returned message 760 * retMsg.obj = AsyncResult ar 761 * ar.exception carries exception on failure 762 * This exception is CommandException with an error of PASSWORD_INCORRECT 763 * if the password is incorrect 764 * 765 * ar.exception and ar.result are null on success 766 */ 767 768 void supplyIccPuk2ForApp(String puk2, String newPin2, String aid, Message result); 769 770 void changeIccPin(String oldPin, String newPin, Message result); 771 void changeIccPinForApp(String oldPin, String newPin, String aidPtr, Message result); 772 void changeIccPin2(String oldPin2, String newPin2, Message result); 773 void changeIccPin2ForApp(String oldPin2, String newPin2, String aidPtr, Message result); 774 775 void changeBarringPassword(String facility, String oldPwd, String newPwd, Message result); 776 777 void supplyNetworkDepersonalization(String netpin, Message result); 778 779 /** 780 * returned message 781 * retMsg.obj = AsyncResult ar 782 * ar.exception carries exception on failure 783 * ar.userObject contains the orignal value of result.obj 784 * ar.result contains a List of DriverCall 785 * The ar.result List is sorted by DriverCall.index 786 */ 787 void getCurrentCalls (Message result); 788 789 /** 790 * returned message 791 * retMsg.obj = AsyncResult ar 792 * ar.exception carries exception on failure 793 * ar.userObject contains the orignal value of result.obj 794 * ar.result contains a List of DataCallState 795 * @deprecated Do not use. 796 */ 797 @Deprecated 798 void getPDPContextList(Message result); 799 800 /** 801 * returned message 802 * retMsg.obj = AsyncResult ar 803 * ar.exception carries exception on failure 804 * ar.userObject contains the orignal value of result.obj 805 * ar.result contains a List of DataCallState 806 */ 807 void getDataCallList(Message result); 808 809 /** 810 * returned message 811 * retMsg.obj = AsyncResult ar 812 * ar.exception carries exception on failure 813 * ar.userObject contains the orignal value of result.obj 814 * ar.result is null on success and failure 815 * 816 * CLIR_DEFAULT == on "use subscription default value" 817 * CLIR_SUPPRESSION == on "CLIR suppression" (allow CLI presentation) 818 * CLIR_INVOCATION == on "CLIR invocation" (restrict CLI presentation) 819 */ 820 void dial (String address, int clirMode, Message result); 821 822 /** 823 * returned message 824 * retMsg.obj = AsyncResult ar 825 * ar.exception carries exception on failure 826 * ar.userObject contains the orignal value of result.obj 827 * ar.result is null on success and failure 828 * 829 * CLIR_DEFAULT == on "use subscription default value" 830 * CLIR_SUPPRESSION == on "CLIR suppression" (allow CLI presentation) 831 * CLIR_INVOCATION == on "CLIR invocation" (restrict CLI presentation) 832 */ 833 void dial(String address, int clirMode, UUSInfo uusInfo, Message result); 834 835 /** 836 * returned message 837 * retMsg.obj = AsyncResult ar 838 * ar.exception carries exception on failure 839 * ar.userObject contains the orignal value of result.obj 840 * ar.result is String containing IMSI on success 841 */ 842 void getIMSI(Message result); 843 844 /** 845 * returned message 846 * retMsg.obj = AsyncResult ar 847 * ar.exception carries exception on failure 848 * ar.userObject contains the orignal value of result.obj 849 * ar.result is String containing IMEI on success 850 */ 851 void getIMEI(Message result); 852 853 /** 854 * returned message 855 * retMsg.obj = AsyncResult ar 856 * ar.exception carries exception on failure 857 * ar.userObject contains the orignal value of result.obj 858 * ar.result is String containing IMEISV on success 859 */ 860 void getIMEISV(Message result); 861 862 /** 863 * Hang up one individual connection. 864 * returned message 865 * retMsg.obj = AsyncResult ar 866 * ar.exception carries exception on failure 867 * ar.userObject contains the orignal value of result.obj 868 * ar.result is null on success and failure 869 * 870 * 3GPP 22.030 6.5.5 871 * "Releases a specific active call X" 872 */ 873 void hangupConnection (int gsmIndex, Message result); 874 875 /** 876 * 3GPP 22.030 6.5.5 877 * "Releases all held calls or sets User Determined User Busy (UDUB) 878 * for a waiting call." 879 * ar.exception carries exception on failure 880 * ar.userObject contains the orignal value of result.obj 881 * ar.result is null on success and failure 882 */ 883 void hangupWaitingOrBackground (Message result); 884 885 /** 886 * 3GPP 22.030 6.5.5 887 * "Releases all active calls (if any exist) and accepts 888 * the other (held or waiting) call." 889 * 890 * ar.exception carries exception on failure 891 * ar.userObject contains the orignal value of result.obj 892 * ar.result is null on success and failure 893 */ 894 void hangupForegroundResumeBackground (Message result); 895 896 /** 897 * 3GPP 22.030 6.5.5 898 * "Places all active calls (if any exist) on hold and accepts 899 * the other (held or waiting) call." 900 * 901 * ar.exception carries exception on failure 902 * ar.userObject contains the orignal value of result.obj 903 * ar.result is null on success and failure 904 */ 905 void switchWaitingOrHoldingAndActive (Message result); 906 907 /** 908 * 3GPP 22.030 6.5.5 909 * "Adds a held call to the conversation" 910 * 911 * ar.exception carries exception on failure 912 * ar.userObject contains the orignal value of result.obj 913 * ar.result is null on success and failure 914 */ 915 void conference (Message result); 916 917 /** 918 * Set preferred Voice Privacy (VP). 919 * 920 * @param enable true is enhanced and false is normal VP 921 * @param result is a callback message 922 */ 923 void setPreferredVoicePrivacy(boolean enable, Message result); 924 925 /** 926 * Get currently set preferred Voice Privacy (VP) mode. 927 * 928 * @param result is a callback message 929 */ 930 void getPreferredVoicePrivacy(Message result); 931 932 /** 933 * 3GPP 22.030 6.5.5 934 * "Places all active calls on hold except call X with which 935 * communication shall be supported." 936 */ 937 void separateConnection (int gsmIndex, Message result); 938 939 /** 940 * 941 * ar.exception carries exception on failure 942 * ar.userObject contains the orignal value of result.obj 943 * ar.result is null on success and failure 944 */ 945 void acceptCall (Message result); 946 947 /** 948 * also known as UDUB 949 * ar.exception carries exception on failure 950 * ar.userObject contains the orignal value of result.obj 951 * ar.result is null on success and failure 952 */ 953 void rejectCall (Message result); 954 955 /** 956 * 3GPP 22.030 6.5.5 957 * "Connects the two calls and disconnects the subscriber from both calls" 958 * 959 * ar.exception carries exception on failure 960 * ar.userObject contains the orignal value of result.obj 961 * ar.result is null on success and failure 962 */ 963 void explicitCallTransfer (Message result); 964 965 /** 966 * cause code returned as int[0] in Message.obj.response 967 * Returns integer cause code defined in TS 24.008 968 * Annex H or closest approximation. 969 * Most significant codes: 970 * - Any defined in 22.001 F.4 (for generating busy/congestion) 971 * - Cause 68: ACM >= ACMMax 972 */ 973 void getLastCallFailCause (Message result); 974 975 976 /** 977 * Reason for last PDP context deactivate or failure to activate 978 * cause code returned as int[0] in Message.obj.response 979 * returns an integer cause code defined in TS 24.008 980 * section 6.1.3.1.3 or close approximation 981 * @deprecated Do not use. 982 */ 983 @Deprecated 984 void getLastPdpFailCause (Message result); 985 986 /** 987 * The preferred new alternative to getLastPdpFailCause 988 * that is also CDMA-compatible. 989 */ 990 void getLastDataCallFailCause (Message result); 991 992 void setMute (boolean enableMute, Message response); 993 994 void getMute (Message response); 995 996 /** 997 * response.obj is an AsyncResult 998 * response.obj.result is an int[2] 999 * response.obj.result[0] is received signal strength (0-31, 99) 1000 * response.obj.result[1] is bit error rate (0-7, 99) 1001 * as defined in TS 27.007 8.5 1002 */ 1003 void getSignalStrength (Message response); 1004 1005 1006 /** 1007 * response.obj.result is an int[3] 1008 * response.obj.result[0] is registration state 0-5 from TS 27.007 7.2 1009 * response.obj.result[1] is LAC if registered or -1 if not 1010 * response.obj.result[2] is CID if registered or -1 if not 1011 * valid LAC and CIDs are 0x0000 - 0xffff 1012 * 1013 * Please note that registration state 4 ("unknown") is treated 1014 * as "out of service" above 1015 */ 1016 void getVoiceRegistrationState (Message response); 1017 1018 /** 1019 * response.obj.result is an int[3] 1020 * response.obj.result[0] is registration state 0-5 from TS 27.007 7.2 1021 * response.obj.result[1] is LAC if registered or -1 if not 1022 * response.obj.result[2] is CID if registered or -1 if not 1023 * valid LAC and CIDs are 0x0000 - 0xffff 1024 * 1025 * Please note that registration state 4 ("unknown") is treated 1026 * as "out of service" above 1027 */ 1028 void getDataRegistrationState (Message response); 1029 1030 /** 1031 * response.obj.result is a String[3] 1032 * response.obj.result[0] is long alpha or null if unregistered 1033 * response.obj.result[1] is short alpha or null if unregistered 1034 * response.obj.result[2] is numeric or null if unregistered 1035 */ 1036 void getOperator(Message response); 1037 1038 /** 1039 * ar.exception carries exception on failure 1040 * ar.userObject contains the orignal value of result.obj 1041 * ar.result is null on success and failure 1042 */ 1043 void sendDtmf(char c, Message result); 1044 1045 1046 /** 1047 * ar.exception carries exception on failure 1048 * ar.userObject contains the orignal value of result.obj 1049 * ar.result is null on success and failure 1050 */ 1051 void startDtmf(char c, Message result); 1052 1053 /** 1054 * ar.exception carries exception on failure 1055 * ar.userObject contains the orignal value of result.obj 1056 * ar.result is null on success and failure 1057 */ 1058 void stopDtmf(Message result); 1059 1060 /** 1061 * ar.exception carries exception on failure 1062 * ar.userObject contains the orignal value of result.obj 1063 * ar.result is null on success and failure 1064 */ 1065 void sendBurstDtmf(String dtmfString, int on, int off, Message result); 1066 1067 /** 1068 * smscPDU is smsc address in PDU form GSM BCD format prefixed 1069 * by a length byte (as expected by TS 27.005) or NULL for default SMSC 1070 * pdu is SMS in PDU format as an ASCII hex string 1071 * less the SMSC address 1072 */ 1073 void sendSMS (String smscPDU, String pdu, Message response); 1074 1075 /** 1076 * @param pdu is CDMA-SMS in internal pseudo-PDU format 1077 * @param response sent when operation completes 1078 */ 1079 void sendCdmaSms(byte[] pdu, Message response); 1080 1081 /** 1082 * Deletes the specified SMS record from SIM memory (EF_SMS). 1083 * 1084 * @param index index of the SMS record to delete 1085 * @param response sent when operation completes 1086 */ 1087 void deleteSmsOnSim(int index, Message response); 1088 1089 /** 1090 * Deletes the specified SMS record from RUIM memory (EF_SMS in DF_CDMA). 1091 * 1092 * @param index index of the SMS record to delete 1093 * @param response sent when operation completes 1094 */ 1095 void deleteSmsOnRuim(int index, Message response); 1096 1097 /** 1098 * Writes an SMS message to SIM memory (EF_SMS). 1099 * 1100 * @param status status of message on SIM. One of: 1101 * SmsManger.STATUS_ON_ICC_READ 1102 * SmsManger.STATUS_ON_ICC_UNREAD 1103 * SmsManger.STATUS_ON_ICC_SENT 1104 * SmsManger.STATUS_ON_ICC_UNSENT 1105 * @param pdu message PDU, as hex string 1106 * @param response sent when operation completes. 1107 * response.obj will be an AsyncResult, and will indicate 1108 * any error that may have occurred (eg, out of memory). 1109 */ 1110 void writeSmsToSim(int status, String smsc, String pdu, Message response); 1111 1112 void writeSmsToRuim(int status, String pdu, Message response); 1113 1114 void setRadioPower(boolean on, Message response); 1115 1116 void acknowledgeLastIncomingGsmSms(boolean success, int cause, Message response); 1117 1118 void acknowledgeLastIncomingCdmaSms(boolean success, int cause, Message response); 1119 1120 /** 1121 * Acknowledge successful or failed receipt of last incoming SMS, 1122 * including acknowledgement TPDU to send as the RP-User-Data element 1123 * of the RP-ACK or RP-ERROR PDU. 1124 * 1125 * @param success true to send RP-ACK, false to send RP-ERROR 1126 * @param ackPdu the acknowledgement TPDU in hexadecimal format 1127 * @param response sent when operation completes. 1128 */ 1129 void acknowledgeIncomingGsmSmsWithPdu(boolean success, String ackPdu, Message response); 1130 1131 /** 1132 * parameters equivalent to 27.007 AT+CRSM command 1133 * response.obj will be an AsyncResult 1134 * response.obj.result will be an IccIoResult on success 1135 */ 1136 void iccIO (int command, int fileid, String path, int p1, int p2, int p3, 1137 String data, String pin2, Message response); 1138 1139 /** 1140 * (AsyncResult)response.obj).result is an int[] with element [0] set to 1141 * 1 for "CLIP is provisioned", and 0 for "CLIP is not provisioned". 1142 * 1143 * @param response is callback message 1144 */ 1145 1146 void queryCLIP(Message response); 1147 1148 /** 1149 * response.obj will be a an int[2] 1150 * 1151 * response.obj[0] will be TS 27.007 +CLIR parameter 'n' 1152 * 0 presentation indicator is used according to the subscription of the CLIR service 1153 * 1 CLIR invocation 1154 * 2 CLIR suppression 1155 * 1156 * response.obj[1] will be TS 27.007 +CLIR parameter 'm' 1157 * 0 CLIR not provisioned 1158 * 1 CLIR provisioned in permanent mode 1159 * 2 unknown (e.g. no network, etc.) 1160 * 3 CLIR temporary mode presentation restricted 1161 * 4 CLIR temporary mode presentation allowed 1162 */ 1163 1164 void getCLIR(Message response); 1165 1166 /** 1167 * clirMode is one of the CLIR_* constants above 1168 * 1169 * response.obj is null 1170 */ 1171 1172 void setCLIR(int clirMode, Message response); 1173 1174 /** 1175 * (AsyncResult)response.obj).result is an int[] with element [0] set to 1176 * 0 for disabled, 1 for enabled. 1177 * 1178 * @param serviceClass is a sum of SERVICE_CLASS_* 1179 * @param response is callback message 1180 */ 1181 1182 void queryCallWaiting(int serviceClass, Message response); 1183 1184 /** 1185 * @param enable is true to enable, false to disable 1186 * @param serviceClass is a sum of SERVICE_CLASS_* 1187 * @param response is callback message 1188 */ 1189 1190 void setCallWaiting(boolean enable, int serviceClass, Message response); 1191 1192 /** 1193 * @param action is one of CF_ACTION_* 1194 * @param cfReason is one of CF_REASON_* 1195 * @param serviceClass is a sum of SERVICE_CLASSS_* 1196 */ 1197 void setCallForward(int action, int cfReason, int serviceClass, 1198 String number, int timeSeconds, Message response); 1199 1200 /** 1201 * cfReason is one of CF_REASON_* 1202 * 1203 * ((AsyncResult)response.obj).result will be an array of 1204 * CallForwardInfo's 1205 * 1206 * An array of length 0 means "disabled for all codes" 1207 */ 1208 void queryCallForwardStatus(int cfReason, int serviceClass, 1209 String number, Message response); 1210 1211 void setNetworkSelectionModeAutomatic(Message response); 1212 1213 void setNetworkSelectionModeManual(String operatorNumeric, Message response); 1214 1215 /** 1216 * Queries whether the current network selection mode is automatic 1217 * or manual 1218 * 1219 * ((AsyncResult)response.obj).result is an int[] with element [0] being 1220 * a 0 for automatic selection and a 1 for manual selection 1221 */ 1222 1223 void getNetworkSelectionMode(Message response); 1224 1225 /** 1226 * Queries the currently available networks 1227 * 1228 * ((AsyncResult)response.obj).result is a List of NetworkInfo objects 1229 */ 1230 void getAvailableNetworks(Message response); 1231 1232 void getBasebandVersion (Message response); 1233 1234 1235 /** 1236 * (AsyncResult)response.obj).result will be an Integer representing 1237 * the sum of enabled service classes (sum of SERVICE_CLASS_*) 1238 * 1239 * @param facility one of CB_FACILTY_* 1240 * @param password password or "" if not required 1241 * @param serviceClass is a sum of SERVICE_CLASS_* 1242 * @param response is callback message 1243 */ 1244 1245 void queryFacilityLock (String facility, String password, int serviceClass, 1246 Message response); 1247 1248 /** 1249 * (AsyncResult)response.obj).result will be an Integer representing 1250 * the sum of enabled service classes (sum of SERVICE_CLASS_*) for the 1251 * application with appId. 1252 * 1253 * @param facility one of CB_FACILTY_* 1254 * @param password password or "" if not required 1255 * @param serviceClass is a sum of SERVICE_CLASS_* 1256 * @param appId is application Id or null if none 1257 * @param response is callback message 1258 */ 1259 1260 void queryFacilityLockForApp(String facility, String password, int serviceClass, String appId, 1261 Message response); 1262 1263 /** 1264 * @param facility one of CB_FACILTY_* 1265 * @param lockState true means lock, false means unlock 1266 * @param password password or "" if not required 1267 * @param serviceClass is a sum of SERVICE_CLASS_* 1268 * @param response is callback message 1269 */ 1270 void setFacilityLock (String facility, boolean lockState, String password, 1271 int serviceClass, Message response); 1272 1273 /** 1274 * Set the facility lock for the app with this AID on the ICC card. 1275 * 1276 * @param facility one of CB_FACILTY_* 1277 * @param lockState true means lock, false means unlock 1278 * @param password password or "" if not required 1279 * @param serviceClass is a sum of SERVICE_CLASS_* 1280 * @param appId is application Id or null if none 1281 * @param response is callback message 1282 */ 1283 void setFacilityLockForApp(String facility, boolean lockState, String password, 1284 int serviceClass, String appId, Message response); 1285 1286 void sendUSSD (String ussdString, Message response); 1287 1288 /** 1289 * Cancels a pending USSD session if one exists. 1290 * @param response callback message 1291 */ 1292 void cancelPendingUssd (Message response); 1293 1294 void resetRadio(Message result); 1295 1296 /** 1297 * Assign a specified band for RF configuration. 1298 * 1299 * @param bandMode one of BM_*_BAND 1300 * @param response is callback message 1301 */ 1302 void setBandMode (int bandMode, Message response); 1303 1304 /** 1305 * Query the list of band mode supported by RF. 1306 * 1307 * @param response is callback message 1308 * ((AsyncResult)response.obj).result is an int[] with every 1309 * element representing one avialable BM_*_BAND 1310 */ 1311 void queryAvailableBandMode (Message response); 1312 1313 /** 1314 * Set the current preferred network type. This will be the last 1315 * networkType that was passed to setPreferredNetworkType. 1316 */ 1317 void setCurrentPreferredNetworkType(); 1318 1319 /** 1320 * Requests to set the preferred network type for searching and registering 1321 * (CS/PS domain, RAT, and operation mode) 1322 * @param networkType one of NT_*_TYPE 1323 * @param response is callback message 1324 */ 1325 void setPreferredNetworkType(int networkType , Message response); 1326 1327 /** 1328 * Query the preferred network type setting 1329 * 1330 * @param response is callback message to report one of NT_*_TYPE 1331 */ 1332 void getPreferredNetworkType(Message response); 1333 1334 /** 1335 * Query neighboring cell ids 1336 * 1337 * @param response s callback message to cell ids 1338 */ 1339 void getNeighboringCids(Message response); 1340 1341 /** 1342 * Request to enable/disable network state change notifications when 1343 * location information (lac and/or cid) has changed. 1344 * 1345 * @param enable true to enable, false to disable 1346 * @param response callback message 1347 */ 1348 void setLocationUpdates(boolean enable, Message response); 1349 1350 /** 1351 * Gets the default SMSC address. 1352 * 1353 * @param result Callback message contains the SMSC address. 1354 */ 1355 void getSmscAddress(Message result); 1356 1357 /** 1358 * Sets the default SMSC address. 1359 * 1360 * @param address new SMSC address 1361 * @param result Callback message is empty on completion 1362 */ 1363 void setSmscAddress(String address, Message result); 1364 1365 /** 1366 * Indicates whether there is storage available for new SMS messages. 1367 * @param available true if storage is available 1368 * @param result callback message 1369 */ 1370 void reportSmsMemoryStatus(boolean available, Message result); 1371 1372 /** 1373 * Indicates to the vendor ril that StkService is running 1374 * and is ready to receive RIL_UNSOL_STK_XXXX commands. 1375 * 1376 * @param result callback message 1377 */ 1378 void reportStkServiceIsRunning(Message result); 1379 1380 void invokeOemRilRequestRaw(byte[] data, Message response); 1381 1382 void invokeOemRilRequestStrings(String[] strings, Message response); 1383 1384 1385 /** 1386 * Send TERMINAL RESPONSE to the SIM, after processing a proactive command 1387 * sent by the SIM. 1388 * 1389 * @param contents String containing SAT/USAT response in hexadecimal 1390 * format starting with first byte of response data. See 1391 * TS 102 223 for details. 1392 * @param response Callback message 1393 */ 1394 public void sendTerminalResponse(String contents, Message response); 1395 1396 /** 1397 * Send ENVELOPE to the SIM, after processing a proactive command sent by 1398 * the SIM. 1399 * 1400 * @param contents String containing SAT/USAT response in hexadecimal 1401 * format starting with command tag. See TS 102 223 for 1402 * details. 1403 * @param response Callback message 1404 */ 1405 public void sendEnvelope(String contents, Message response); 1406 1407 /** 1408 * Send ENVELOPE to the SIM, such as an SMS-PP data download envelope 1409 * for a SIM data download message. This method has one difference 1410 * from {@link #sendEnvelope}: The SW1 and SW2 status bytes from the UICC response 1411 * are returned along with the response data. 1412 * 1413 * response.obj will be an AsyncResult 1414 * response.obj.result will be an IccIoResult on success 1415 * 1416 * @param contents String containing SAT/USAT response in hexadecimal 1417 * format starting with command tag. See TS 102 223 for 1418 * details. 1419 * @param response Callback message 1420 */ 1421 public void sendEnvelopeWithStatus(String contents, Message response); 1422 1423 /** 1424 * Accept or reject the call setup request from SIM. 1425 * 1426 * @param accept true if the call is to be accepted, false otherwise. 1427 * @param response Callback message 1428 */ 1429 public void handleCallSetupRequestFromSim(boolean accept, Message response); 1430 1431 /** 1432 * Activate or deactivate cell broadcast SMS for GSM. 1433 * 1434 * @param activate 1435 * true = activate, false = deactivate 1436 * @param result Callback message is empty on completion 1437 */ 1438 public void setGsmBroadcastActivation(boolean activate, Message result); 1439 1440 /** 1441 * Configure cell broadcast SMS for GSM. 1442 * 1443 * @param response Callback message is empty on completion 1444 */ 1445 public void setGsmBroadcastConfig(SmsBroadcastConfigInfo[] config, Message response); 1446 1447 /** 1448 * Query the current configuration of cell broadcast SMS of GSM. 1449 * 1450 * @param response 1451 * Callback message contains the configuration from the modem 1452 * on completion 1453 */ 1454 public void getGsmBroadcastConfig(Message response); 1455 1456 //***** new Methods for CDMA support 1457 1458 /** 1459 * Request the device ESN / MEID / IMEI / IMEISV. 1460 * "response" is const char ** 1461 * [0] is IMEI if GSM subscription is available 1462 * [1] is IMEISV if GSM subscription is available 1463 * [2] is ESN if CDMA subscription is available 1464 * [3] is MEID if CDMA subscription is available 1465 */ 1466 public void getDeviceIdentity(Message response); 1467 1468 /** 1469 * Request the device MDN / H_SID / H_NID / MIN. 1470 * "response" is const char ** 1471 * [0] is MDN if CDMA subscription is available 1472 * [1] is a comma separated list of H_SID (Home SID) in decimal format 1473 * if CDMA subscription is available 1474 * [2] is a comma separated list of H_NID (Home NID) in decimal format 1475 * if CDMA subscription is available 1476 * [3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available 1477 */ 1478 public void getCDMASubscription(Message response); 1479 1480 /** 1481 * Send Flash Code. 1482 * "response" is is NULL 1483 * [0] is a FLASH string 1484 */ 1485 public void sendCDMAFeatureCode(String FeatureCode, Message response); 1486 1487 /** Set the Phone type created */ 1488 void setPhoneType(int phoneType); 1489 1490 /** 1491 * Query the CDMA roaming preference setting 1492 * 1493 * @param response is callback message to report one of CDMA_RM_* 1494 */ 1495 void queryCdmaRoamingPreference(Message response); 1496 1497 /** 1498 * Requests to set the CDMA roaming preference 1499 * @param cdmaRoamingType one of CDMA_RM_* 1500 * @param response is callback message 1501 */ 1502 void setCdmaRoamingPreference(int cdmaRoamingType, Message response); 1503 1504 /** 1505 * Requests to set the CDMA subscription mode 1506 * @param cdmaSubscriptionType one of CDMA_SUBSCRIPTION_* 1507 * @param response is callback message 1508 */ 1509 void setCdmaSubscriptionSource(int cdmaSubscriptionType, Message response); 1510 1511 /** 1512 * Requests to get the CDMA subscription srouce 1513 * @param response is callback message 1514 */ 1515 void getCdmaSubscriptionSource(Message response); 1516 1517 /** 1518 * Set the TTY mode 1519 * 1520 * @param ttyMode one of the following: 1521 * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF} 1522 * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL} 1523 * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO} 1524 * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO} 1525 * @param response is callback message 1526 */ 1527 void setTTYMode(int ttyMode, Message response); 1528 1529 /** 1530 * Query the TTY mode 1531 * (AsyncResult)response.obj).result is an int[] with element [0] set to 1532 * tty mode: 1533 * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF} 1534 * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL} 1535 * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO} 1536 * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO} 1537 * @param response is callback message 1538 */ 1539 void queryTTYMode(Message response); 1540 1541 /** 1542 * Setup a packet data connection On successful completion, the result 1543 * message will return a {@link DataCallState} object containing the connection 1544 * information. 1545 * 1546 * @param radioTechnology 1547 * indicates whether to setup connection on radio technology CDMA 1548 * (0) or GSM/UMTS (1) 1549 * @param profile 1550 * Profile Number or NULL to indicate default profile 1551 * @param apn 1552 * the APN to connect to if radio technology is GSM/UMTS. 1553 * Otherwise null for CDMA. 1554 * @param user 1555 * the username for APN, or NULL 1556 * @param password 1557 * the password for APN, or NULL 1558 * @param authType 1559 * the PAP / CHAP auth type. Values is one of SETUP_DATA_AUTH_* 1560 * @param protocol 1561 * one of the PDP_type values in TS 27.007 section 10.1.1. 1562 * For example, "IP", "IPV6", "IPV4V6", or "PPP". 1563 * @param result 1564 * Callback message 1565 */ 1566 public void setupDataCall(String radioTechnology, String profile, 1567 String apn, String user, String password, String authType, 1568 String protocol, Message result); 1569 1570 /** 1571 * Deactivate packet data connection 1572 * 1573 * @param cid 1574 * The connection ID 1575 * @param reason 1576 * Data disconnect reason. 1577 * @param result 1578 * Callback message is empty on completion 1579 */ 1580 public void deactivateDataCall(int cid, int reason, Message result); 1581 1582 /** 1583 * Activate or deactivate cell broadcast SMS for CDMA. 1584 * 1585 * @param activate 1586 * true = activate, false = deactivate 1587 * @param result 1588 * Callback message is empty on completion 1589 */ 1590 public void setCdmaBroadcastActivation(boolean activate, Message result); 1591 1592 /** 1593 * Configure cdma cell broadcast SMS. 1594 * 1595 * @param result 1596 * Callback message is empty on completion 1597 */ 1598 // TODO: Change the configValuesArray to a RIL_BroadcastSMSConfig 1599 public void setCdmaBroadcastConfig(int[] configValuesArray, Message result); 1600 1601 /** 1602 * Query the current configuration of cdma cell broadcast SMS. 1603 * 1604 * @param result 1605 * Callback message contains the configuration from the modem on completion 1606 */ 1607 public void getCdmaBroadcastConfig(Message result); 1608 1609 /** 1610 * Requests the radio's system selection module to exit emergency callback mode. 1611 * This function should only be called from CDMAPHone.java. 1612 * 1613 * @param response callback message 1614 */ 1615 public void exitEmergencyCallbackMode(Message response); 1616 1617 /** 1618 * Request the status of the ICC and UICC cards. 1619 * 1620 * @param result 1621 * Callback message containing {@link IccCardStatus} structure for the card. 1622 */ 1623 public void getIccCardStatus(Message result); 1624 1625 /** 1626 * Return if the current radio is LTE on CDMA. This 1627 * is a tri-state return value as for a period of time 1628 * the mode may be unknown. 1629 * 1630 * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE} 1631 * or {@link Phone#LTE_ON_CDMA_TRUE} 1632 */ 1633 public int getLteOnCdmaMode(); 1634 1635 /** 1636 * Request the ISIM application on the UICC to perform the AKA 1637 * challenge/response algorithm for IMS authentication. The nonce string 1638 * and challenge response are Base64 encoded Strings. 1639 * 1640 * @param nonce the nonce string to pass with the ISIM authentication request 1641 * @param response a callback message with the String response in the obj field 1642 */ 1643 public void requestIsimAuthentication(String nonce, Message response); 1644 } 1645