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