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