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