ITelephony.aidl revision 812188ad06660ec1b3b2b027ccfa291335021664
1c383a500aa59423264811be3874461bf8adbfea0Zonr Chang/*
2d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines * Copyright (C) 2007 The Android Open Source Project
3c383a500aa59423264811be3874461bf8adbfea0Zonr Chang *
4c383a500aa59423264811be3874461bf8adbfea0Zonr Chang * Licensed under the Apache License, Version 2.0 (the "License");
5c383a500aa59423264811be3874461bf8adbfea0Zonr Chang * you may not use this file except in compliance with the License.
6c383a500aa59423264811be3874461bf8adbfea0Zonr Chang * You may obtain a copy of the License at
7c383a500aa59423264811be3874461bf8adbfea0Zonr Chang *
8c383a500aa59423264811be3874461bf8adbfea0Zonr Chang *      http://www.apache.org/licenses/LICENSE-2.0
9c383a500aa59423264811be3874461bf8adbfea0Zonr Chang *
10c383a500aa59423264811be3874461bf8adbfea0Zonr Chang * Unless required by applicable law or agreed to in writing, software
11c383a500aa59423264811be3874461bf8adbfea0Zonr Chang * distributed under the License is distributed on an "AS IS" BASIS,
12c383a500aa59423264811be3874461bf8adbfea0Zonr Chang * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13c383a500aa59423264811be3874461bf8adbfea0Zonr Chang * See the License for the specific language governing permissions and
14c383a500aa59423264811be3874461bf8adbfea0Zonr Chang * limitations under the License.
15c383a500aa59423264811be3874461bf8adbfea0Zonr Chang */
16c383a500aa59423264811be3874461bf8adbfea0Zonr Chang
176315f76e3cc6ff2d012d1183a0b030d4ff0dc808zonrpackage com.android.internal.telephony;
18462aefd62cc646d2ff753c1d003ef3cd7bbea26Shih-wei Liao
19e37f7d349704bdd8c94afad7c6021561787ec5c9Shih-wei Liaoimport android.app.PendingIntent;
209ef2f785e0cc490af678dfd685995dec787321ffShih-wei Liaoimport android.content.Intent;
21462aefd62cc646d2ff753c1d003ef3cd7bbea26Shih-wei Liaoimport android.os.Bundle;
22e639eb5caa2c386b4a60659a4929e8a6141a2cbeStephen Hinesimport android.os.ResultReceiver;
23e639eb5caa2c386b4a60659a4929e8a6141a2cbeStephen Hinesimport android.net.Uri;
246315f76e3cc6ff2d012d1183a0b030d4ff0dc808zonrimport android.service.carrier.CarrierIdentifier;
256315f76e3cc6ff2d012d1183a0b030d4ff0dc808zonrimport android.telecom.PhoneAccount;
266315f76e3cc6ff2d012d1183a0b030d4ff0dc808zonrimport android.telecom.PhoneAccountHandle;
27e639eb5caa2c386b4a60659a4929e8a6141a2cbeStephen Hinesimport android.telephony.CellInfo;
28462aefd62cc646d2ff753c1d003ef3cd7bbea26Shih-wei Liaoimport android.telephony.ClientRequestStats;
299ef2f785e0cc490af678dfd685995dec787321ffShih-wei Liaoimport android.telephony.IccOpenLogicalChannelResponse;
309ef2f785e0cc490af678dfd685995dec787321ffShih-wei Liaoimport android.telephony.ModemActivityInfo;
316315f76e3cc6ff2d012d1183a0b030d4ff0dc808zonrimport android.telephony.NeighboringCellInfo;
32a41ce1d98094da84643995d40d71c529905123fcZonr Changimport android.telephony.RadioAccessFamily;
336315f76e3cc6ff2d012d1183a0b030d4ff0dc808zonrimport android.telephony.ServiceState;
346315f76e3cc6ff2d012d1183a0b030d4ff0dc808zonrimport android.telephony.TelephonyHistogram;
35d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hinesimport android.telephony.VisualVoicemailSmsFilterSettings;
361f6c331d622ac645ab68a016aa4c577998547373Stephen Hinesimport com.android.internal.telephony.CellNetworkScanResult;
37d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hinesimport com.android.internal.telephony.OperatorInfo;
38d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines
399ef2f785e0cc490af678dfd685995dec787321ffShih-wei Liaoimport java.util.List;
409ef2f785e0cc490af678dfd685995dec787321ffShih-wei Liao
415abbe0e9ca2508260b627ffef2bf01e2554e8357Chris Wailes
429ef2f785e0cc490af678dfd685995dec787321ffShih-wei Liao/**
43324c0479ec3edda573de60b2e6476507a99d06f7Shih-wei Liao * Interface used to interact with the phone.  Mostly this is used by the
449ef2f785e0cc490af678dfd685995dec787321ffShih-wei Liao * TelephonyManager class.  A few places are still using this directly.
454c622e0953afe3dca4da0aee364a811f3ccb61d9Stephen Hines * Please clean them up if possible and use TelephonyManager instead.
46324c0479ec3edda573de60b2e6476507a99d06f7Shih-wei Liao *
479ef2f785e0cc490af678dfd685995dec787321ffShih-wei Liao * {@hide}
489ef2f785e0cc490af678dfd685995dec787321ffShih-wei Liao */
49d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hinesinterface ITelephony {
50d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines
519ef2f785e0cc490af678dfd685995dec787321ffShih-wei Liao    /**
52d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines     * Dial a number. This doesn't place the call. It displays
53d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines     * the Dialer screen.
54d3f7527b105d21f1c69d3473eb88a762f2c3ab5aJean-Luc Brouillet     * @param number the number to be dialed. If null, this
55d3f7527b105d21f1c69d3473eb88a762f2c3ab5aJean-Luc Brouillet     * would display the Dialer screen with no number pre-filled.
56d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines     */
57d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines    void dial(String number);
58d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines
59d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines    /**
60d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines     * Place a call to the specified number.
61e67239de8d94975e7e2216ee6860ae2e6cb8b15aStephen Hines     * @param callingPackage The package making the call.
62d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines     * @param number the number to be called.
63d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines     */
64d3f7527b105d21f1c69d3473eb88a762f2c3ab5aJean-Luc Brouillet    void call(String callingPackage, String number);
65d3f7527b105d21f1c69d3473eb88a762f2c3ab5aJean-Luc Brouillet
66d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines    /**
67d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines     * End call if there is a call in progress, otherwise does nothing.
68d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines     *
69d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines     * @return whether it hung up
70657d20afa621219c1eed72178d1325fd4409f458David Gross     */
71d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines    boolean endCall();
72d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines
73d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines    /**
74d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines     * End call on particular subId or go to the Home screen
75d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines     * @param subId user preferred subId.
76d3f7527b105d21f1c69d3473eb88a762f2c3ab5aJean-Luc Brouillet     * @return whether it hung up
77d3f7527b105d21f1c69d3473eb88a762f2c3ab5aJean-Luc Brouillet     */
78d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines    boolean endCallForSubscriber(int subId);
79d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines
80d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines    /**
81324c0479ec3edda573de60b2e6476507a99d06f7Shih-wei Liao     * Answer the currently-ringing call.
829ef2f785e0cc490af678dfd685995dec787321ffShih-wei Liao     *
83d369cda199b11ae28a1935e06398c2162cf146f3Stephen Hines     * If there's already a current active call, that call will be
849ef2f785e0cc490af678dfd685995dec787321ffShih-wei Liao     * automatically put on hold.  If both lines are currently in use, the
85d3f7527b105d21f1c69d3473eb88a762f2c3ab5aJean-Luc Brouillet     * current active call will be ended.
86d3f7527b105d21f1c69d3473eb88a762f2c3ab5aJean-Luc Brouillet     *
87d3f7527b105d21f1c69d3473eb88a762f2c3ab5aJean-Luc Brouillet     * TODO: provide a flag to let the caller specify what policy to use
88d3f7527b105d21f1c69d3473eb88a762f2c3ab5aJean-Luc Brouillet     * if both lines are in use.  (The current behavior is hardwired to
89d3f7527b105d21f1c69d3473eb88a762f2c3ab5aJean-Luc Brouillet     * "answer incoming, end ongoing", which is how the CALL button
90324c0479ec3edda573de60b2e6476507a99d06f7Shih-wei Liao     * is specced to behave.)
919ef2f785e0cc490af678dfd685995dec787321ffShih-wei Liao     *
929ef2f785e0cc490af678dfd685995dec787321ffShih-wei Liao     * TODO: this should be a oneway call (especially since it's called
936e6578a360497f78a181e63d7783422a9c9bfb15Stephen Hines     * directly from the key queue thread).
949ef2f785e0cc490af678dfd685995dec787321ffShih-wei Liao     */
95324c0479ec3edda573de60b2e6476507a99d06f7Shih-wei Liao    void answerRingingCall();
9681c1b4865e9c8fd655ea4528814f6c53e225ba6dShih-wei Liao
9781c1b4865e9c8fd655ea4528814f6c53e225ba6dShih-wei Liao    /**
989ef2f785e0cc490af678dfd685995dec787321ffShih-wei Liao     * Answer the currently-ringing call on particular subId .
9981c1b4865e9c8fd655ea4528814f6c53e225ba6dShih-wei Liao     *
10081c1b4865e9c8fd655ea4528814f6c53e225ba6dShih-wei Liao     * If there's already a current active call, that call will be
1011f6c331d622ac645ab68a016aa4c577998547373Stephen Hines     * automatically put on hold.  If both lines are currently in use, the
1021f6c331d622ac645ab68a016aa4c577998547373Stephen Hines     * current active call will be ended.
1031f6c331d622ac645ab68a016aa4c577998547373Stephen Hines     *
1041f6c331d622ac645ab68a016aa4c577998547373Stephen Hines     * TODO: provide a flag to let the caller specify what policy to use
10581c1b4865e9c8fd655ea4528814f6c53e225ba6dShih-wei Liao     * if both lines are in use.  (The current behavior is hardwired to
106462aefd62cc646d2ff753c1d003ef3cd7bbea26Shih-wei Liao     * "answer incoming, end ongoing", which is how the CALL button
107e639eb5caa2c386b4a60659a4929e8a6141a2cbeStephen Hines     * is specced to behave.)
108e639eb5caa2c386b4a60659a4929e8a6141a2cbeStephen Hines     *
109     * TODO: this should be a oneway call (especially since it's called
110     * directly from the key queue thread).
111     */
112    void answerRingingCallForSubscriber(int subId);
113
114    /**
115     * Silence the ringer if an incoming call is currently ringing.
116     * (If vibrating, stop the vibrator also.)
117     *
118     * It's safe to call this if the ringer has already been silenced, or
119     * even if there's no incoming call.  (If so, this method will do nothing.)
120     *
121     * TODO: this should be a oneway call too (see above).
122     *       (Actually *all* the methods here that return void can
123     *       probably be oneway.)
124     */
125    void silenceRinger();
126
127    /**
128     * Check if we are in either an active or holding call
129     * @param callingPackage the name of the package making the call.
130     * @return true if the phone state is OFFHOOK.
131     */
132    boolean isOffhook(String callingPackage);
133
134    /**
135     * Check if a particular subId has an active or holding call
136     *
137     * @param subId user preferred subId.
138     * @param callingPackage the name of the package making the call.
139     * @return true if the phone state is OFFHOOK.
140     */
141    boolean isOffhookForSubscriber(int subId, String callingPackage);
142
143    /**
144     * Check if an incoming phone call is ringing or call waiting
145     * on a particular subId.
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 RINGING.
150     */
151    boolean isRingingForSubscriber(int subId, String callingPackage);
152
153    /**
154     * Check if an incoming phone call is ringing or call waiting.
155     * @param callingPackage the name of the package making the call.
156     * @return true if the phone state is RINGING.
157     */
158    boolean isRinging(String callingPackage);
159
160    /**
161     * Check if the phone is idle.
162     * @param callingPackage the name of the package making the call.
163     * @return true if the phone state is IDLE.
164     */
165    boolean isIdle(String callingPackage);
166
167    /**
168     * Check if the phone is idle on a particular subId.
169     *
170     * @param subId user preferred subId.
171     * @param callingPackage the name of the package making the call.
172     * @return true if the phone state is IDLE.
173     */
174    boolean isIdleForSubscriber(int subId, String callingPackage);
175
176    /**
177     * Check to see if the radio is on or not.
178     * @param callingPackage the name of the package making the call.
179     * @return returns true if the radio is on.
180     */
181    boolean isRadioOn(String callingPackage);
182
183    /**
184     * Check to see if the radio is on or not on particular subId.
185     * @param subId user preferred subId.
186     * @param callingPackage the name of the package making the call.
187     * @return returns true if the radio is on.
188     */
189    boolean isRadioOnForSubscriber(int subId, String callingPackage);
190
191    /**
192     * Supply a pin to unlock the SIM.  Blocks until a result is determined.
193     * @param pin The pin to check.
194     * @return whether the operation was a success.
195     */
196    boolean supplyPin(String pin);
197
198    /**
199     * Supply a pin to unlock the SIM for particular subId.
200     * Blocks until a result is determined.
201     * @param pin The pin to check.
202     * @param subId user preferred subId.
203     * @return whether the operation was a success.
204     */
205    boolean supplyPinForSubscriber(int subId, String pin);
206
207    /**
208     * Supply puk to unlock the SIM and set SIM pin to new pin.
209     *  Blocks until a result is determined.
210     * @param puk The puk to check.
211     *        pin The new pin to be set in SIM
212     * @return whether the operation was a success.
213     */
214    boolean supplyPuk(String puk, String pin);
215
216    /**
217     * Supply puk to unlock the SIM and set SIM pin to new pin.
218     *  Blocks until a result is determined.
219     * @param puk The puk to check.
220     *        pin The new pin to be set in SIM
221     * @param subId user preferred subId.
222     * @return whether the operation was a success.
223     */
224    boolean supplyPukForSubscriber(int subId, String puk, String pin);
225
226    /**
227     * Supply a pin to unlock the SIM.  Blocks until a result is determined.
228     * Returns a specific success/error code.
229     * @param pin The pin to check.
230     * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code
231     *         retValue[1] = number of attempts remaining if known otherwise -1
232     */
233    int[] supplyPinReportResult(String pin);
234
235    /**
236     * Supply a pin to unlock the SIM.  Blocks until a result is determined.
237     * Returns a specific success/error code.
238     * @param pin The pin to check.
239     * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code
240     *         retValue[1] = number of attempts remaining if known otherwise -1
241     */
242    int[] supplyPinReportResultForSubscriber(int subId, String pin);
243
244    /**
245     * Supply puk to unlock the SIM and set SIM pin to new pin.
246     * Blocks until a result is determined.
247     * Returns a specific success/error code
248     * @param puk The puk to check
249     *        pin The pin to check.
250     * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code
251     *         retValue[1] = number of attempts remaining if known otherwise -1
252     */
253    int[] supplyPukReportResult(String puk, String pin);
254
255    /**
256     * Supply puk to unlock the SIM and set SIM pin to new pin.
257     * Blocks until a result is determined.
258     * Returns a specific success/error code
259     * @param puk The puk to check
260     *        pin The pin to check.
261     * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code
262     *         retValue[1] = number of attempts remaining if known otherwise -1
263     */
264    int[] supplyPukReportResultForSubscriber(int subId, String puk, String pin);
265
266    /**
267     * Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated
268     * without SEND (so <code>dial</code> is not appropriate).
269     *
270     * @param dialString the MMI command to be executed.
271     * @return true if MMI command is executed.
272     */
273    boolean handlePinMmi(String dialString);
274
275
276    /**
277     * Handles USSD commands.
278     *
279     * @param subId The subscription to use.
280     * @param ussdRequest the USSD command to be executed.
281     * @param wrappedCallback receives a callback result.
282     */
283    void handleUssdRequest(int subId, String ussdRequest, in ResultReceiver wrappedCallback);
284
285    /**
286     * Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated
287     * without SEND (so <code>dial</code> is not appropriate) for
288     * a particular subId.
289     * @param dialString the MMI command to be executed.
290     * @param subId user preferred subId.
291     * @return true if MMI command is executed.
292     */
293    boolean handlePinMmiForSubscriber(int subId, String dialString);
294
295    /**
296     * Toggles the radio on or off.
297     */
298    void toggleRadioOnOff();
299
300    /**
301     * Toggles the radio on or off on particular subId.
302     * @param subId user preferred subId.
303     */
304    void toggleRadioOnOffForSubscriber(int subId);
305
306    /**
307     * Set the radio to on or off
308     */
309    boolean setRadio(boolean turnOn);
310
311    /**
312     * Set the radio to on or off on particular subId.
313     * @param subId user preferred subId.
314     */
315    boolean setRadioForSubscriber(int subId, boolean turnOn);
316
317    /**
318     * Set the radio to on or off unconditionally
319     */
320    boolean setRadioPower(boolean turnOn);
321
322    /**
323     * Request to update location information in service state
324     */
325    void updateServiceLocation();
326
327    /**
328     * Request to update location information for a subscrition in service state
329     * @param subId user preferred subId.
330     */
331    void updateServiceLocationForSubscriber(int subId);
332
333    /**
334     * Enable location update notifications.
335     */
336    void enableLocationUpdates();
337
338    /**
339     * Enable location update notifications.
340     * @param subId user preferred subId.
341     */
342    void enableLocationUpdatesForSubscriber(int subId);
343
344    /**
345     * Disable location update notifications.
346     */
347    void disableLocationUpdates();
348
349    /**
350     * Disable location update notifications.
351     * @param subId user preferred subId.
352     */
353    void disableLocationUpdatesForSubscriber(int subId);
354
355    /**
356     * Allow mobile data connections.
357     */
358    boolean enableDataConnectivity();
359
360    /**
361     * Disallow mobile data connections.
362     */
363    boolean disableDataConnectivity();
364
365    /**
366     * Report whether data connectivity is possible.
367     */
368    boolean isDataConnectivityPossible();
369
370    Bundle getCellLocation(String callingPkg);
371
372    /**
373     * Returns the neighboring cell information of the device.
374     */
375    List<NeighboringCellInfo> getNeighboringCellInfo(String callingPkg);
376
377     int getCallState();
378
379    /**
380     * Returns the call state for a slot.
381     */
382     int getCallStateForSlot(int slotId);
383
384     int getDataActivity();
385     int getDataState();
386
387    /**
388     * Returns the current active phone type as integer.
389     * Returns TelephonyManager.PHONE_TYPE_CDMA if RILConstants.CDMA_PHONE
390     * and TelephonyManager.PHONE_TYPE_GSM if RILConstants.GSM_PHONE
391     */
392    int getActivePhoneType();
393
394    /**
395     * Returns the current active phone type as integer for particular slot.
396     * Returns TelephonyManager.PHONE_TYPE_CDMA if RILConstants.CDMA_PHONE
397     * and TelephonyManager.PHONE_TYPE_GSM if RILConstants.GSM_PHONE
398     * @param slotId - slot to query.
399     */
400    int getActivePhoneTypeForSlot(int slotId);
401
402    /**
403     * Returns the CDMA ERI icon index to display
404     * @param callingPackage package making the call.
405     */
406    int getCdmaEriIconIndex(String callingPackage);
407
408    /**
409     * Returns the CDMA ERI icon index to display on particular subId.
410     * @param subId user preferred subId.
411     * @param callingPackage package making the call.
412     */
413    int getCdmaEriIconIndexForSubscriber(int subId, String callingPackage);
414
415    /**
416     * Returns the CDMA ERI icon mode,
417     * 0 - ON
418     * 1 - FLASHING
419     * @param callingPackage package making the call.
420     */
421    int getCdmaEriIconMode(String callingPackage);
422
423    /**
424     * Returns the CDMA ERI icon mode on particular subId,
425     * 0 - ON
426     * 1 - FLASHING
427     * @param subId user preferred subId.
428     * @param callingPackage package making the call.
429     */
430    int getCdmaEriIconModeForSubscriber(int subId, String callingPackage);
431
432    /**
433     * Returns the CDMA ERI text,
434     * @param callingPackage package making the call.
435     */
436    String getCdmaEriText(String callingPackage);
437
438    /**
439     * Returns the CDMA ERI text for particular subId,
440     * @param subId user preferred subId.
441     * @param callingPackage package making the call.
442     */
443    String getCdmaEriTextForSubscriber(int subId, String callingPackage);
444
445    /**
446     * Returns true if OTA service provisioning needs to run.
447     * Only relevant on some technologies, others will always
448     * return false.
449     */
450    boolean needsOtaServiceProvisioning();
451
452    /**
453     * Sets the voicemail number for a particular subscriber.
454     */
455    boolean setVoiceMailNumber(int subId, String alphaTag, String number);
456
457    /**
458      * Returns the unread count of voicemails
459      */
460    int getVoiceMessageCount();
461
462    /**
463     * Returns the unread count of voicemails for a subId.
464     * @param subId user preferred subId.
465     * Returns the unread count of voicemails
466     */
467    int getVoiceMessageCountForSubscriber(int subId);
468
469    oneway void setVisualVoicemailEnabled(String callingPackage,
470            in PhoneAccountHandle accountHandle, boolean enabled);
471
472    boolean isVisualVoicemailEnabled(String callingPackage,
473            in PhoneAccountHandle accountHandle);
474
475    String getVisualVoicemailPackageName(String callingPackage,
476            in PhoneAccountHandle phoneAccountHandle);
477
478    // Not oneway, caller needs to make sure the vaule is set before receiving a SMS
479    void enableVisualVoicemailSmsFilter(String callingPackage, int subId,
480            in VisualVoicemailSmsFilterSettings settings);
481
482    oneway void disableVisualVoicemailSmsFilter(String callingPackage, int subId);
483
484    // Get settings set by the calling package
485    VisualVoicemailSmsFilterSettings getVisualVoicemailSmsFilterSettings(String callingPackage,
486            int subId);
487
488    /**
489     *  Get settings set by the current default dialer, Internal use only.
490     *  Requires READ_PRIVILEGED_PHONE_STATE permission.
491     */
492    VisualVoicemailSmsFilterSettings getActiveVisualVoicemailSmsFilterSettings(int subId);
493
494    /**
495     * Send a visual voicemail SMS. Internal use only.
496     * Requires caller to be the default dialer and have SEND_SMS permission
497     */
498    oneway void sendVisualVoicemailSmsForSubscriber(in String callingPackage, in int subId,
499            in String number, in int port, in String text, in PendingIntent sentIntent);
500
501    /**
502     * Returns the network type for data transmission
503     * Legacy call, permission-free
504     */
505    int getNetworkType();
506
507    /**
508     * Returns the network type of a subId.
509     * @param subId user preferred subId.
510     * @param callingPackage package making the call.
511     */
512    int getNetworkTypeForSubscriber(int subId, String callingPackage);
513
514    /**
515     * Returns the network type for data transmission
516     * @param callingPackage package making the call.
517     */
518    int getDataNetworkType(String callingPackage);
519
520    /**
521     * Returns the data network type of a subId
522     * @param subId user preferred subId.
523     * @param callingPackage package making the call.
524     */
525    int getDataNetworkTypeForSubscriber(int subId, String callingPackage);
526
527    /**
528      * Returns the voice network type of a subId
529      * @param subId user preferred subId.
530      * @param callingPackage package making the call.
531      * Returns the network type
532      */
533    int getVoiceNetworkTypeForSubscriber(int subId, String callingPackage);
534
535    /**
536     * Return true if an ICC card is present
537     */
538    boolean hasIccCard();
539
540    /**
541     * Return true if an ICC card is present for a subId.
542     * @param slotId user preferred slotId.
543     * Return true if an ICC card is present
544     */
545    boolean hasIccCardUsingSlotId(int slotId);
546
547    /**
548     * Return if the current radio is LTE on CDMA. This
549     * is a tri-state return value as for a period of time
550     * the mode may be unknown.
551     *
552     * @param callingPackage the name of the calling package
553     * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
554     * or {@link PHone#LTE_ON_CDMA_TRUE}
555     */
556    int getLteOnCdmaMode(String callingPackage);
557
558    /**
559     * Return if the current radio is LTE on CDMA. This
560     * is a tri-state return value as for a period of time
561     * the mode may be unknown.
562     *
563     * @param callingPackage the name of the calling package
564     * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
565     * or {@link PHone#LTE_ON_CDMA_TRUE}
566     */
567    int getLteOnCdmaModeForSubscriber(int subId, String callingPackage);
568
569    /**
570     * Returns the all observed cell information of the device.
571     */
572    List<CellInfo> getAllCellInfo(String callingPkg);
573
574    /**
575     * Sets minimum time in milli-seconds between onCellInfoChanged
576     */
577    void setCellInfoListRate(int rateInMillis);
578
579    /**
580     * get default sim
581     * @return sim id
582     */
583    int getDefaultSim();
584
585    /**
586     * Opens a logical channel to the ICC card.
587     *
588     * Input parameters equivalent to TS 27.007 AT+CCHO command.
589     *
590     * @param subId The subscription to use.
591     * @param AID Application id. See ETSI 102.221 and 101.220.
592     * @return an IccOpenLogicalChannelResponse object.
593     */
594    IccOpenLogicalChannelResponse iccOpenLogicalChannel(int subId, String AID);
595
596    /**
597     * Closes a previously opened logical channel to the ICC card.
598     *
599     * Input parameters equivalent to TS 27.007 AT+CCHC command.
600     *
601     * @param subId The subscription to use.
602     * @param channel is the channel id to be closed as retruned by a
603     *            successful iccOpenLogicalChannel.
604     * @return true if the channel was closed successfully.
605     */
606    boolean iccCloseLogicalChannel(int subId, int channel);
607
608    /**
609     * Transmit an APDU to the ICC card over a logical channel.
610     *
611     * Input parameters equivalent to TS 27.007 AT+CGLA command.
612     *
613     * @param subId The subscription to use.
614     * @param channel is the channel id to be closed as retruned by a
615     *            successful iccOpenLogicalChannel.
616     * @param cla Class of the APDU command.
617     * @param instruction Instruction of the APDU command.
618     * @param p1 P1 value of the APDU command.
619     * @param p2 P2 value of the APDU command.
620     * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU
621     *            is sent to the SIM.
622     * @param data Data to be sent with the APDU.
623     * @return The APDU response from the ICC card with the status appended at
624     *            the end.
625     */
626    String iccTransmitApduLogicalChannel(int subId, int channel, int cla, int instruction,
627            int p1, int p2, int p3, String data);
628
629    /**
630     * Transmit an APDU to the ICC card over the basic channel.
631     *
632     * Input parameters equivalent to TS 27.007 AT+CSIM command.
633     *
634     * @param subId The subscription to use.
635     * @param cla Class of the APDU command.
636     * @param instruction Instruction of the APDU command.
637     * @param p1 P1 value of the APDU command.
638     * @param p2 P2 value of the APDU command.
639     * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU
640     *            is sent to the SIM.
641     * @param data Data to be sent with the APDU.
642     * @return The APDU response from the ICC card with the status appended at
643     *            the end.
644     */
645    String iccTransmitApduBasicChannel(int subId, int cla, int instruction,
646            int p1, int p2, int p3, String data);
647
648    /**
649     * Returns the response APDU for a command APDU sent through SIM_IO.
650     *
651     * @param subId The subscription to use.
652     * @param fileID
653     * @param command
654     * @param p1 P1 value of the APDU command.
655     * @param p2 P2 value of the APDU command.
656     * @param p3 P3 value of the APDU command.
657     * @param filePath
658     * @return The APDU response.
659     */
660    byte[] iccExchangeSimIO(int subId, int fileID, int command, int p1, int p2, int p3,
661            String filePath);
662
663    /**
664     * Send ENVELOPE to the SIM and returns the response.
665     *
666     * @param subId The subscription to use.
667     * @param contents  String containing SAT/USAT response in hexadecimal
668     *                  format starting with command tag. See TS 102 223 for
669     *                  details.
670     * @return The APDU response from the ICC card, with the last 4 bytes
671     *         being the status word. If the command fails, returns an empty
672     *         string.
673     */
674    String sendEnvelopeWithStatus(int subId, String content);
675
676    /**
677     * Read one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}.
678     * Used for device configuration by some CDMA operators.
679     *
680     * @param itemID the ID of the item to read.
681     * @return the NV item as a String, or null on any failure.
682     */
683    String nvReadItem(int itemID);
684
685    /**
686     * Write one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}.
687     * Used for device configuration by some CDMA operators.
688     *
689     * @param itemID the ID of the item to read.
690     * @param itemValue the value to write, as a String.
691     * @return true on success; false on any failure.
692     */
693    boolean nvWriteItem(int itemID, String itemValue);
694
695    /**
696     * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
697     * Used for device configuration by some CDMA operators.
698     *
699     * @param preferredRoamingList byte array containing the new PRL.
700     * @return true on success; false on any failure.
701     */
702    boolean nvWriteCdmaPrl(in byte[] preferredRoamingList);
703
704    /**
705     * Perform the specified type of NV config reset. The radio will be taken offline
706     * and the device must be rebooted after the operation. Used for device
707     * configuration by some CDMA operators.
708     *
709     * @param resetType the type of reset to perform (1 == factory reset; 2 == NV-only reset).
710     * @return true on success; false on any failure.
711     */
712    boolean nvResetConfig(int resetType);
713
714    /*
715     * Get the calculated preferred network type.
716     * Used for device configuration by some CDMA operators.
717     * @param callingPackage The package making the call.
718     *
719     * @return the calculated preferred network type, defined in RILConstants.java.
720     */
721    int getCalculatedPreferredNetworkType(String callingPackage);
722
723    /*
724     * Get the preferred network type.
725     * Used for device configuration by some CDMA operators.
726     *
727     * @param subId the id of the subscription to query.
728     * @return the preferred network type, defined in RILConstants.java.
729     */
730    int getPreferredNetworkType(int subId);
731
732    /**
733     * Check TETHER_DUN_REQUIRED and TETHER_DUN_APN settings, net.tethering.noprovisioning
734     * SystemProperty, and config_tether_apndata to decide whether DUN APN is required for
735     * tethering.
736     *
737     * @return 0: Not required. 1: required. 2: Not set.
738     */
739    int getTetherApnRequired();
740
741    /**
742     * Set the network selection mode to automatic.
743     *
744     * @param subId the id of the subscription to update.
745     */
746    void setNetworkSelectionModeAutomatic(int subId);
747
748    /**
749     * Perform a radio scan and return the list of avialble networks.
750     *
751     * @param subId the id of the subscription.
752     * @return CellNetworkScanResult containing status of scan and networks.
753     */
754    CellNetworkScanResult getCellNetworkScanResults(int subId);
755
756    /**
757     * Ask the radio to connect to the input network and change selection mode to manual.
758     *
759     * @param subId the id of the subscription.
760     * @param operatorInfo the operator to attach to.
761     * @param persistSelection should the selection persist till reboot or its
762     *        turned off? Will also result in notification being not shown to
763     *        the user if the signal is lost.
764     * @return true if the request suceeded.
765     */
766    boolean setNetworkSelectionModeManual(int subId, in OperatorInfo operator,
767            boolean persistSelection);
768
769    /**
770     * Set the preferred network type.
771     * Used for device configuration by some CDMA operators.
772     *
773     * @param subId the id of the subscription to update.
774     * @param networkType the preferred network type, defined in RILConstants.java.
775     * @return true on success; false on any failure.
776     */
777    boolean setPreferredNetworkType(int subId, int networkType);
778
779    /**
780     * User enable/disable Mobile Data.
781     *
782     * @param enable true to turn on, else false
783     */
784    void setDataEnabled(int subId, boolean enable);
785
786    /**
787     * Get the user enabled state of Mobile Data.
788     *
789     * @return true on enabled
790     */
791    boolean getDataEnabled(int subId);
792
793    /**
794     * Get P-CSCF address from PCO after data connection is established or modified.
795     * @param apnType the apnType, "ims" for IMS APN, "emergency" for EMERGENCY APN
796     * @param callingPackage The package making the call.
797     */
798    String[] getPcscfAddress(String apnType, String callingPackage);
799
800    /**
801     * Set IMS registration state
802     */
803    void setImsRegistrationState(boolean registered);
804
805    /**
806     * Return MDN string for CDMA phone.
807     * @param subId user preferred subId.
808     */
809    String getCdmaMdn(int subId);
810
811    /**
812     * Return MIN string for CDMA phone.
813     * @param subId user preferred subId.
814     */
815    String getCdmaMin(int subId);
816
817    /**
818     * Has the calling application been granted special privileges by the carrier.
819     *
820     * If any of the packages in the calling UID has carrier privileges, the
821     * call will return true. This access is granted by the owner of the UICC
822     * card and does not depend on the registered carrier.
823     *
824     * TODO: Add a link to documentation.
825     *
826     * @param subId The subscription to use.
827     * @return carrier privilege status defined in TelephonyManager.
828     */
829    int getCarrierPrivilegeStatus(int subId);
830
831    /**
832     * Similar to above, but check for the package whose name is pkgName.
833     */
834    int checkCarrierPrivilegesForPackage(String pkgName);
835
836    /**
837     * Similar to above, but check across all phones.
838     */
839    int checkCarrierPrivilegesForPackageAnyPhone(String pkgName);
840
841    /**
842     * Returns list of the package names of the carrier apps that should handle the input intent
843     * and have carrier privileges for the given phoneId.
844     *
845     * @param intent Intent that will be sent.
846     * @param phoneId The phoneId on which the carrier app has carrier privileges.
847     * @return list of carrier app package names that can handle the intent on phoneId.
848     *         Returns null if there is an error and an empty list if there
849     *         are no matching packages.
850     */
851    List<String> getCarrierPackageNamesForIntentAndPhone(in Intent intent, int phoneId);
852
853    /**
854     * Set the line 1 phone number string and its alphatag for the current ICCID
855     * for display purpose only, for example, displayed in Phone Status. It won't
856     * change the actual MSISDN/MDN. To unset alphatag or number, pass in a null
857     * value.
858     *
859     * @param subId the subscriber that the alphatag and dialing number belongs to.
860     * @param alphaTag alpha-tagging of the dailing nubmer
861     * @param number The dialing number
862     * @return true if the operation was executed correctly.
863     */
864    boolean setLine1NumberForDisplayForSubscriber(int subId, String alphaTag, String number);
865
866    /**
867     * Returns the displayed dialing number string if it was set previously via
868     * {@link #setLine1NumberForDisplay}. Otherwise returns null.
869     *
870     * @param subId whose dialing number for line 1 is returned.
871     * @param callingPackage The package making the call.
872     * @return the displayed dialing number if set, or null if not set.
873     */
874    String getLine1NumberForDisplay(int subId, String callingPackage);
875
876    /**
877     * Returns the displayed alphatag of the dialing number if it was set
878     * previously via {@link #setLine1NumberForDisplay}. Otherwise returns null.
879     *
880     * @param subId whose alphatag associated with line 1 is returned.
881     * @param callingPackage The package making the call.
882     * @return the displayed alphatag of the dialing number if set, or null if
883     *         not set.
884     */
885    String getLine1AlphaTagForDisplay(int subId, String callingPackage);
886
887    String[] getMergedSubscriberIds(String callingPackage);
888
889    /**
890     * Override the operator branding for the current ICCID.
891     *
892     * Once set, whenever the SIM is present in the device, the service
893     * provider name (SPN) and the operator name will both be replaced by the
894     * brand value input. To unset the value, the same function should be
895     * called with a null brand value.
896     *
897     * <p>Requires Permission:
898     *   {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
899     *  or has to be carrier app - see #hasCarrierPrivileges.
900     *
901     * @param subId The subscription to use.
902     * @param brand The brand name to display/set.
903     * @return true if the operation was executed correctly.
904     */
905    boolean setOperatorBrandOverride(int subId, String brand);
906
907    /**
908     * Override the roaming indicator for the current ICCID.
909     *
910     * Using this call, the carrier app (see #hasCarrierPrivileges) can override
911     * the platform's notion of a network operator being considered roaming or not.
912     * The change only affects the ICCID that was active when this call was made.
913     *
914     * If null is passed as any of the input, the corresponding value is deleted.
915     *
916     * <p>Requires that the caller have carrier privilege. See #hasCarrierPrivileges.
917     *
918     * @param subId for which the roaming overrides apply.
919     * @param gsmRoamingList - List of MCCMNCs to be considered roaming for 3GPP RATs.
920     * @param gsmNonRoamingList - List of MCCMNCs to be considered not roaming for 3GPP RATs.
921     * @param cdmaRoamingList - List of SIDs to be considered roaming for 3GPP2 RATs.
922     * @param cdmaNonRoamingList - List of SIDs to be considered not roaming for 3GPP2 RATs.
923     * @return true if the operation was executed correctly.
924     */
925    boolean setRoamingOverride(int subId, in List<String> gsmRoamingList,
926            in List<String> gsmNonRoamingList, in List<String> cdmaRoamingList,
927            in List<String> cdmaNonRoamingList);
928
929    /**
930     * Returns the result and response from RIL for oem request
931     *
932     * @param oemReq the data is sent to ril.
933     * @param oemResp the respose data from RIL.
934     * @return negative value request was not handled or get error
935     *         0 request was handled succesfully, but no response data
936     *         positive value success, data length of response
937     */
938    int invokeOemRilRequestRaw(in byte[] oemReq, out byte[] oemResp);
939
940    /**
941     * Check if any mobile Radios need to be shutdown.
942     *
943     * @return true is any mobile radio needs to be shutdown
944     */
945    boolean needMobileRadioShutdown();
946
947    /**
948     * Shutdown Mobile Radios
949     */
950    void shutdownMobileRadios();
951
952    /**
953     * Set phone radio type and access technology.
954     *
955     * @param rafs an RadioAccessFamily array to indicate all phone's
956     *        new radio access family. The length of RadioAccessFamily
957     *        must equ]]al to phone count.
958     */
959    void setRadioCapability(in RadioAccessFamily[] rafs);
960
961    /**
962     * Get phone radio type and access technology.
963     *
964     * @param phoneId which phone you want to get
965     * @param callingPackage the name of the package making the call
966     * @return phone radio type and access technology
967     */
968    int getRadioAccessFamily(in int phoneId, String callingPackage);
969
970    /**
971     * Enables or disables video calling.
972     *
973     * @param enable Whether to enable video calling.
974     */
975    void enableVideoCalling(boolean enable);
976
977    /**
978     * Whether video calling has been enabled by the user.
979     *
980     * @param callingPackage The package making the call.
981     * @return {@code true} if the user has enabled video calling, {@code false} otherwise.
982     */
983    boolean isVideoCallingEnabled(String callingPackage);
984
985    /**
986     * Whether the DTMF tone length can be changed.
987     *
988     * @return {@code true} if the DTMF tone length can be changed.
989     */
990    boolean canChangeDtmfToneLength();
991
992    /**
993     * Whether the device is a world phone.
994     *
995     * @return {@code true} if the devices is a world phone.
996     */
997    boolean isWorldPhone();
998
999    /**
1000     * Whether the phone supports TTY mode.
1001     *
1002     * @return {@code true} if the device supports TTY mode.
1003     */
1004    boolean isTtyModeSupported();
1005
1006    /**
1007     * Whether the phone supports hearing aid compatibility.
1008     *
1009     * @return {@code true} if the device supports hearing aid compatibility.
1010     */
1011    boolean isHearingAidCompatibilitySupported();
1012
1013    /**
1014     * Get IMS Registration Status
1015     */
1016    boolean isImsRegistered();
1017
1018    /**
1019     * Returns the Status of Wi-Fi Calling
1020     */
1021    boolean isWifiCallingAvailable();
1022
1023    /**
1024     * Returns the Status of Volte
1025     */
1026    boolean isVolteAvailable();
1027
1028     /**
1029     * Returns the Status of VT (video telephony)
1030     */
1031    boolean isVideoTelephonyAvailable();
1032
1033    /**
1034      * Returns the unique device ID of phone, for example, the IMEI for
1035      * GSM and the MEID for CDMA phones. Return null if device ID is not available.
1036      *
1037      * @param callingPackage The package making the call.
1038      * <p>Requires Permission:
1039      *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
1040      */
1041    String getDeviceId(String callingPackage);
1042
1043    /**
1044     * Returns the IMEI for the given slot.
1045     *
1046     * @param slotId - device slot.
1047     * @param callingPackage The package making the call.
1048     * <p>Requires Permission:
1049     *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
1050     */
1051    String getImeiForSlot(int slotId, String callingPackage);
1052
1053    /**
1054     * Returns the device software version.
1055     *
1056     * @param slotId - device slot.
1057     * @param callingPackage The package making the call.
1058     * <p>Requires Permission:
1059     *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
1060     */
1061    String getDeviceSoftwareVersionForSlot(int slotId, String callingPackage);
1062
1063    /**
1064     * Returns the subscription ID associated with the specified PhoneAccount.
1065     */
1066    int getSubIdForPhoneAccount(in PhoneAccount phoneAccount);
1067
1068    void factoryReset(int subId);
1069
1070    /**
1071     * An estimate of the users's current locale based on the default SIM.
1072     *
1073     * The returned string will be a well formed BCP-47 language tag, or {@code null}
1074     * if no locale could be derived.
1075     */
1076    String getLocaleFromDefaultSim();
1077
1078    /**
1079     * Requests the modem activity info asynchronously.
1080     * The implementor is expected to reply with the
1081     * {@link android.telephony.ModemActivityInfo} object placed into the Bundle with the key
1082     * {@link android.telephony.TelephonyManager#MODEM_ACTIVITY_RESULT_KEY}.
1083     * The result code is ignored.
1084     */
1085    oneway void requestModemActivityInfo(in ResultReceiver result);
1086
1087    /**
1088     * Get the service state on specified subscription
1089     * @param subId Subscription id
1090     * @param callingPackage The package making the call
1091     * @return Service state on specified subscription.
1092     */
1093    ServiceState getServiceStateForSubscriber(int subId, String callingPackage);
1094
1095    /**
1096     * Returns the URI for the per-account voicemail ringtone set in Phone settings.
1097     *
1098     * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
1099     * voicemail ringtone.
1100     * @return The URI for the ringtone to play when receiving a voicemail from a specific
1101     * PhoneAccount.
1102     */
1103    Uri getVoicemailRingtoneUri(in PhoneAccountHandle accountHandle);
1104
1105    /**
1106     * Returns whether vibration is set for voicemail notification in Phone settings.
1107     *
1108     * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
1109     * voicemail vibration setting.
1110     * @return {@code true} if the vibration is set for this PhoneAccount, {@code false} otherwise.
1111     */
1112    boolean isVoicemailVibrationEnabled(in PhoneAccountHandle accountHandle);
1113
1114    /**
1115     * Returns a list of packages that have carrier privileges.
1116     */
1117    List<String> getPackagesWithCarrierPrivileges();
1118
1119    /**
1120     * Return the application ID for the app type.
1121     *
1122     * @param subId the subscription ID that this request applies to.
1123     * @param appType the uicc app type,
1124     * @return Application ID for specificied app type or null if no uicc or error.
1125     */
1126    String getAidForAppType(int subId, int appType);
1127
1128    /**
1129    * Return the Electronic Serial Number.
1130    *
1131    * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission
1132    *
1133    * @param subId the subscription ID that this request applies to.
1134    * @return ESN or null if error.
1135    * @hide
1136    */
1137    String getEsn(int subId);
1138
1139    /**
1140    * Return the Preferred Roaming List Version
1141    *
1142    * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission
1143    * @param subId the subscription ID that this request applies to.
1144    * @return PRLVersion or null if error.
1145    * @hide
1146    */
1147    String getCdmaPrlVersion(int subId);
1148
1149    /**
1150     * Get snapshot of Telephony histograms
1151     * @return List of Telephony histograms
1152     * Requires Permission:
1153     *   {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
1154     * Or the calling app has carrier privileges.
1155     */
1156    List<TelephonyHistogram> getTelephonyHistograms();
1157
1158    /**
1159     * Set the allowed carrier list for slotId
1160     * Require system privileges. In the future we may add this to carrier APIs.
1161     *
1162     * @return The number of carriers set successfully. Should match length of
1163     * carriers on success.
1164     */
1165    int setAllowedCarriers(int slotId, in List<CarrierIdentifier> carriers);
1166
1167    /**
1168     * Get the allowed carrier list for slotId.
1169     * Require system privileges. In the future we may add this to carrier APIs.
1170     *
1171     * @return List of {@link android.service.carrier.CarrierIdentifier}; empty list
1172     * means all carriers are allowed.
1173     */
1174    List<CarrierIdentifier> getAllowedCarriers(int slotId);
1175
1176    /**
1177     * Action set from carrier signalling broadcast receivers to enable/disable metered apns
1178     * Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required
1179     * @param subId the subscription ID that this action applies to.
1180     * @param enabled control enable or disable metered apns.
1181     * @hide
1182     */
1183    void carrierActionSetMeteredApnsEnabled(int subId, boolean visible);
1184
1185    /**
1186     * Action set from carrier signalling broadcast receivers to enable/disable radio
1187     * Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required
1188     * @param subId the subscription ID that this action applies to.
1189     * @param enabled control enable or disable radio.
1190     * @hide
1191     */
1192    void carrierActionSetRadioEnabled(int subId, boolean enabled);
1193
1194    /**
1195     * Get aggregated video call data usage since boot.
1196     * Permissions android.Manifest.permission.READ_NETWORK_USAGE_HISTORY is required.
1197     * @return total data usage in bytes
1198     * @hide
1199     */
1200    long getVtDataUsage();
1201
1202    /**
1203     * Policy control of data connection. Usually used when data limit is passed.
1204     * @param enabled True if enabling the data, otherwise disabling.
1205     * @param subId Subscription index
1206     * @hide
1207     */
1208    void setPolicyDataEnabled(boolean enabled, int subId);
1209
1210
1211    /**
1212     * Get Client request stats which will contain statistical information
1213     * on each request made by client.
1214     * @param callingPackage package making the call.
1215     * @param subId Subscription index
1216     * @hide
1217     */
1218    List<ClientRequestStats> getClientRequestStats(String callingPackage, int subid);
1219}
1220