ITelephony.aidl revision 4f880138e4a5f35871ead3223206c76e5de6ee30
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.app.PendingIntent;
20import android.content.Intent;
21import android.os.Bundle;
22import android.os.IBinder;
23import android.os.Messenger;
24import android.os.ResultReceiver;
25import android.net.NetworkStats;
26import android.net.Uri;
27import android.service.carrier.CarrierIdentifier;
28import android.telecom.PhoneAccount;
29import android.telecom.PhoneAccountHandle;
30import android.telephony.CellInfo;
31import android.telephony.ClientRequestStats;
32import android.telephony.IccOpenLogicalChannelResponse;
33import android.telephony.ModemActivityInfo;
34import android.telephony.NeighboringCellInfo;
35import android.telephony.NetworkScanRequest;
36import android.telephony.RadioAccessFamily;
37import android.telephony.ServiceState;
38import android.telephony.SignalStrength;
39import android.telephony.TelephonyHistogram;
40import android.telephony.VisualVoicemailSmsFilterSettings;
41import com.android.ims.internal.IImsMMTelFeature;
42import com.android.ims.internal.IImsRcsFeature;
43import com.android.ims.internal.IImsRegistration;
44import com.android.ims.internal.IImsServiceFeatureCallback;
45import com.android.internal.telephony.CellNetworkScanResult;
46import com.android.internal.telephony.OperatorInfo;
47
48import java.util.List;
49
50import android.telephony.UiccSlotInfo;
51
52/**
53 * Interface used to interact with the phone.  Mostly this is used by the
54 * TelephonyManager class.  A few places are still using this directly.
55 * Please clean them up if possible and use TelephonyManager instead.
56 *
57 * {@hide}
58 */
59interface ITelephony {
60
61    /**
62     * Dial a number. This doesn't place the call. It displays
63     * the Dialer screen.
64     * @param number the number to be dialed. If null, this
65     * would display the Dialer screen with no number pre-filled.
66     */
67    void dial(String number);
68
69    /**
70     * Place a call to the specified number.
71     * @param callingPackage The package making the call.
72     * @param number the number to be called.
73     */
74    void call(String callingPackage, String number);
75
76    /**
77     * End call if there is a call in progress, otherwise does nothing.
78     *
79     * @return whether it hung up
80     */
81    boolean endCall();
82
83    /**
84     * End call on particular subId or go to the Home screen
85     * @param subId user preferred subId.
86     * @return whether it hung up
87     */
88    boolean endCallForSubscriber(int subId);
89
90    /**
91     * Answer the currently-ringing call.
92     *
93     * If there's already a current active call, that call will be
94     * automatically put on hold.  If both lines are currently in use, the
95     * current active call will be ended.
96     *
97     * TODO: provide a flag to let the caller specify what policy to use
98     * if both lines are in use.  (The current behavior is hardwired to
99     * "answer incoming, end ongoing", which is how the CALL button
100     * is specced to behave.)
101     *
102     * TODO: this should be a oneway call (especially since it's called
103     * directly from the key queue thread).
104     */
105    void answerRingingCall();
106
107    /**
108     * Answer the currently-ringing call on particular subId .
109     *
110     * If there's already a current active call, that call will be
111     * automatically put on hold.  If both lines are currently in use, the
112     * current active call will be ended.
113     *
114     * TODO: provide a flag to let the caller specify what policy to use
115     * if both lines are in use.  (The current behavior is hardwired to
116     * "answer incoming, end ongoing", which is how the CALL button
117     * is specced to behave.)
118     *
119     * TODO: this should be a oneway call (especially since it's called
120     * directly from the key queue thread).
121     */
122    void answerRingingCallForSubscriber(int subId);
123
124    /**
125     * Silence the ringer if an incoming call is currently ringing.
126     * (If vibrating, stop the vibrator also.)
127     *
128     * It's safe to call this if the ringer has already been silenced, or
129     * even if there's no incoming call.  (If so, this method will do nothing.)
130     *
131     * TODO: this should be a oneway call too (see above).
132     *       (Actually *all* the methods here that return void can
133     *       probably be oneway.)
134     */
135    void silenceRinger();
136
137    /**
138     * Check if we are in either an active or holding call
139     * @param callingPackage the name of the package making the call.
140     * @return true if the phone state is OFFHOOK.
141     */
142    boolean isOffhook(String callingPackage);
143
144    /**
145     * Check if a particular subId has an active or holding call
146     *
147     * @param subId user preferred subId.
148     * @param callingPackage the name of the package making the call.
149     * @return true if the phone state is OFFHOOK.
150     */
151    boolean isOffhookForSubscriber(int subId, String callingPackage);
152
153    /**
154     * Check if an incoming phone call is ringing or call waiting
155     * on a particular subId.
156     *
157     * @param subId user preferred subId.
158     * @param callingPackage the name of the package making the call.
159     * @return true if the phone state is RINGING.
160     */
161    boolean isRingingForSubscriber(int subId, String callingPackage);
162
163    /**
164     * Check if an incoming phone call is ringing or call waiting.
165     * @param callingPackage the name of the package making the call.
166     * @return true if the phone state is RINGING.
167     */
168    boolean isRinging(String callingPackage);
169
170    /**
171     * Check if the phone is idle.
172     * @param callingPackage the name of the package making the call.
173     * @return true if the phone state is IDLE.
174     */
175    boolean isIdle(String callingPackage);
176
177    /**
178     * Check if the phone is idle on a particular subId.
179     *
180     * @param subId user preferred subId.
181     * @param callingPackage the name of the package making the call.
182     * @return true if the phone state is IDLE.
183     */
184    boolean isIdleForSubscriber(int subId, String callingPackage);
185
186    /**
187     * Check to see if the radio is on or not.
188     * @param callingPackage the name of the package making the call.
189     * @return returns true if the radio is on.
190     */
191    boolean isRadioOn(String callingPackage);
192
193    /**
194     * Check to see if the radio is on or not on particular subId.
195     * @param subId user preferred subId.
196     * @param callingPackage the name of the package making the call.
197     * @return returns true if the radio is on.
198     */
199    boolean isRadioOnForSubscriber(int subId, String callingPackage);
200
201    /**
202     * Supply a pin to unlock the SIM.  Blocks until a result is determined.
203     * @param pin The pin to check.
204     * @return whether the operation was a success.
205     */
206    boolean supplyPin(String pin);
207
208    /**
209     * Supply a pin to unlock the SIM for particular subId.
210     * Blocks until a result is determined.
211     * @param pin The pin to check.
212     * @param subId user preferred subId.
213     * @return whether the operation was a success.
214     */
215    boolean supplyPinForSubscriber(int subId, String pin);
216
217    /**
218     * Supply puk to unlock the SIM and set SIM pin to new pin.
219     *  Blocks until a result is determined.
220     * @param puk The puk to check.
221     *        pin The new pin to be set in SIM
222     * @return whether the operation was a success.
223     */
224    boolean supplyPuk(String puk, String pin);
225
226    /**
227     * Supply puk to unlock the SIM and set SIM pin to new pin.
228     *  Blocks until a result is determined.
229     * @param puk The puk to check.
230     *        pin The new pin to be set in SIM
231     * @param subId user preferred subId.
232     * @return whether the operation was a success.
233     */
234    boolean supplyPukForSubscriber(int subId, String puk, String pin);
235
236    /**
237     * Supply a pin to unlock the SIM.  Blocks until a result is determined.
238     * Returns a specific success/error code.
239     * @param pin The pin to check.
240     * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code
241     *         retValue[1] = number of attempts remaining if known otherwise -1
242     */
243    int[] supplyPinReportResult(String pin);
244
245    /**
246     * Supply a pin to unlock the SIM.  Blocks until a result is determined.
247     * Returns a specific success/error code.
248     * @param pin The pin to check.
249     * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code
250     *         retValue[1] = number of attempts remaining if known otherwise -1
251     */
252    int[] supplyPinReportResultForSubscriber(int subId, String pin);
253
254    /**
255     * Supply puk to unlock the SIM and set SIM pin to new pin.
256     * Blocks until a result is determined.
257     * Returns a specific success/error code
258     * @param puk The puk to check
259     *        pin The pin to check.
260     * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code
261     *         retValue[1] = number of attempts remaining if known otherwise -1
262     */
263    int[] supplyPukReportResult(String puk, String pin);
264
265    /**
266     * Supply puk to unlock the SIM and set SIM pin to new pin.
267     * Blocks until a result is determined.
268     * Returns a specific success/error code
269     * @param puk The puk to check
270     *        pin The pin to check.
271     * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code
272     *         retValue[1] = number of attempts remaining if known otherwise -1
273     */
274    int[] supplyPukReportResultForSubscriber(int subId, String puk, String pin);
275
276    /**
277     * Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated
278     * without SEND (so <code>dial</code> is not appropriate).
279     *
280     * @param dialString the MMI command to be executed.
281     * @return true if MMI command is executed.
282     */
283    boolean handlePinMmi(String dialString);
284
285
286    /**
287     * Handles USSD commands.
288     *
289     * @param subId The subscription to use.
290     * @param ussdRequest the USSD command to be executed.
291     * @param wrappedCallback receives a callback result.
292     */
293    void handleUssdRequest(int subId, String ussdRequest, in ResultReceiver wrappedCallback);
294
295    /**
296     * Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated
297     * without SEND (so <code>dial</code> is not appropriate) for
298     * a particular subId.
299     * @param dialString the MMI command to be executed.
300     * @param subId user preferred subId.
301     * @return true if MMI command is executed.
302     */
303    boolean handlePinMmiForSubscriber(int subId, String dialString);
304
305    /**
306     * Toggles the radio on or off.
307     */
308    void toggleRadioOnOff();
309
310    /**
311     * Toggles the radio on or off on particular subId.
312     * @param subId user preferred subId.
313     */
314    void toggleRadioOnOffForSubscriber(int subId);
315
316    /**
317     * Set the radio to on or off
318     */
319    boolean setRadio(boolean turnOn);
320
321    /**
322     * Set the radio to on or off on particular subId.
323     * @param subId user preferred subId.
324     */
325    boolean setRadioForSubscriber(int subId, boolean turnOn);
326
327    /**
328     * Set the radio to on or off unconditionally
329     */
330    boolean setRadioPower(boolean turnOn);
331
332    /**
333     * Request to update location information in service state
334     */
335    void updateServiceLocation();
336
337    /**
338     * Request to update location information for a subscrition in service state
339     * @param subId user preferred subId.
340     */
341    void updateServiceLocationForSubscriber(int subId);
342
343    /**
344     * Enable location update notifications.
345     */
346    void enableLocationUpdates();
347
348    /**
349     * Enable location update notifications.
350     * @param subId user preferred subId.
351     */
352    void enableLocationUpdatesForSubscriber(int subId);
353
354    /**
355     * Disable location update notifications.
356     */
357    void disableLocationUpdates();
358
359    /**
360     * Disable location update notifications.
361     * @param subId user preferred subId.
362     */
363    void disableLocationUpdatesForSubscriber(int subId);
364
365    /**
366     * Allow mobile data connections.
367     */
368    boolean enableDataConnectivity();
369
370    /**
371     * Disallow mobile data connections.
372     */
373    boolean disableDataConnectivity();
374
375    /**
376     * Report whether data connectivity is possible.
377     */
378    boolean isDataConnectivityPossible(int subId);
379
380    Bundle getCellLocation(String callingPkg);
381
382    /**
383     * Returns the ISO country code equivalent of the current registered
384     * operator's MCC (Mobile Country Code).
385     * @see android.telephony.TelephonyManager#getNetworkCountryIso
386     */
387    String getNetworkCountryIsoForPhone(int phoneId);
388
389    /**
390     * Returns the neighboring cell information of the device.
391     */
392    List<NeighboringCellInfo> getNeighboringCellInfo(String callingPkg);
393
394     int getCallState();
395
396    /**
397     * Returns the call state for a slot.
398     */
399     int getCallStateForSlot(int slotIndex);
400
401     int getDataActivity();
402     int getDataState();
403
404    /**
405     * Returns the current active phone type as integer.
406     * Returns TelephonyManager.PHONE_TYPE_CDMA if RILConstants.CDMA_PHONE
407     * and TelephonyManager.PHONE_TYPE_GSM if RILConstants.GSM_PHONE
408     */
409    int getActivePhoneType();
410
411    /**
412     * Returns the current active phone type as integer for particular slot.
413     * Returns TelephonyManager.PHONE_TYPE_CDMA if RILConstants.CDMA_PHONE
414     * and TelephonyManager.PHONE_TYPE_GSM if RILConstants.GSM_PHONE
415     * @param slotIndex - slot to query.
416     */
417    int getActivePhoneTypeForSlot(int slotIndex);
418
419    /**
420     * Returns the CDMA ERI icon index to display
421     * @param callingPackage package making the call.
422     */
423    int getCdmaEriIconIndex(String callingPackage);
424
425    /**
426     * Returns the CDMA ERI icon index to display on particular subId.
427     * @param subId user preferred subId.
428     * @param callingPackage package making the call.
429     */
430    int getCdmaEriIconIndexForSubscriber(int subId, String callingPackage);
431
432    /**
433     * Returns the CDMA ERI icon mode,
434     * 0 - ON
435     * 1 - FLASHING
436     * @param callingPackage package making the call.
437     */
438    int getCdmaEriIconMode(String callingPackage);
439
440    /**
441     * Returns the CDMA ERI icon mode on particular subId,
442     * 0 - ON
443     * 1 - FLASHING
444     * @param subId user preferred subId.
445     * @param callingPackage package making the call.
446     */
447    int getCdmaEriIconModeForSubscriber(int subId, String callingPackage);
448
449    /**
450     * Returns the CDMA ERI text,
451     * @param callingPackage package making the call.
452     */
453    String getCdmaEriText(String callingPackage);
454
455    /**
456     * Returns the CDMA ERI text for particular subId,
457     * @param subId user preferred subId.
458     * @param callingPackage package making the call.
459     */
460    String getCdmaEriTextForSubscriber(int subId, String callingPackage);
461
462    /**
463     * Returns true if OTA service provisioning needs to run.
464     * Only relevant on some technologies, others will always
465     * return false.
466     */
467    boolean needsOtaServiceProvisioning();
468
469    /**
470     * Sets the voicemail number for a particular subscriber.
471     */
472    boolean setVoiceMailNumber(int subId, String alphaTag, String number);
473
474     /**
475      * Sets the voice activation state for a particular subscriber.
476      */
477    void setVoiceActivationState(int subId, int activationState);
478
479     /**
480      * Sets the data activation state for a particular subscriber.
481      */
482    void setDataActivationState(int subId, int activationState);
483
484     /**
485      * Returns the voice activation state for a particular subscriber.
486      * @param subId user preferred sub
487      * @param callingPackage package queries voice activation state
488      */
489    int getVoiceActivationState(int subId, String callingPackage);
490
491     /**
492      * Returns the data activation state for a particular subscriber.
493      * @param subId user preferred sub
494      * @param callingPackage package queris data activation state
495      */
496    int getDataActivationState(int subId, String callingPackage);
497
498    /**
499      * Returns the unread count of voicemails
500      */
501    int getVoiceMessageCount();
502
503    /**
504     * Returns the unread count of voicemails for a subId.
505     * @param subId user preferred subId.
506     * Returns the unread count of voicemails
507     */
508    int getVoiceMessageCountForSubscriber(int subId);
509
510    /**
511      * Returns true if current state supports both voice and data
512      * simultaneously. This can change based on location or network condition.
513      */
514    boolean isConcurrentVoiceAndDataAllowed(int subId);
515
516    Bundle getVisualVoicemailSettings(String callingPackage, int subId);
517
518    String getVisualVoicemailPackageName(String callingPackage, int subId);
519
520    // Not oneway, caller needs to make sure the vaule is set before receiving a SMS
521    void enableVisualVoicemailSmsFilter(String callingPackage, int subId,
522            in VisualVoicemailSmsFilterSettings settings);
523
524    oneway void disableVisualVoicemailSmsFilter(String callingPackage, int subId);
525
526    // Get settings set by the calling package
527    VisualVoicemailSmsFilterSettings getVisualVoicemailSmsFilterSettings(String callingPackage,
528            int subId);
529
530    /**
531     *  Get settings set by the current default dialer, Internal use only.
532     *  Requires READ_PRIVILEGED_PHONE_STATE permission.
533     */
534    VisualVoicemailSmsFilterSettings getActiveVisualVoicemailSmsFilterSettings(int subId);
535
536    /**
537     * Send a visual voicemail SMS. Internal use only.
538     * Requires caller to be the default dialer and have SEND_SMS permission
539     */
540    void sendVisualVoicemailSmsForSubscriber(in String callingPackage, in int subId,
541            in String number, in int port, in String text, in PendingIntent sentIntent);
542
543    // Send the special dialer code. The IPC caller must be the current default dialer.
544    void sendDialerSpecialCode(String callingPackageName, String inputCode);
545
546    /**
547     * Returns the network type for data transmission
548     * Legacy call, permission-free
549     */
550    int getNetworkType();
551
552    /**
553     * Returns the network type of a subId.
554     * @param subId user preferred subId.
555     * @param callingPackage package making the call.
556     */
557    int getNetworkTypeForSubscriber(int subId, String callingPackage);
558
559    /**
560     * Returns the network type for data transmission
561     * @param callingPackage package making the call.
562     */
563    int getDataNetworkType(String callingPackage);
564
565    /**
566     * Returns the data network type of a subId
567     * @param subId user preferred subId.
568     * @param callingPackage package making the call.
569     */
570    int getDataNetworkTypeForSubscriber(int subId, String callingPackage);
571
572    /**
573      * Returns the voice network type of a subId
574      * @param subId user preferred subId.
575      * @param callingPackage package making the call.
576      * Returns the network type
577      */
578    int getVoiceNetworkTypeForSubscriber(int subId, String callingPackage);
579
580    /**
581     * Return true if an ICC card is present
582     */
583    boolean hasIccCard();
584
585    /**
586     * Return true if an ICC card is present for a subId.
587     * @param slotIndex user preferred slotIndex.
588     * Return true if an ICC card is present
589     */
590    boolean hasIccCardUsingSlotIndex(int slotIndex);
591
592    /**
593     * Return if the current radio is LTE on CDMA. This
594     * is a tri-state return value as for a period of time
595     * the mode may be unknown.
596     *
597     * @param callingPackage the name of the calling package
598     * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
599     * or {@link PHone#LTE_ON_CDMA_TRUE}
600     */
601    int getLteOnCdmaMode(String callingPackage);
602
603    /**
604     * Return if the current radio is LTE on CDMA. This
605     * is a tri-state return value as for a period of time
606     * the mode may be unknown.
607     *
608     * @param callingPackage the name of the calling package
609     * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
610     * or {@link PHone#LTE_ON_CDMA_TRUE}
611     */
612    int getLteOnCdmaModeForSubscriber(int subId, String callingPackage);
613
614    /**
615     * Returns the all observed cell information of the device.
616     */
617    List<CellInfo> getAllCellInfo(String callingPkg);
618
619    /**
620     * Sets minimum time in milli-seconds between onCellInfoChanged
621     */
622    void setCellInfoListRate(int rateInMillis);
623
624    /**
625     * get default sim
626     * @return sim id
627     */
628    int getDefaultSim();
629
630    /**
631     * Opens a logical channel to the ICC card.
632     *
633     * Input parameters equivalent to TS 27.007 AT+CCHO command.
634     *
635     * @param subId The subscription to use.
636     * @param callingPackage the name of the package making the call.
637     * @param AID Application id. See ETSI 102.221 and 101.220.
638     * @param p2 P2 parameter (described in ISO 7816-4).
639     * @return an IccOpenLogicalChannelResponse object.
640     */
641    IccOpenLogicalChannelResponse iccOpenLogicalChannel(
642            int subId, String callingPackage, String AID, int p2);
643
644    /**
645     * Closes a previously opened logical channel to the ICC card.
646     *
647     * Input parameters equivalent to TS 27.007 AT+CCHC command.
648     *
649     * @param subId The subscription to use.
650     * @param channel is the channel id to be closed as retruned by a
651     *            successful iccOpenLogicalChannel.
652     * @return true if the channel was closed successfully.
653     */
654    boolean iccCloseLogicalChannel(int subId, int channel);
655
656    /**
657     * Transmit an APDU to the ICC card over a logical channel.
658     *
659     * Input parameters equivalent to TS 27.007 AT+CGLA command.
660     *
661     * @param subId The subscription to use.
662     * @param channel is the channel id to be closed as retruned by a
663     *            successful iccOpenLogicalChannel.
664     * @param cla Class of the APDU command.
665     * @param instruction Instruction of the APDU command.
666     * @param p1 P1 value of the APDU command.
667     * @param p2 P2 value of the APDU command.
668     * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU
669     *            is sent to the SIM.
670     * @param data Data to be sent with the APDU.
671     * @return The APDU response from the ICC card with the status appended at
672     *            the end.
673     */
674    String iccTransmitApduLogicalChannel(int subId, int channel, int cla, int instruction,
675            int p1, int p2, int p3, String data);
676
677    /**
678     * Transmit an APDU to the ICC card over the basic channel.
679     *
680     * Input parameters equivalent to TS 27.007 AT+CSIM command.
681     *
682     * @param subId The subscription to use.
683     * @param callingPackage the name of the package making the call.
684     * @param cla Class of the APDU command.
685     * @param instruction Instruction of the APDU command.
686     * @param p1 P1 value of the APDU command.
687     * @param p2 P2 value of the APDU command.
688     * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU
689     *            is sent to the SIM.
690     * @param data Data to be sent with the APDU.
691     * @return The APDU response from the ICC card with the status appended at
692     *            the end.
693     */
694    String iccTransmitApduBasicChannel(int subId, String callingPackage, int cla, int instruction,
695            int p1, int p2, int p3, String data);
696
697    /**
698     * Returns the response APDU for a command APDU sent through SIM_IO.
699     *
700     * @param subId The subscription to use.
701     * @param fileID
702     * @param command
703     * @param p1 P1 value of the APDU command.
704     * @param p2 P2 value of the APDU command.
705     * @param p3 P3 value of the APDU command.
706     * @param filePath
707     * @return The APDU response.
708     */
709    byte[] iccExchangeSimIO(int subId, int fileID, int command, int p1, int p2, int p3,
710            String filePath);
711
712    /**
713     * Send ENVELOPE to the SIM and returns the response.
714     *
715     * @param subId The subscription to use.
716     * @param contents  String containing SAT/USAT response in hexadecimal
717     *                  format starting with command tag. See TS 102 223 for
718     *                  details.
719     * @return The APDU response from the ICC card, with the last 4 bytes
720     *         being the status word. If the command fails, returns an empty
721     *         string.
722     */
723    String sendEnvelopeWithStatus(int subId, String content);
724
725    /**
726     * Read one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}.
727     * Used for device configuration by some CDMA operators.
728     *
729     * @param itemID the ID of the item to read.
730     * @return the NV item as a String, or null on any failure.
731     */
732    String nvReadItem(int itemID);
733
734    /**
735     * Write one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}.
736     * Used for device configuration by some CDMA operators.
737     *
738     * @param itemID the ID of the item to read.
739     * @param itemValue the value to write, as a String.
740     * @return true on success; false on any failure.
741     */
742    boolean nvWriteItem(int itemID, String itemValue);
743
744    /**
745     * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
746     * Used for device configuration by some CDMA operators.
747     *
748     * @param preferredRoamingList byte array containing the new PRL.
749     * @return true on success; false on any failure.
750     */
751    boolean nvWriteCdmaPrl(in byte[] preferredRoamingList);
752
753    /**
754     * Perform the specified type of NV config reset. The radio will be taken offline
755     * and the device must be rebooted after the operation. Used for device
756     * configuration by some CDMA operators.
757     *
758     * @param resetType the type of reset to perform (1 == factory reset; 2 == NV-only reset).
759     * @return true on success; false on any failure.
760     */
761    boolean nvResetConfig(int resetType);
762
763    /*
764     * Get the calculated preferred network type.
765     * Used for device configuration by some CDMA operators.
766     * @param callingPackage The package making the call.
767     *
768     * @return the calculated preferred network type, defined in RILConstants.java.
769     */
770    int getCalculatedPreferredNetworkType(String callingPackage);
771
772    /*
773     * Get the preferred network type.
774     * Used for device configuration by some CDMA operators.
775     *
776     * @param subId the id of the subscription to query.
777     * @return the preferred network type, defined in RILConstants.java.
778     */
779    int getPreferredNetworkType(int subId);
780
781    /**
782     * Check TETHER_DUN_REQUIRED and TETHER_DUN_APN settings, net.tethering.noprovisioning
783     * SystemProperty, and config_tether_apndata to decide whether DUN APN is required for
784     * tethering.
785     *
786     * @return 0: Not required. 1: required. 2: Not set.
787     */
788    int getTetherApnRequired();
789
790    /**
791     *  Get IImsMMTelFeature binder from ImsResolver that corresponds to the subId and MMTel feature
792     *  as well as registering the MMTelFeature for callbacks using the IImsServiceFeatureCallback
793     *  interface.
794     */
795    IImsMMTelFeature getMMTelFeatureAndListen(int slotId, in IImsServiceFeatureCallback callback);
796
797    /**
798     *  Get IImsMMTelFeature binder from ImsResolver that corresponds to the subId and MMTel feature
799     *  as well as registering the MMTelFeature for callbacks using the IImsServiceFeatureCallback
800     *  interface.
801     *  Used for emergency calling only.
802     */
803    IImsMMTelFeature getEmergencyMMTelFeatureAndListen(int slotId,
804            in IImsServiceFeatureCallback callback);
805
806    /**
807     *  Get IImsRcsFeature binder from ImsResolver that corresponds to the subId and RCS feature
808     *  as well as registering the RcsFeature for callbacks using the IImsServiceFeatureCallback
809     *  interface.
810     */
811    IImsRcsFeature getRcsFeatureAndListen(int slotId, in IImsServiceFeatureCallback callback);
812
813    /**
814    * Returns the IImsRegistration associated with the slot and feature specified.
815    */
816    IImsRegistration getImsRegistration(int slotId, int feature);
817
818    /**
819     * Set the network selection mode to automatic.
820     *
821     * @param subId the id of the subscription to update.
822     */
823    void setNetworkSelectionModeAutomatic(int subId);
824
825    /**
826     * Perform a radio scan and return the list of avialble networks.
827     *
828     * @param subId the id of the subscription.
829     * @return CellNetworkScanResult containing status of scan and networks.
830     */
831    CellNetworkScanResult getCellNetworkScanResults(int subId);
832
833    /**
834     * Perform a radio network scan and return the id of this scan.
835     *
836     * @param subId the id of the subscription.
837     * @param request Defines all the configs for network scan.
838     * @param messenger Callback messages will be sent using this messenger.
839     * @param binder the binder object instantiated in TelephonyManager.
840     * @return An id for this scan.
841     */
842    int requestNetworkScan(int subId, in NetworkScanRequest request, in Messenger messenger,
843            in IBinder binder);
844
845    /**
846     * Stop an existing radio network scan.
847     *
848     * @param subId the id of the subscription.
849     * @param scanId The id of the scan that is going to be stopped.
850     */
851    void stopNetworkScan(int subId, int scanId);
852
853    /**
854     * Ask the radio to connect to the input network and change selection mode to manual.
855     *
856     * @param subId the id of the subscription.
857     * @param operatorNumeric the PLMN of the operator to attach to.
858     * @param persistSelection Whether the selection will persist until reboot. If true, only allows
859     * attaching to the selected PLMN until reboot; otherwise, attach to the chosen PLMN and resume
860     * normal network selection next time.
861     * @return true if the request suceeded.
862     */
863    boolean setNetworkSelectionModeManual(int subId, in String operatorNumeric,
864            boolean persistSelection);
865
866    /**
867     * Set the preferred network type.
868     * Used for device configuration by some CDMA operators.
869     *
870     * @param subId the id of the subscription to update.
871     * @param networkType the preferred network type, defined in RILConstants.java.
872     * @return true on success; false on any failure.
873     */
874    boolean setPreferredNetworkType(int subId, int networkType);
875
876    /**
877     * User enable/disable Mobile Data.
878     *
879     * @param enable true to turn on, else false
880     */
881    void setUserDataEnabled(int subId, boolean enable);
882
883    /**
884     * Get the user enabled state of Mobile Data.
885     *
886     * TODO: remove and use isUserDataEnabled.
887     * This can't be removed now because some vendor codes
888     * calls through ITelephony directly while they should
889     * use TelephonyManager.
890     *
891     * @return true on enabled
892     */
893    boolean getDataEnabled(int subId);
894
895    /**
896     * Get the user enabled state of Mobile Data.
897     *
898     * @return true on enabled
899     */
900    boolean isUserDataEnabled(int subId);
901
902    /**
903     * Get the overall enabled state of Mobile Data.
904     *
905     * @return true on enabled
906     */
907    boolean isDataEnabled(int subId);
908
909    /**
910     * Get P-CSCF address from PCO after data connection is established or modified.
911     * @param apnType the apnType, "ims" for IMS APN, "emergency" for EMERGENCY APN
912     * @param callingPackage The package making the call.
913     */
914    String[] getPcscfAddress(String apnType, String callingPackage);
915
916    /**
917     * Set IMS registration state
918     */
919    void setImsRegistrationState(boolean registered);
920
921    /**
922     * Return MDN string for CDMA phone.
923     * @param subId user preferred subId.
924     */
925    String getCdmaMdn(int subId);
926
927    /**
928     * Return MIN string for CDMA phone.
929     * @param subId user preferred subId.
930     */
931    String getCdmaMin(int subId);
932
933    /**
934     * Has the calling application been granted special privileges by the carrier.
935     *
936     * If any of the packages in the calling UID has carrier privileges, the
937     * call will return true. This access is granted by the owner of the UICC
938     * card and does not depend on the registered carrier.
939     *
940     * TODO: Add a link to documentation.
941     *
942     * @param subId The subscription to use.
943     * @return carrier privilege status defined in TelephonyManager.
944     */
945    int getCarrierPrivilegeStatus(int subId);
946
947    /**
948     * Similar to above, but check for the package whose name is pkgName.
949     */
950    int checkCarrierPrivilegesForPackage(String pkgName);
951
952    /**
953     * Similar to above, but check across all phones.
954     */
955    int checkCarrierPrivilegesForPackageAnyPhone(String pkgName);
956
957    /**
958     * Returns list of the package names of the carrier apps that should handle the input intent
959     * and have carrier privileges for the given phoneId.
960     *
961     * @param intent Intent that will be sent.
962     * @param phoneId The phoneId on which the carrier app has carrier privileges.
963     * @return list of carrier app package names that can handle the intent on phoneId.
964     *         Returns null if there is an error and an empty list if there
965     *         are no matching packages.
966     */
967    List<String> getCarrierPackageNamesForIntentAndPhone(in Intent intent, int phoneId);
968
969    /**
970     * Set the line 1 phone number string and its alphatag for the current ICCID
971     * for display purpose only, for example, displayed in Phone Status. It won't
972     * change the actual MSISDN/MDN. To unset alphatag or number, pass in a null
973     * value.
974     *
975     * @param subId the subscriber that the alphatag and dialing number belongs to.
976     * @param alphaTag alpha-tagging of the dailing nubmer
977     * @param number The dialing number
978     * @return true if the operation was executed correctly.
979     */
980    boolean setLine1NumberForDisplayForSubscriber(int subId, String alphaTag, String number);
981
982    /**
983     * Returns the displayed dialing number string if it was set previously via
984     * {@link #setLine1NumberForDisplay}. Otherwise returns null.
985     *
986     * @param subId whose dialing number for line 1 is returned.
987     * @param callingPackage The package making the call.
988     * @return the displayed dialing number if set, or null if not set.
989     */
990    String getLine1NumberForDisplay(int subId, String callingPackage);
991
992    /**
993     * Returns the displayed alphatag of the dialing number if it was set
994     * previously via {@link #setLine1NumberForDisplay}. Otherwise returns null.
995     *
996     * @param subId whose alphatag associated with line 1 is returned.
997     * @param callingPackage The package making the call.
998     * @return the displayed alphatag of the dialing number if set, or null if
999     *         not set.
1000     */
1001    String getLine1AlphaTagForDisplay(int subId, String callingPackage);
1002
1003    String[] getMergedSubscriberIds(String callingPackage);
1004
1005    /**
1006     * Override the operator branding for the current ICCID.
1007     *
1008     * Once set, whenever the SIM is present in the device, the service
1009     * provider name (SPN) and the operator name will both be replaced by the
1010     * brand value input. To unset the value, the same function should be
1011     * called with a null brand value.
1012     *
1013     * <p>Requires Permission:
1014     *   {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
1015     *  or has to be carrier app - see #hasCarrierPrivileges.
1016     *
1017     * @param subId The subscription to use.
1018     * @param brand The brand name to display/set.
1019     * @return true if the operation was executed correctly.
1020     */
1021    boolean setOperatorBrandOverride(int subId, String brand);
1022
1023    /**
1024     * Override the roaming indicator for the current ICCID.
1025     *
1026     * Using this call, the carrier app (see #hasCarrierPrivileges) can override
1027     * the platform's notion of a network operator being considered roaming or not.
1028     * The change only affects the ICCID that was active when this call was made.
1029     *
1030     * If null is passed as any of the input, the corresponding value is deleted.
1031     *
1032     * <p>Requires that the caller have carrier privilege. See #hasCarrierPrivileges.
1033     *
1034     * @param subId for which the roaming overrides apply.
1035     * @param gsmRoamingList - List of MCCMNCs to be considered roaming for 3GPP RATs.
1036     * @param gsmNonRoamingList - List of MCCMNCs to be considered not roaming for 3GPP RATs.
1037     * @param cdmaRoamingList - List of SIDs to be considered roaming for 3GPP2 RATs.
1038     * @param cdmaNonRoamingList - List of SIDs to be considered not roaming for 3GPP2 RATs.
1039     * @return true if the operation was executed correctly.
1040     */
1041    boolean setRoamingOverride(int subId, in List<String> gsmRoamingList,
1042            in List<String> gsmNonRoamingList, in List<String> cdmaRoamingList,
1043            in List<String> cdmaNonRoamingList);
1044
1045    /**
1046     * Check if any mobile Radios need to be shutdown.
1047     *
1048     * @return true is any mobile radio needs to be shutdown
1049     */
1050    boolean needMobileRadioShutdown();
1051
1052    /**
1053     * Shutdown Mobile Radios
1054     */
1055    void shutdownMobileRadios();
1056
1057    /**
1058     * Set phone radio type and access technology.
1059     *
1060     * @param rafs an RadioAccessFamily array to indicate all phone's
1061     *        new radio access family. The length of RadioAccessFamily
1062     *        must equ]]al to phone count.
1063     */
1064    void setRadioCapability(in RadioAccessFamily[] rafs);
1065
1066    /**
1067     * Get phone radio type and access technology.
1068     *
1069     * @param phoneId which phone you want to get
1070     * @param callingPackage the name of the package making the call
1071     * @return phone radio type and access technology
1072     */
1073    int getRadioAccessFamily(in int phoneId, String callingPackage);
1074
1075    /**
1076     * Enables or disables video calling.
1077     *
1078     * @param enable Whether to enable video calling.
1079     */
1080    void enableVideoCalling(boolean enable);
1081
1082    /**
1083     * Whether video calling has been enabled by the user.
1084     *
1085     * @param callingPackage The package making the call.
1086     * @return {@code true} if the user has enabled video calling, {@code false} otherwise.
1087     */
1088    boolean isVideoCallingEnabled(String callingPackage);
1089
1090    /**
1091     * Whether the DTMF tone length can be changed.
1092     *
1093     * @return {@code true} if the DTMF tone length can be changed.
1094     */
1095    boolean canChangeDtmfToneLength();
1096
1097    /**
1098     * Whether the device is a world phone.
1099     *
1100     * @return {@code true} if the devices is a world phone.
1101     */
1102    boolean isWorldPhone();
1103
1104    /**
1105     * Whether the phone supports TTY mode.
1106     *
1107     * @return {@code true} if the device supports TTY mode.
1108     */
1109    boolean isTtyModeSupported();
1110
1111    /**
1112     * Whether the phone supports hearing aid compatibility.
1113     *
1114     * @return {@code true} if the device supports hearing aid compatibility.
1115     */
1116    boolean isHearingAidCompatibilitySupported();
1117
1118    /**
1119     * Get IMS Registration Status
1120     */
1121    boolean isImsRegistered();
1122
1123    /**
1124     * Get IMS Registration Status on a particular subid.
1125     *
1126     * @param subId user preferred subId.
1127     *
1128     * @return {@code true} if the IMS status is registered.
1129     */
1130    boolean isImsRegisteredForSubscriber(int subId);
1131
1132    /**
1133     * Returns the Status of Wi-Fi Calling
1134     */
1135    boolean isWifiCallingAvailable();
1136
1137    /**
1138     * Returns the Status of Volte
1139     */
1140    boolean isVolteAvailable();
1141
1142     /**
1143     * Returns the Status of VT (video telephony)
1144     */
1145    boolean isVideoTelephonyAvailable();
1146
1147    /**
1148      * Returns the unique device ID of phone, for example, the IMEI for
1149      * GSM and the MEID for CDMA phones. Return null if device ID is not available.
1150      *
1151      * @param callingPackage The package making the call.
1152      * <p>Requires Permission:
1153      *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
1154      */
1155    String getDeviceId(String callingPackage);
1156
1157    /**
1158     * Returns the IMEI for the given slot.
1159     *
1160     * @param slotIndex - device slot.
1161     * @param callingPackage The package making the call.
1162     * <p>Requires Permission:
1163     *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
1164     */
1165    String getImeiForSlot(int slotIndex, String callingPackage);
1166
1167    /**
1168     * Returns the MEID for the given slot.
1169     *
1170     * @param slotIndex - device slot.
1171     * @param callingPackage The package making the call.
1172     * <p>Requires Permission:
1173     *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
1174     */
1175    String getMeidForSlot(int slotIndex, String callingPackage);
1176
1177    /**
1178     * Returns the device software version.
1179     *
1180     * @param slotIndex - device slot.
1181     * @param callingPackage The package making the call.
1182     * <p>Requires Permission:
1183     *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
1184     */
1185    String getDeviceSoftwareVersionForSlot(int slotIndex, String callingPackage);
1186
1187    /**
1188     * Returns the subscription ID associated with the specified PhoneAccount.
1189     */
1190    int getSubIdForPhoneAccount(in PhoneAccount phoneAccount);
1191
1192    void factoryReset(int subId);
1193
1194    /**
1195     * An estimate of the users's current locale based on the default SIM.
1196     *
1197     * The returned string will be a well formed BCP-47 language tag, or {@code null}
1198     * if no locale could be derived.
1199     */
1200    String getLocaleFromDefaultSim();
1201
1202    /**
1203     * Requests the modem activity info asynchronously.
1204     * The implementor is expected to reply with the
1205     * {@link android.telephony.ModemActivityInfo} object placed into the Bundle with the key
1206     * {@link android.telephony.TelephonyManager#MODEM_ACTIVITY_RESULT_KEY}.
1207     * The result code is ignored.
1208     */
1209    oneway void requestModemActivityInfo(in ResultReceiver result);
1210
1211    /**
1212     * Get the service state on specified subscription
1213     * @param subId Subscription id
1214     * @param callingPackage The package making the call
1215     * @return Service state on specified subscription.
1216     */
1217    ServiceState getServiceStateForSubscriber(int subId, String callingPackage);
1218
1219    /**
1220     * Returns the URI for the per-account voicemail ringtone set in Phone settings.
1221     *
1222     * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
1223     * voicemail ringtone.
1224     * @return The URI for the ringtone to play when receiving a voicemail from a specific
1225     * PhoneAccount.
1226     */
1227    Uri getVoicemailRingtoneUri(in PhoneAccountHandle accountHandle);
1228
1229    /**
1230     * Sets the per-account voicemail ringtone.
1231     *
1232     * <p>Requires that the calling app is the default dialer, or has carrier privileges, or
1233     * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
1234     *
1235     * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
1236     * voicemail ringtone.
1237     * @param uri The URI for the ringtone to play when receiving a voicemail from a specific
1238     * PhoneAccount.
1239     */
1240    void setVoicemailRingtoneUri(String callingPackage,
1241            in PhoneAccountHandle phoneAccountHandle, in Uri uri);
1242
1243    /**
1244     * Returns whether vibration is set for voicemail notification in Phone settings.
1245     *
1246     * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
1247     * voicemail vibration setting.
1248     * @return {@code true} if the vibration is set for this PhoneAccount, {@code false} otherwise.
1249     */
1250    boolean isVoicemailVibrationEnabled(in PhoneAccountHandle accountHandle);
1251
1252    /**
1253     * Sets the per-account preference whether vibration is enabled for voicemail notifications.
1254     *
1255     * <p>Requires that the calling app is the default dialer, or has carrier privileges, or
1256     * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
1257     *
1258     * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
1259     * voicemail vibration setting.
1260     * @param enabled Whether to enable or disable vibration for voicemail notifications from a
1261     * specific PhoneAccount.
1262     */
1263    void setVoicemailVibrationEnabled(String callingPackage,
1264            in PhoneAccountHandle phoneAccountHandle, boolean enabled);
1265
1266    /**
1267     * Returns a list of packages that have carrier privileges.
1268     */
1269    List<String> getPackagesWithCarrierPrivileges();
1270
1271    /**
1272     * Return the application ID for the app type.
1273     *
1274     * @param subId the subscription ID that this request applies to.
1275     * @param appType the uicc app type,
1276     * @return Application ID for specificied app type or null if no uicc or error.
1277     */
1278    String getAidForAppType(int subId, int appType);
1279
1280    /**
1281    * Return the Electronic Serial Number.
1282    *
1283    * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission
1284    *
1285    * @param subId the subscription ID that this request applies to.
1286    * @return ESN or null if error.
1287    * @hide
1288    */
1289    String getEsn(int subId);
1290
1291    /**
1292    * Return the Preferred Roaming List Version
1293    *
1294    * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission
1295    * @param subId the subscription ID that this request applies to.
1296    * @return PRLVersion or null if error.
1297    * @hide
1298    */
1299    String getCdmaPrlVersion(int subId);
1300
1301    /**
1302     * Get snapshot of Telephony histograms
1303     * @return List of Telephony histograms
1304     * Requires Permission:
1305     *   {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
1306     * Or the calling app has carrier privileges.
1307     */
1308    List<TelephonyHistogram> getTelephonyHistograms();
1309
1310    /**
1311     * Set the allowed carrier list for slotIndex
1312     * Require system privileges. In the future we may add this to carrier APIs.
1313     *
1314     * @return The number of carriers set successfully. Should match length of
1315     * carriers on success.
1316     */
1317    int setAllowedCarriers(int slotIndex, in List<CarrierIdentifier> carriers);
1318
1319    /**
1320     * Get the allowed carrier list for slotIndex.
1321     * Require system privileges. In the future we may add this to carrier APIs.
1322     *
1323     * @return List of {@link android.service.carrier.CarrierIdentifier}; empty list
1324     * means all carriers are allowed.
1325     */
1326    List<CarrierIdentifier> getAllowedCarriers(int slotIndex);
1327
1328   /**
1329     * Returns carrier id of the given subscription.
1330     * <p>To recognize carrier as a first class identity, assign each carrier with a canonical
1331     * integer a.k.a carrier id.
1332     *
1333     * @param subId The subscription id
1334     * @return Carrier id of given subscription id. return {@link #UNKNOWN_CARRIER_ID} if
1335     * subscription is unavailable or carrier cannot be identified.
1336     * @throws IllegalStateException if telephony service is unavailable.
1337     * @hide
1338     */
1339    int getSubscriptionCarrierId(int subId);
1340
1341    /**
1342     * Returns carrier name of the given subscription.
1343     * <p>Carrier name is a user-facing name of carrier id {@link #getSubscriptionCarrierId(int)},
1344     * usually the brand name of the subsidiary (e.g. T-Mobile). Each carrier could configure
1345     * multiple {@link #getSimOperatorName() SPN} but should have a single carrier name.
1346     * Carrier name is not canonical identity, use {@link #getSubscriptionCarrierId(int)} instead.
1347     * <p>Returned carrier name is unlocalized.
1348     *
1349     * @return Carrier name of given subscription id. return {@code null} if subscription is
1350     * unavailable or carrier cannot be identified.
1351     * @throws IllegalStateException if telephony service is unavailable.
1352     * @hide
1353     */
1354    String getSubscriptionCarrierName(int subId);
1355
1356    /**
1357     * Action set from carrier signalling broadcast receivers to enable/disable metered apns
1358     * Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required
1359     * @param subId the subscription ID that this action applies to.
1360     * @param enabled control enable or disable metered apns.
1361     * @hide
1362     */
1363    void carrierActionSetMeteredApnsEnabled(int subId, boolean visible);
1364
1365    /**
1366     * Action set from carrier signalling broadcast receivers to enable/disable radio
1367     * Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required
1368     * @param subId the subscription ID that this action applies to.
1369     * @param enabled control enable or disable radio.
1370     * @hide
1371     */
1372    void carrierActionSetRadioEnabled(int subId, boolean enabled);
1373
1374    /**
1375     * Action set from carrier signalling broadcast receivers to start/stop reporting default
1376     * network conditions.
1377     * Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required
1378     * @param subId the subscription ID that this action applies to.
1379     * @param report control start/stop reporting default network events.
1380     * @hide
1381     */
1382    void carrierActionReportDefaultNetworkStatus(int subId, boolean report);
1383
1384    /**
1385     * Get aggregated video call data usage since boot.
1386     * Permissions android.Manifest.permission.READ_NETWORK_USAGE_HISTORY is required.
1387     *
1388     * @param perUidStats True if requesting data usage per uid, otherwise overall usage.
1389     * @return Snapshot of video call data usage
1390     * @hide
1391     */
1392    NetworkStats getVtDataUsage(int subId, boolean perUidStats);
1393
1394    /**
1395     * Policy control of data connection. Usually used when data limit is passed.
1396     * @param enabled True if enabling the data, otherwise disabling.
1397     * @param subId Subscription index
1398     * @hide
1399     */
1400    void setPolicyDataEnabled(boolean enabled, int subId);
1401
1402    /**
1403     * Get Client request stats which will contain statistical information
1404     * on each request made by client.
1405     * @param callingPackage package making the call.
1406     * @param subId Subscription index
1407     * @hide
1408     */
1409    List<ClientRequestStats> getClientRequestStats(String callingPackage, int subid);
1410
1411    /**
1412     * Set SIM card power state.
1413     * @param slotIndex SIM slot id
1414     * @param state  State of SIM (power down, power up, pass through)
1415     * @hide
1416     * */
1417    void setSimPowerStateForSlot(int slotIndex, int state);
1418
1419    /**
1420     * Returns a list of Forbidden PLMNs from the specified SIM App
1421     * Returns null if the query fails.
1422     *
1423     *
1424     * <p>Requires that the calling app has READ_PRIVILEGED_PHONE_STATE
1425     *
1426     * @param subId subscription ID used for authentication
1427     * @param appType the icc application type, like {@link #APPTYPE_USIM}
1428     */
1429    String[] getForbiddenPlmns(int subId, int appType);
1430
1431    /**
1432     * Check if phone is in emergency callback mode
1433     * @return true if phone is in emergency callback mode
1434     * @param subId the subscription ID that this action applies to.
1435     * @hide
1436     */
1437    boolean getEmergencyCallbackMode(int subId);
1438
1439    /**
1440     * Get the most recently available signal strength information.
1441     *
1442     * Get the most recent SignalStrength information reported by the modem. Due
1443     * to power saving this information may not always be current.
1444     * @param subId Subscription index
1445     * @return the most recent cached signal strength info from the modem
1446     * @hide
1447     */
1448    SignalStrength getSignalStrength(int subId);
1449
1450    /**
1451     * Get slot info for all the UICC slots.
1452     * @return UiccSlotInfo array.
1453     * @hide
1454     */
1455    UiccSlotInfo[] getUiccSlotsInfo();
1456
1457    /**
1458     * Map logicalSlot to physicalSlot, and activate the physicalSlot if it is inactive.
1459     * @param physicalSlots Index i in the array representing physical slot for phone i. The array
1460     *        size should be same as getPhoneCount().
1461     * @return boolean Return true if the switch succeeds, false if the switch fails.
1462     */
1463    boolean switchSlots(in int[] physicalSlots);
1464}
1465