ITelephony.aidl revision 2af2d57d578e0c3a2740628e7c6336b19961cc49
1/* 2 * Copyright (C) 2007 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package com.android.internal.telephony; 18 19import android.content.Intent; 20import android.os.Bundle; 21import android.telephony.CellInfo; 22import android.telephony.IccOpenLogicalChannelResponse; 23import android.telephony.NeighboringCellInfo; 24import android.telephony.RadioAccessFamily; 25import java.util.List; 26 27 28/** 29 * Interface used to interact with the phone. Mostly this is used by the 30 * TelephonyManager class. A few places are still using this directly. 31 * Please clean them up if possible and use TelephonyManager insteadl. 32 * 33 * {@hide} 34 */ 35interface ITelephony { 36 37 /** 38 * Dial a number. This doesn't place the call. It displays 39 * the Dialer screen. 40 * @param number the number to be dialed. If null, this 41 * would display the Dialer screen with no number pre-filled. 42 */ 43 void dial(String number); 44 45 /** 46 * Place a call to the specified number. 47 * @param number the number to be called. 48 */ 49 void call(String callingPackage, String number); 50 51 /** 52 * End call if there is a call in progress, otherwise does nothing. 53 * 54 * @return whether it hung up 55 */ 56 boolean endCall(); 57 58 /** 59 * End call on particular subId or go to the Home screen 60 * @param subId user preferred subId. 61 * @return whether it hung up 62 */ 63 boolean endCallForSubscriber(long subId); 64 65 /** 66 * Answer the currently-ringing call. 67 * 68 * If there's already a current active call, that call will be 69 * automatically put on hold. If both lines are currently in use, the 70 * current active call will be ended. 71 * 72 * TODO: provide a flag to let the caller specify what policy to use 73 * if both lines are in use. (The current behavior is hardwired to 74 * "answer incoming, end ongoing", which is how the CALL button 75 * is specced to behave.) 76 * 77 * TODO: this should be a oneway call (especially since it's called 78 * directly from the key queue thread). 79 */ 80 void answerRingingCall(); 81 82 /** 83 * Answer the currently-ringing call on particular subId . 84 * 85 * If there's already a current active call, that call will be 86 * automatically put on hold. If both lines are currently in use, the 87 * current active call will be ended. 88 * 89 * TODO: provide a flag to let the caller specify what policy to use 90 * if both lines are in use. (The current behavior is hardwired to 91 * "answer incoming, end ongoing", which is how the CALL button 92 * is specced to behave.) 93 * 94 * TODO: this should be a oneway call (especially since it's called 95 * directly from the key queue thread). 96 */ 97 void answerRingingCallForSubscriber(long subId); 98 99 /** 100 * Silence the ringer if an incoming call is currently ringing. 101 * (If vibrating, stop the vibrator also.) 102 * 103 * It's safe to call this if the ringer has already been silenced, or 104 * even if there's no incoming call. (If so, this method will do nothing.) 105 * 106 * TODO: this should be a oneway call too (see above). 107 * (Actually *all* the methods here that return void can 108 * probably be oneway.) 109 */ 110 void silenceRinger(); 111 112 /** 113 * Check if we are in either an active or holding call 114 * @return true if the phone state is OFFHOOK. 115 */ 116 boolean isOffhook(); 117 118 /** 119 * Check if a particular subId has an active or holding call 120 * 121 * @param subId user preferred subId. 122 * @return true if the phone state is OFFHOOK. 123 */ 124 boolean isOffhookForSubscriber(long subId); 125 126 /** 127 * Check if an incoming phone call is ringing or call waiting 128 * on a particular subId. 129 * 130 * @param subId user preferred subId. 131 * @return true if the phone state is RINGING. 132 */ 133 boolean isRingingForSubscriber(long subId); 134 135 /** 136 * Check if an incoming phone call is ringing or call waiting. 137 * @return true if the phone state is RINGING. 138 */ 139 boolean isRinging(); 140 141 /** 142 * Check if the phone is idle. 143 * @return true if the phone state is IDLE. 144 */ 145 boolean isIdle(); 146 147 /** 148 * Check if the phone is idle on a particular subId. 149 * 150 * @param subId user preferred subId. 151 * @return true if the phone state is IDLE. 152 */ 153 boolean isIdleForSubscriber(long subId); 154 155 /** 156 * Check to see if the radio is on or not. 157 * @return returns true if the radio is on. 158 */ 159 boolean isRadioOn(); 160 161 /** 162 * Check to see if the radio is on or not on particular subId. 163 * @param subId user preferred subId. 164 * @return returns true if the radio is on. 165 */ 166 boolean isRadioOnForSubscriber(long subId); 167 168 /** 169 * Check if the SIM pin lock is enabled. 170 * @return true if the SIM pin lock is enabled. 171 */ 172 boolean isSimPinEnabled(); 173 174 /** 175 * Supply a pin to unlock the SIM. Blocks until a result is determined. 176 * @param pin The pin to check. 177 * @return whether the operation was a success. 178 */ 179 boolean supplyPin(String pin); 180 181 /** 182 * Supply a pin to unlock the SIM for particular subId. 183 * Blocks until a result is determined. 184 * @param pin The pin to check. 185 * @param subId user preferred subId. 186 * @return whether the operation was a success. 187 */ 188 boolean supplyPinForSubscriber(long subId, String pin); 189 190 /** 191 * Supply puk to unlock the SIM and set SIM pin to new pin. 192 * Blocks until a result is determined. 193 * @param puk The puk to check. 194 * pin The new pin to be set in SIM 195 * @return whether the operation was a success. 196 */ 197 boolean supplyPuk(String puk, String pin); 198 199 /** 200 * Supply puk to unlock the SIM and set SIM pin to new pin. 201 * Blocks until a result is determined. 202 * @param puk The puk to check. 203 * pin The new pin to be set in SIM 204 * @param subId user preferred subId. 205 * @return whether the operation was a success. 206 */ 207 boolean supplyPukForSubscriber(long subId, String puk, String pin); 208 209 /** 210 * Supply a pin to unlock the SIM. Blocks until a result is determined. 211 * Returns a specific success/error code. 212 * @param pin The pin to check. 213 * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code 214 * retValue[1] = number of attempts remaining if known otherwise -1 215 */ 216 int[] supplyPinReportResult(String pin); 217 218 /** 219 * Supply a pin to unlock the SIM. Blocks until a result is determined. 220 * Returns a specific success/error code. 221 * @param pin The pin to check. 222 * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code 223 * retValue[1] = number of attempts remaining if known otherwise -1 224 */ 225 int[] supplyPinReportResultForSubscriber(long subId, String pin); 226 227 /** 228 * Supply puk to unlock the SIM and set SIM pin to new pin. 229 * Blocks until a result is determined. 230 * Returns a specific success/error code 231 * @param puk The puk to check 232 * pin The pin to check. 233 * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code 234 * retValue[1] = number of attempts remaining if known otherwise -1 235 */ 236 int[] supplyPukReportResult(String puk, String pin); 237 238 /** 239 * Supply puk to unlock the SIM and set SIM pin to new pin. 240 * Blocks until a result is determined. 241 * Returns a specific success/error code 242 * @param puk The puk to check 243 * pin The pin to check. 244 * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code 245 * retValue[1] = number of attempts remaining if known otherwise -1 246 */ 247 int[] supplyPukReportResultForSubscriber(long subId, String puk, String pin); 248 249 /** 250 * Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated 251 * without SEND (so <code>dial</code> is not appropriate). 252 * 253 * @param dialString the MMI command to be executed. 254 * @return true if MMI command is executed. 255 */ 256 boolean handlePinMmi(String dialString); 257 258 /** 259 * Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated 260 * without SEND (so <code>dial</code> is not appropriate) for 261 * a particular subId. 262 * @param dialString the MMI command to be executed. 263 * @param subId user preferred subId. 264 * @return true if MMI command is executed. 265 */ 266 boolean handlePinMmiForSubscriber(long subId, String dialString); 267 268 /** 269 * Toggles the radio on or off. 270 */ 271 void toggleRadioOnOff(); 272 273 /** 274 * Toggles the radio on or off on particular subId. 275 * @param subId user preferred subId. 276 */ 277 void toggleRadioOnOffForSubscriber(long subId); 278 279 /** 280 * Set the radio to on or off 281 */ 282 boolean setRadio(boolean turnOn); 283 284 /** 285 * Set the radio to on or off on particular subId. 286 * @param subId user preferred subId. 287 */ 288 boolean setRadioForSubscriber(long subId, boolean turnOn); 289 290 /** 291 * Set the radio to on or off unconditionally 292 */ 293 boolean setRadioPower(boolean turnOn); 294 295 /** 296 * Request to update location information in service state 297 */ 298 void updateServiceLocation(); 299 300 /** 301 * Request to update location information for a subscrition in service state 302 * @param subId user preferred subId. 303 */ 304 void updateServiceLocationForSubscriber(long subId); 305 306 /** 307 * Enable location update notifications. 308 */ 309 void enableLocationUpdates(); 310 311 /** 312 * Enable location update notifications. 313 * @param subId user preferred subId. 314 */ 315 void enableLocationUpdatesForSubscriber(long subId); 316 317 /** 318 * Disable location update notifications. 319 */ 320 void disableLocationUpdates(); 321 322 /** 323 * Disable location update notifications. 324 * @param subId user preferred subId. 325 */ 326 void disableLocationUpdatesForSubscriber(long subId); 327 328 /** 329 * Allow mobile data connections. 330 */ 331 boolean enableDataConnectivity(); 332 333 /** 334 * Disallow mobile data connections. 335 */ 336 boolean disableDataConnectivity(); 337 338 /** 339 * Report whether data connectivity is possible. 340 */ 341 boolean isDataConnectivityPossible(); 342 343 Bundle getCellLocation(); 344 345 /** 346 * Returns the neighboring cell information of the device. 347 */ 348 List<NeighboringCellInfo> getNeighboringCellInfo(String callingPkg); 349 350 int getCallState(); 351 352 /** 353 * Returns the call state for a subId. 354 */ 355 int getCallStateForSubscriber(long subId); 356 357 int getDataActivity(); 358 int getDataState(); 359 360 /** 361 * Returns the current active phone type as integer. 362 * Returns TelephonyManager.PHONE_TYPE_CDMA if RILConstants.CDMA_PHONE 363 * and TelephonyManager.PHONE_TYPE_GSM if RILConstants.GSM_PHONE 364 */ 365 int getActivePhoneType(); 366 367 /** 368 * Returns the current active phone type as integer for particular subId. 369 * Returns TelephonyManager.PHONE_TYPE_CDMA if RILConstants.CDMA_PHONE 370 * and TelephonyManager.PHONE_TYPE_GSM if RILConstants.GSM_PHONE 371 * @param subId user preferred subId. 372 */ 373 int getActivePhoneTypeForSubscriber(long subId); 374 375 /** 376 * Returns the CDMA ERI icon index to display 377 */ 378 int getCdmaEriIconIndex(); 379 380 /** 381 * Returns the CDMA ERI icon index to display on particular subId. 382 * @param subId user preferred subId. 383 */ 384 int getCdmaEriIconIndexForSubscriber(long subId); 385 386 /** 387 * Returns the CDMA ERI icon mode, 388 * 0 - ON 389 * 1 - FLASHING 390 */ 391 int getCdmaEriIconMode(); 392 393 /** 394 * Returns the CDMA ERI icon mode on particular subId, 395 * 0 - ON 396 * 1 - FLASHING 397 * @param subId user preferred subId. 398 */ 399 int getCdmaEriIconModeForSubscriber(long subId); 400 401 /** 402 * Returns the CDMA ERI text, 403 */ 404 String getCdmaEriText(); 405 406 /** 407 * Returns the CDMA ERI text for particular subId, 408 * @param subId user preferred subId. 409 */ 410 String getCdmaEriTextForSubscriber(long subId); 411 412 /** 413 * Returns true if OTA service provisioning needs to run. 414 * Only relevant on some technologies, others will always 415 * return false. 416 */ 417 boolean needsOtaServiceProvisioning(); 418 419 /** 420 * Returns the unread count of voicemails 421 */ 422 int getVoiceMessageCount(); 423 424 /** 425 * Returns the unread count of voicemails for a subId. 426 * @param subId user preferred subId. 427 * Returns the unread count of voicemails 428 */ 429 int getVoiceMessageCountForSubscriber(long subId); 430 431 /** 432 * Returns the network type for data transmission 433 */ 434 int getNetworkType(); 435 436 /** 437 * Returns the network type of a subId. 438 * @param subId user preferred subId. 439 * Returns the network type 440 */ 441 int getNetworkTypeForSubscriber(long subId); 442 443 /** 444 * Returns the network type for data transmission 445 */ 446 int getDataNetworkType(); 447 448 /** 449 * Returns the data network type of a subId 450 * @param subId user preferred subId. 451 * Returns the network type 452 */ 453 int getDataNetworkTypeForSubscriber(long subId); 454 455 /** 456 * Returns the network type for voice 457 */ 458 int getVoiceNetworkType(); 459 460 /** 461 * Returns the voice network type of a subId 462 * @param subId user preferred subId. 463 * Returns the network type 464 */ 465 int getVoiceNetworkTypeForSubscriber(long subId); 466 467 /** 468 * Return true if an ICC card is present 469 */ 470 boolean hasIccCard(); 471 472 /** 473 * Return true if an ICC card is present for a subId. 474 * @param slotId user preferred slotId. 475 * Return true if an ICC card is present 476 */ 477 boolean hasIccCardUsingSlotId(long slotId); 478 479 /** 480 * Return if the current radio is LTE on CDMA. This 481 * is a tri-state return value as for a period of time 482 * the mode may be unknown. 483 * 484 * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE} 485 * or {@link PHone#LTE_ON_CDMA_TRUE} 486 */ 487 int getLteOnCdmaMode(); 488 489 /** 490 * Return if the current radio is LTE on CDMA. This 491 * is a tri-state return value as for a period of time 492 * the mode may be unknown. 493 * 494 * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE} 495 * or {@link PHone#LTE_ON_CDMA_TRUE} 496 */ 497 int getLteOnCdmaModeForSubscriber(long subId); 498 499 /** 500 * Returns the all observed cell information of the device. 501 */ 502 List<CellInfo> getAllCellInfo(); 503 504 /** 505 * Sets minimum time in milli-seconds between onCellInfoChanged 506 */ 507 void setCellInfoListRate(int rateInMillis); 508 509 /** 510 * get default sim 511 * @return sim id 512 */ 513 int getDefaultSim(); 514 515 /** 516 * Opens a logical channel to the ICC card. 517 * 518 * Input parameters equivalent to TS 27.007 AT+CCHO command. 519 * 520 * @param AID Application id. See ETSI 102.221 and 101.220. 521 * @return an IccOpenLogicalChannelResponse object. 522 */ 523 IccOpenLogicalChannelResponse iccOpenLogicalChannel(String AID); 524 525 /** 526 * Closes a previously opened logical channel to the ICC card. 527 * 528 * Input parameters equivalent to TS 27.007 AT+CCHC command. 529 * 530 * @param channel is the channel id to be closed as retruned by a 531 * successful iccOpenLogicalChannel. 532 * @return true if the channel was closed successfully. 533 */ 534 boolean iccCloseLogicalChannel(int channel); 535 536 /** 537 * Transmit an APDU to the ICC card over a logical channel. 538 * 539 * Input parameters equivalent to TS 27.007 AT+CGLA command. 540 * 541 * @param channel is the channel id to be closed as retruned by a 542 * successful iccOpenLogicalChannel. 543 * @param cla Class of the APDU command. 544 * @param instruction Instruction of the APDU command. 545 * @param p1 P1 value of the APDU command. 546 * @param p2 P2 value of the APDU command. 547 * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU 548 * is sent to the SIM. 549 * @param data Data to be sent with the APDU. 550 * @return The APDU response from the ICC card with the status appended at 551 * the end. 552 */ 553 String iccTransmitApduLogicalChannel(int channel, int cla, int instruction, 554 int p1, int p2, int p3, String data); 555 556 /** 557 * Transmit an APDU to the ICC card over the basic channel. 558 * 559 * Input parameters equivalent to TS 27.007 AT+CSIM command. 560 * 561 * @param cla Class of the APDU command. 562 * @param instruction Instruction of the APDU command. 563 * @param p1 P1 value of the APDU command. 564 * @param p2 P2 value of the APDU command. 565 * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU 566 * is sent to the SIM. 567 * @param data Data to be sent with the APDU. 568 * @return The APDU response from the ICC card with the status appended at 569 * the end. 570 */ 571 String iccTransmitApduBasicChannel(int cla, int instruction, 572 int p1, int p2, int p3, String data); 573 574 /** 575 * Returns the response APDU for a command APDU sent through SIM_IO. 576 * 577 * @param fileID 578 * @param command 579 * @param p1 P1 value of the APDU command. 580 * @param p2 P2 value of the APDU command. 581 * @param p3 P3 value of the APDU command. 582 * @param filePath 583 * @return The APDU response. 584 */ 585 byte[] iccExchangeSimIO(int fileID, int command, int p1, int p2, int p3, 586 String filePath); 587 588 /** 589 * Send ENVELOPE to the SIM and returns the response. 590 * 591 * @param contents String containing SAT/USAT response in hexadecimal 592 * format starting with command tag. See TS 102 223 for 593 * details. 594 * @return The APDU response from the ICC card, with the last 4 bytes 595 * being the status word. If the command fails, returns an empty 596 * string. 597 */ 598 String sendEnvelopeWithStatus(String content); 599 600 /** 601 * Read one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}. 602 * Used for device configuration by some CDMA operators. 603 * 604 * @param itemID the ID of the item to read. 605 * @return the NV item as a String, or null on any failure. 606 */ 607 String nvReadItem(int itemID); 608 609 /** 610 * Write one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}. 611 * Used for device configuration by some CDMA operators. 612 * 613 * @param itemID the ID of the item to read. 614 * @param itemValue the value to write, as a String. 615 * @return true on success; false on any failure. 616 */ 617 boolean nvWriteItem(int itemID, String itemValue); 618 619 /** 620 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage. 621 * Used for device configuration by some CDMA operators. 622 * 623 * @param preferredRoamingList byte array containing the new PRL. 624 * @return true on success; false on any failure. 625 */ 626 boolean nvWriteCdmaPrl(in byte[] preferredRoamingList); 627 628 /** 629 * Perform the specified type of NV config reset. The radio will be taken offline 630 * and the device must be rebooted after the operation. Used for device 631 * configuration by some CDMA operators. 632 * 633 * @param resetType the type of reset to perform (1 == factory reset; 2 == NV-only reset). 634 * @return true on success; false on any failure. 635 */ 636 boolean nvResetConfig(int resetType); 637 638 /* 639 * Get the calculated preferred network type. 640 * Used for device configuration by some CDMA operators. 641 * 642 * @return the calculated preferred network type, defined in RILConstants.java. 643 */ 644 int getCalculatedPreferredNetworkType(); 645 646 /* 647 * Get the preferred network type. 648 * Used for device configuration by some CDMA operators. 649 * 650 * @return the preferred network type, defined in RILConstants.java. 651 */ 652 int getPreferredNetworkType(); 653 654 /** 655 * Set the preferred network type. 656 * Used for device configuration by some CDMA operators. 657 * 658 * @param networkType the preferred network type, defined in RILConstants.java. 659 * @return true on success; false on any failure. 660 */ 661 boolean setPreferredNetworkType(int networkType); 662 663 /** 664 * User enable/disable Mobile Data. 665 * 666 * @param enable true to turn on, else false 667 */ 668 void setDataEnabled(boolean enable); 669 670 /** 671 * Get the user enabled state of Mobile Data. 672 * 673 * @return true on enabled 674 */ 675 boolean getDataEnabled(); 676 677 /** 678 * Get P-CSCF address from PCO after data connection is established or modified. 679 * @param apnType the apnType, "ims" for IMS APN, "emergency" for EMERGENCY APN 680 */ 681 String[] getPcscfAddress(String apnType); 682 683 /** 684 * Set IMS registration state 685 */ 686 void setImsRegistrationState(boolean registered); 687 688 /** 689 * Return MDN string for CDMA phone. 690 * @param subId user preferred subId. 691 */ 692 String getCdmaMdn(long subId); 693 694 /** 695 * Return MIN string for CDMA phone. 696 * @param subId user preferred subId. 697 */ 698 String getCdmaMin(long subId); 699 700 /** 701 * Has the calling application been granted special privileges by the carrier. 702 * 703 * If any of the packages in the calling UID has carrier privileges, the 704 * call will return true. This access is granted by the owner of the UICC 705 * card and does not depend on the registered carrier. 706 * 707 * TODO: Add a link to documentation. 708 * 709 * @return carrier privilege status defined in TelephonyManager. 710 */ 711 int hasCarrierPrivileges(); 712 713 /** 714 * Similar to above, but check for pkg whose name is pkgname. 715 */ 716 int checkCarrierPrivilegesForPackage(String pkgname); 717 718 /** 719 * Returns the package name of the carrier apps that should handle the input intent. 720 * 721 * @param packageManager PackageManager for getting receivers. 722 * @param intent Intent that will be sent. 723 * @return list of carrier app package names that can handle the intent. 724 * Returns null if there is an error and an empty list if there 725 * are no matching packages. 726 */ 727 List<String> getCarrierPackageNamesForIntent(in Intent intent); 728 729 /** 730 * Set whether Android should display a simplified Mobile Network Settings UI 731 * for the current ICCID. 732 * 733 * @param subId for which the simplified UI should be enabled or disabled. 734 * @param enable true means enabling the simplified UI. 735 */ 736 void enableSimplifiedNetworkSettingsForSubscriber(long subId, boolean enable); 737 738 /** 739 * Get whether a simplified Mobile Network Settings UI is enabled for the 740 * current ICCID. 741 * 742 * @param subId for which the simplified UI should be enabled or disabled. 743 * @return true if the simplified UI is enabled. 744 */ 745 boolean getSimplifiedNetworkSettingsEnabledForSubscriber(long subId); 746 747 /** 748 * Set the line 1 phone number string and its alphatag for the current ICCID 749 * for display purpose only, for example, displayed in Phone Status. It won't 750 * change the actual MSISDN/MDN. To unset alphatag or number, pass in a null 751 * value. 752 * 753 * @param subId the subscriber that the alphatag and dialing number belongs to. 754 * @param alphaTag alpha-tagging of the dailing nubmer 755 * @param number The dialing number 756 */ 757 void setLine1NumberForDisplayForSubscriber(long subId, String alphaTag, String number); 758 759 /** 760 * Returns the displayed dialing number string if it was set previously via 761 * {@link #setLine1NumberForDisplay}. Otherwise returns null. 762 * 763 * @param subId whose dialing number for line 1 is returned. 764 * @return the displayed dialing number if set, or null if not set. 765 */ 766 String getLine1NumberForDisplay(long subId); 767 768 /** 769 * Returns the displayed alphatag of the dialing number if it was set 770 * previously via {@link #setLine1NumberForDisplay}. Otherwise returns null. 771 * 772 * @param subId whose alphatag associated with line 1 is returned. 773 * @return the displayed alphatag of the dialing number if set, or null if 774 * not set. 775 */ 776 String getLine1AlphaTagForDisplay(long subId); 777 778 /** 779 * Override the operator branding for the current ICCID. 780 * 781 * Once set, whenever the SIM is present in the device, the service 782 * provider name (SPN) and the operator name will both be replaced by the 783 * brand value input. To unset the value, the same function should be 784 * called with a null brand value. 785 * 786 * <p>Requires Permission: 787 * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} 788 * or has to be carrier app - see #hasCarrierPrivileges. 789 * 790 * @param brand The brand name to display/set. 791 * @return true if the operation was executed correctly. 792 */ 793 boolean setOperatorBrandOverride(String brand); 794 795 /** 796 * Returns the result and response from RIL for oem request 797 * 798 * @param oemReq the data is sent to ril. 799 * @param oemResp the respose data from RIL. 800 * @return negative value request was not handled or get error 801 * 0 request was handled succesfully, but no response data 802 * positive value success, data length of response 803 */ 804 int invokeOemRilRequestRaw(in byte[] oemReq, out byte[] oemResp); 805 806 /** 807 * Check if any mobile Radios need to be shutdown. 808 * 809 * @return true is any mobile radio needs to be shutdown 810 */ 811 boolean needMobileRadioShutdown(); 812 813 /** 814 * Shutdown Mobile Radios 815 */ 816 void shutdownMobileRadios(); 817 818 /** 819 * Set phone radio type and access technology. 820 * 821 * @param rafs an RadioAccessFamily array to indicate all phone's 822 * new radio access family. The length of RadioAccessFamily 823 * must equ]]al to phone count. 824 */ 825 void setRadioCapability(in RadioAccessFamily[] rafs); 826 827 /** 828 * Get phone radio type and access technology. 829 * 830 * @param phoneId which phone you want to get 831 * @return phone radio type and access technology 832 */ 833 int getRadioAccessFamily(in int phoneId); 834} 835