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