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