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