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