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