1 /*
2  * Copyright (C) 2006 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 
17 package com.android.internal.telephony;
18 
19 import android.annotation.UnsupportedAppUsage;
20 import android.net.KeepalivePacketData;
21 import android.net.LinkProperties;
22 import android.os.Handler;
23 import android.os.Message;
24 import android.os.WorkSource;
25 import android.telephony.CarrierRestrictionRules;
26 import android.telephony.ClientRequestStats;
27 import android.telephony.ImsiEncryptionInfo;
28 import android.telephony.NetworkScanRequest;
29 import android.telephony.data.DataProfile;
30 import android.telephony.emergency.EmergencyNumber;
31 
32 import com.android.internal.telephony.cdma.CdmaSmsBroadcastConfigInfo;
33 import com.android.internal.telephony.gsm.SmsBroadcastConfigInfo;
34 import com.android.internal.telephony.uicc.IccCardStatus;
35 
36 import java.util.List;
37 
38 /**
39  * {@hide}
40  */
41 public interface CommandsInterface {
42 
43     //***** Constants
44 
45     // Used as parameter to dial() and setCLIR() below
46     static final int CLIR_DEFAULT = 0;      // "use subscription default value"
47     static final int CLIR_INVOCATION = 1;   // (restrict CLI presentation)
48     static final int CLIR_SUPPRESSION = 2;  // (allow CLI presentation)
49 
50 
51     // Used as parameters for call forward methods below
52     static final int CF_ACTION_DISABLE          = 0;
53     static final int CF_ACTION_ENABLE           = 1;
54 //  static final int CF_ACTION_UNUSED           = 2;
55     static final int CF_ACTION_REGISTRATION     = 3;
56     static final int CF_ACTION_ERASURE          = 4;
57 
58     static final int CF_REASON_UNCONDITIONAL    = 0;
59     static final int CF_REASON_BUSY             = 1;
60     static final int CF_REASON_NO_REPLY         = 2;
61     static final int CF_REASON_NOT_REACHABLE    = 3;
62     static final int CF_REASON_ALL              = 4;
63     static final int CF_REASON_ALL_CONDITIONAL  = 5;
64 
65     // Used for call barring methods below
66     static final String CB_FACILITY_BAOC         = "AO";
67     static final String CB_FACILITY_BAOIC        = "OI";
68     static final String CB_FACILITY_BAOICxH      = "OX";
69     static final String CB_FACILITY_BAIC         = "AI";
70     static final String CB_FACILITY_BAICr        = "IR";
71     static final String CB_FACILITY_BA_ALL       = "AB";
72     static final String CB_FACILITY_BA_MO        = "AG";
73     static final String CB_FACILITY_BA_MT        = "AC";
74     static final String CB_FACILITY_BA_SIM       = "SC";
75     static final String CB_FACILITY_BA_FD        = "FD";
76 
77 
78     // Used for various supp services apis
79     // See 27.007 +CCFC or +CLCK
80     static final int SERVICE_CLASS_NONE     = 0; // no user input
81     static final int SERVICE_CLASS_VOICE    = (1 << 0);
82     static final int SERVICE_CLASS_DATA     = (1 << 1); //synonym for 16+32+64+128
83     static final int SERVICE_CLASS_FAX      = (1 << 2);
84     static final int SERVICE_CLASS_SMS      = (1 << 3);
85     static final int SERVICE_CLASS_DATA_SYNC = (1 << 4);
86     static final int SERVICE_CLASS_DATA_ASYNC = (1 << 5);
87     static final int SERVICE_CLASS_PACKET   = (1 << 6);
88     static final int SERVICE_CLASS_PAD      = (1 << 7);
89     static final int SERVICE_CLASS_MAX      = (1 << 7); // Max SERVICE_CLASS value
90 
91     // Numeric representation of string values returned
92     // by messages sent to setOnUSSD handler
93     static final int USSD_MODE_NOTIFY        = 0;
94     static final int USSD_MODE_REQUEST       = 1;
95     static final int USSD_MODE_NW_RELEASE    = 2;
96     static final int USSD_MODE_LOCAL_CLIENT  = 3;
97     static final int USSD_MODE_NOT_SUPPORTED = 4;
98     static final int USSD_MODE_NW_TIMEOUT    = 5;
99 
100     // GSM SMS fail cause for acknowledgeLastIncomingSMS. From TS 23.040, 9.2.3.22.
101     static final int GSM_SMS_FAIL_CAUSE_MEMORY_CAPACITY_EXCEEDED    = 0xD3;
102     static final int GSM_SMS_FAIL_CAUSE_USIM_APP_TOOLKIT_BUSY       = 0xD4;
103     static final int GSM_SMS_FAIL_CAUSE_USIM_DATA_DOWNLOAD_ERROR    = 0xD5;
104     static final int GSM_SMS_FAIL_CAUSE_UNSPECIFIED_ERROR           = 0xFF;
105 
106     // CDMA SMS fail cause for acknowledgeLastIncomingCdmaSms.  From TS N.S0005, 6.5.2.125.
107     static final int CDMA_SMS_FAIL_CAUSE_INVALID_TELESERVICE_ID     = 4;
108     static final int CDMA_SMS_FAIL_CAUSE_RESOURCE_SHORTAGE          = 35;
109     static final int CDMA_SMS_FAIL_CAUSE_OTHER_TERMINAL_PROBLEM     = 39;
110     static final int CDMA_SMS_FAIL_CAUSE_ENCODING_PROBLEM           = 96;
111 
112     //***** Methods
113 
114     /**
115      * get latest radio power state from modem
116      * @return
117      */
getRadioState()118     int getRadioState();
119 
120     /**
121      * response.obj.result is an int[2]
122      *
123      * response.obj.result[0] is IMS registration state
124      *                        0 - Not registered
125      *                        1 - Registered
126      * response.obj.result[1] is of type RILConstants.GSM_PHONE or
127      *                                    RILConstants.CDMA_PHONE
128      */
getImsRegistrationState(Message result)129     void getImsRegistrationState(Message result);
130 
131     /**
132      * Fires on any RadioState transition
133      * Always fires immediately as well
134      *
135      * do not attempt to calculate transitions by storing getRadioState() values
136      * on previous invocations of this notification. Instead, use the other
137      * registration methods
138      */
139     @UnsupportedAppUsage
registerForRadioStateChanged(Handler h, int what, Object obj)140     void registerForRadioStateChanged(Handler h, int what, Object obj);
unregisterForRadioStateChanged(Handler h)141     void unregisterForRadioStateChanged(Handler h);
142 
registerForVoiceRadioTechChanged(Handler h, int what, Object obj)143     void registerForVoiceRadioTechChanged(Handler h, int what, Object obj);
144     @UnsupportedAppUsage
unregisterForVoiceRadioTechChanged(Handler h)145     void unregisterForVoiceRadioTechChanged(Handler h);
146     @UnsupportedAppUsage
registerForImsNetworkStateChanged(Handler h, int what, Object obj)147     void registerForImsNetworkStateChanged(Handler h, int what, Object obj);
unregisterForImsNetworkStateChanged(Handler h)148     void unregisterForImsNetworkStateChanged(Handler h);
149 
150     /**
151      * Fires on any transition into RadioState.isOn()
152      * Fires immediately if currently in that state
153      * In general, actions should be idempotent. State may change
154      * before event is received.
155      */
156     @UnsupportedAppUsage
registerForOn(Handler h, int what, Object obj)157     void registerForOn(Handler h, int what, Object obj);
158     @UnsupportedAppUsage
unregisterForOn(Handler h)159     void unregisterForOn(Handler h);
160 
161     /**
162      * Fires on any transition out of RadioState.isAvailable()
163      * Fires immediately if currently in that state
164      * In general, actions should be idempotent. State may change
165      * before event is received.
166      */
167     @UnsupportedAppUsage
registerForAvailable(Handler h, int what, Object obj)168     void registerForAvailable(Handler h, int what, Object obj);
169     @UnsupportedAppUsage
unregisterForAvailable(Handler h)170     void unregisterForAvailable(Handler h);
171 
172     /**
173      * Fires on any transition into !RadioState.isAvailable()
174      * Fires immediately if currently in that state
175      * In general, actions should be idempotent. State may change
176      * before event is received.
177      */
178     @UnsupportedAppUsage
registerForNotAvailable(Handler h, int what, Object obj)179     void registerForNotAvailable(Handler h, int what, Object obj);
unregisterForNotAvailable(Handler h)180     void unregisterForNotAvailable(Handler h);
181 
182     /**
183      * Fires on any transition into RADIO_OFF or !RadioState.isAvailable()
184      * Fires immediately if currently in that state
185      * In general, actions should be idempotent. State may change
186      * before event is received.
187      */
188     @UnsupportedAppUsage
registerForOffOrNotAvailable(Handler h, int what, Object obj)189     void registerForOffOrNotAvailable(Handler h, int what, Object obj);
190     @UnsupportedAppUsage
unregisterForOffOrNotAvailable(Handler h)191     void unregisterForOffOrNotAvailable(Handler h);
192 
193     /**
194      * Fires on any change in ICC status
195      */
registerForIccStatusChanged(Handler h, int what, Object obj)196     void registerForIccStatusChanged(Handler h, int what, Object obj);
unregisterForIccStatusChanged(Handler h)197     void unregisterForIccStatusChanged(Handler h);
198     /** Register for ICC slot status changed event */
registerForIccSlotStatusChanged(Handler h, int what, Object obj)199     void registerForIccSlotStatusChanged(Handler h, int what, Object obj);
200     /** Unregister for ICC slot status changed event */
unregisterForIccSlotStatusChanged(Handler h)201     void unregisterForIccSlotStatusChanged(Handler h);
202 
registerForCallStateChanged(Handler h, int what, Object obj)203     void registerForCallStateChanged(Handler h, int what, Object obj);
unregisterForCallStateChanged(Handler h)204     void unregisterForCallStateChanged(Handler h);
205     /** Register for network state changed event */
registerForNetworkStateChanged(Handler h, int what, Object obj)206     void registerForNetworkStateChanged(Handler h, int what, Object obj);
207     /** Unregister from network state changed event */
unregisterForNetworkStateChanged(Handler h)208     void unregisterForNetworkStateChanged(Handler h);
209     /** Register for data call list changed event */
registerForDataCallListChanged(Handler h, int what, Object obj)210     void registerForDataCallListChanged(Handler h, int what, Object obj);
211     /** Unregister from data call list changed event */
unregisterForDataCallListChanged(Handler h)212     void unregisterForDataCallListChanged(Handler h);
213 
214     /** InCall voice privacy notifications */
registerForInCallVoicePrivacyOn(Handler h, int what, Object obj)215     void registerForInCallVoicePrivacyOn(Handler h, int what, Object obj);
unregisterForInCallVoicePrivacyOn(Handler h)216     void unregisterForInCallVoicePrivacyOn(Handler h);
registerForInCallVoicePrivacyOff(Handler h, int what, Object obj)217     void registerForInCallVoicePrivacyOff(Handler h, int what, Object obj);
unregisterForInCallVoicePrivacyOff(Handler h)218     void unregisterForInCallVoicePrivacyOff(Handler h);
219 
220     /** Single Radio Voice Call State progress notifications */
registerForSrvccStateChanged(Handler h, int what, Object obj)221     void registerForSrvccStateChanged(Handler h, int what, Object obj);
unregisterForSrvccStateChanged(Handler h)222     void unregisterForSrvccStateChanged(Handler h);
223 
224     /**
225      * Handlers for subscription status change indications.
226      *
227      * @param h Handler for subscription status change messages.
228      * @param what User-defined message code.
229      * @param obj User object.
230      */
registerForSubscriptionStatusChanged(Handler h, int what, Object obj)231     void registerForSubscriptionStatusChanged(Handler h, int what, Object obj);
unregisterForSubscriptionStatusChanged(Handler h)232     void unregisterForSubscriptionStatusChanged(Handler h);
233 
234     /**
235      * fires on any change in hardware configuration.
236      */
registerForHardwareConfigChanged(Handler h, int what, Object obj)237     void registerForHardwareConfigChanged(Handler h, int what, Object obj);
unregisterForHardwareConfigChanged(Handler h)238     void unregisterForHardwareConfigChanged(Handler h);
239 
240     /**
241      * unlike the register* methods, there's only one new 3GPP format SMS handler.
242      * if you need to unregister, you should also tell the radio to stop
243      * sending SMS's to you (via AT+CNMI)
244      *
245      * AsyncResult.result is a String containing the SMS PDU
246      */
setOnNewGsmSms(Handler h, int what, Object obj)247     void setOnNewGsmSms(Handler h, int what, Object obj);
unSetOnNewGsmSms(Handler h)248     void unSetOnNewGsmSms(Handler h);
249 
250     /**
251      * unlike the register* methods, there's only one new 3GPP2 format SMS handler.
252      * if you need to unregister, you should also tell the radio to stop
253      * sending SMS's to you (via AT+CNMI)
254      *
255      * AsyncResult.result is a String containing the SMS PDU
256      */
setOnNewCdmaSms(Handler h, int what, Object obj)257     void setOnNewCdmaSms(Handler h, int what, Object obj);
unSetOnNewCdmaSms(Handler h)258     void unSetOnNewCdmaSms(Handler h);
259 
260     /**
261      * Set the handler for SMS Cell Broadcast messages.
262      *
263      * AsyncResult.result is a byte array containing the SMS-CB PDU
264      */
265     @UnsupportedAppUsage
setOnNewGsmBroadcastSms(Handler h, int what, Object obj)266     void setOnNewGsmBroadcastSms(Handler h, int what, Object obj);
unSetOnNewGsmBroadcastSms(Handler h)267     void unSetOnNewGsmBroadcastSms(Handler h);
268 
269     /**
270      * Register for NEW_SMS_ON_SIM unsolicited message
271      *
272      * AsyncResult.result is an int array containing the index of new SMS
273      */
274     @UnsupportedAppUsage
setOnSmsOnSim(Handler h, int what, Object obj)275     void setOnSmsOnSim(Handler h, int what, Object obj);
unSetOnSmsOnSim(Handler h)276     void unSetOnSmsOnSim(Handler h);
277 
278     /**
279      * Register for NEW_SMS_STATUS_REPORT unsolicited message
280      *
281      * AsyncResult.result is a String containing the status report PDU
282      */
283     @UnsupportedAppUsage
setOnSmsStatus(Handler h, int what, Object obj)284     void setOnSmsStatus(Handler h, int what, Object obj);
unSetOnSmsStatus(Handler h)285     void unSetOnSmsStatus(Handler h);
286 
287     /**
288      * unlike the register* methods, there's only one NITZ time handler
289      *
290      * AsyncResult.result is an Object[]
291      * ((Object[])AsyncResult.result)[0] is a String containing the NITZ time string
292      * ((Object[])AsyncResult.result)[1] is a Long containing the milliseconds since boot as
293      *                                   returned by elapsedRealtime() when this NITZ time
294      *                                   was posted.
295      *
296      * Please note that the delivery of this message may be delayed several
297      * seconds on system startup
298      */
299     @UnsupportedAppUsage
setOnNITZTime(Handler h, int what, Object obj)300     void setOnNITZTime(Handler h, int what, Object obj);
unSetOnNITZTime(Handler h)301     void unSetOnNITZTime(Handler h);
302 
303     /**
304      * unlike the register* methods, there's only one USSD notify handler
305      *
306      * Represents the arrival of a USSD "notify" message, which may
307      * or may not have been triggered by a previous USSD send
308      *
309      * AsyncResult.result is a String[]
310      * ((String[])(AsyncResult.result))[0] contains status code
311      *      "0"   USSD-Notify -- text in ((const char **)data)[1]
312      *      "1"   USSD-Request -- text in ((const char **)data)[1]
313      *      "2"   Session terminated by network
314      *      "3"   other local client (eg, SIM Toolkit) has responded
315      *      "4"   Operation not supported
316      *      "5"   Network timeout
317      *
318      * ((String[])(AsyncResult.result))[1] contains the USSD message
319      * The numeric representations of these are in USSD_MODE_*
320      */
321 
setOnUSSD(Handler h, int what, Object obj)322     void setOnUSSD(Handler h, int what, Object obj);
unSetOnUSSD(Handler h)323     void unSetOnUSSD(Handler h);
324 
325     /**
326      * unlike the register* methods, there's only one signal strength handler
327      * AsyncResult.result is an int[2]
328      * response.obj.result[0] is received signal strength (0-31, 99)
329      * response.obj.result[1] is  bit error rate (0-7, 99)
330      * as defined in TS 27.007 8.5
331      */
332 
333     @UnsupportedAppUsage
setOnSignalStrengthUpdate(Handler h, int what, Object obj)334     void setOnSignalStrengthUpdate(Handler h, int what, Object obj);
unSetOnSignalStrengthUpdate(Handler h)335     void unSetOnSignalStrengthUpdate(Handler h);
336 
337     /**
338      * Sets the handler for SIM/RUIM SMS storage full unsolicited message.
339      * Unlike the register* methods, there's only one notification handler
340      *
341      * @param h Handler for notification message.
342      * @param what User-defined message code.
343      * @param obj User object.
344      */
345     @UnsupportedAppUsage
setOnIccSmsFull(Handler h, int what, Object obj)346     void setOnIccSmsFull(Handler h, int what, Object obj);
unSetOnIccSmsFull(Handler h)347     void unSetOnIccSmsFull(Handler h);
348 
349     /**
350      * Sets the handler for SIM Refresh notifications.
351      *
352      * @param h Handler for notification message.
353      * @param what User-defined message code.
354      * @param obj User object.
355      */
356     @UnsupportedAppUsage
registerForIccRefresh(Handler h, int what, Object obj)357     void registerForIccRefresh(Handler h, int what, Object obj);
unregisterForIccRefresh(Handler h)358     void unregisterForIccRefresh(Handler h);
359 
360     @UnsupportedAppUsage
setOnIccRefresh(Handler h, int what, Object obj)361     void setOnIccRefresh(Handler h, int what, Object obj);
unsetOnIccRefresh(Handler h)362     void unsetOnIccRefresh(Handler h);
363 
364     /**
365      * Sets the handler for RING notifications.
366      * Unlike the register* methods, there's only one notification handler
367      *
368      * @param h Handler for notification message.
369      * @param what User-defined message code.
370      * @param obj User object.
371      */
372     @UnsupportedAppUsage
setOnCallRing(Handler h, int what, Object obj)373     void setOnCallRing(Handler h, int what, Object obj);
unSetOnCallRing(Handler h)374     void unSetOnCallRing(Handler h);
375 
376     /**
377      * Sets the handler for RESTRICTED_STATE changed notification,
378      * eg, for Domain Specific Access Control
379      * unlike the register* methods, there's only one signal strength handler
380      *
381      * AsyncResult.result is an int[1]
382      * response.obj.result[0] is a bitmask of RIL_RESTRICTED_STATE_* values
383      */
384 
setOnRestrictedStateChanged(Handler h, int what, Object obj)385     void setOnRestrictedStateChanged(Handler h, int what, Object obj);
unSetOnRestrictedStateChanged(Handler h)386     void unSetOnRestrictedStateChanged(Handler h);
387 
388     /**
389      * Sets the handler for Supplementary Service Notifications.
390      * Unlike the register* methods, there's only one notification handler
391      *
392      * @param h Handler for notification message.
393      * @param what User-defined message code.
394      * @param obj User object.
395      */
396     @UnsupportedAppUsage
setOnSuppServiceNotification(Handler h, int what, Object obj)397     void setOnSuppServiceNotification(Handler h, int what, Object obj);
unSetOnSuppServiceNotification(Handler h)398     void unSetOnSuppServiceNotification(Handler h);
399 
400     /**
401      * Sets the handler for Session End Notifications for CAT.
402      * Unlike the register* methods, there's only one notification handler
403      *
404      * @param h Handler for notification message.
405      * @param what User-defined message code.
406      * @param obj User object.
407      */
408     @UnsupportedAppUsage
setOnCatSessionEnd(Handler h, int what, Object obj)409     void setOnCatSessionEnd(Handler h, int what, Object obj);
unSetOnCatSessionEnd(Handler h)410     void unSetOnCatSessionEnd(Handler h);
411 
412     /**
413      * Sets the handler for Proactive Commands for CAT.
414      * Unlike the register* methods, there's only one notification handler
415      *
416      * @param h Handler for notification message.
417      * @param what User-defined message code.
418      * @param obj User object.
419      */
420     @UnsupportedAppUsage
setOnCatProactiveCmd(Handler h, int what, Object obj)421     void setOnCatProactiveCmd(Handler h, int what, Object obj);
unSetOnCatProactiveCmd(Handler h)422     void unSetOnCatProactiveCmd(Handler h);
423 
424     /**
425      * Sets the handler for Event Notifications for CAT.
426      * Unlike the register* methods, there's only one notification handler
427      *
428      * @param h Handler for notification message.
429      * @param what User-defined message code.
430      * @param obj User object.
431      */
432     @UnsupportedAppUsage
setOnCatEvent(Handler h, int what, Object obj)433     void setOnCatEvent(Handler h, int what, Object obj);
unSetOnCatEvent(Handler h)434     void unSetOnCatEvent(Handler h);
435 
436     /**
437      * Sets the handler for Call Set Up Notifications for CAT.
438      * Unlike the register* methods, there's only one notification handler
439      *
440      * @param h Handler for notification message.
441      * @param what User-defined message code.
442      * @param obj User object.
443      */
444     @UnsupportedAppUsage
setOnCatCallSetUp(Handler h, int what, Object obj)445     void setOnCatCallSetUp(Handler h, int what, Object obj);
unSetOnCatCallSetUp(Handler h)446     void unSetOnCatCallSetUp(Handler h);
447 
448     /**
449      * Enables/disbables supplementary service related notifications from
450      * the network.
451      *
452      * @param enable true to enable notifications, false to disable.
453      * @param result Message to be posted when command completes.
454      */
setSuppServiceNotifications(boolean enable, Message result)455     void setSuppServiceNotifications(boolean enable, Message result);
456     //void unSetSuppServiceNotifications(Handler h);
457 
458     /**
459      * Sets the handler for Alpha Notification during STK Call Control.
460      * Unlike the register* methods, there's only one notification handler
461      *
462      * @param h Handler for notification message.
463      * @param what User-defined message code.
464      * @param obj User object.
465      */
466     @UnsupportedAppUsage
setOnCatCcAlphaNotify(Handler h, int what, Object obj)467     void setOnCatCcAlphaNotify(Handler h, int what, Object obj);
unSetOnCatCcAlphaNotify(Handler h)468     void unSetOnCatCcAlphaNotify(Handler h);
469 
470     /**
471      * Sets the handler for notifying Suplementary Services (SS)
472      * Data during STK Call Control.
473      * Unlike the register* methods, there's only one notification handler
474      *
475      * @param h Handler for notification message.
476      * @param what User-defined message code.
477      * @param obj User object.
478      */
setOnSs(Handler h, int what, Object obj)479     void setOnSs(Handler h, int what, Object obj);
unSetOnSs(Handler h)480     void unSetOnSs(Handler h);
481 
482     /**
483      * Sets the handler for Event Notifications for CDMA Display Info.
484      * Unlike the register* methods, there's only one notification handler
485      *
486      * @param h Handler for notification message.
487      * @param what User-defined message code.
488      * @param obj User object.
489      */
registerForDisplayInfo(Handler h, int what, Object obj)490     void registerForDisplayInfo(Handler h, int what, Object obj);
unregisterForDisplayInfo(Handler h)491     void unregisterForDisplayInfo(Handler h);
492 
493     /**
494      * Sets the handler for Event Notifications for CallWaiting Info.
495      * Unlike the register* methods, there's only one notification handler
496      *
497      * @param h Handler for notification message.
498      * @param what User-defined message code.
499      * @param obj User object.
500      */
registerForCallWaitingInfo(Handler h, int what, Object obj)501     void registerForCallWaitingInfo(Handler h, int what, Object obj);
unregisterForCallWaitingInfo(Handler h)502     void unregisterForCallWaitingInfo(Handler h);
503 
504     /**
505      * Sets the handler for Event Notifications for Signal Info.
506      * Unlike the register* methods, there's only one notification handler
507      *
508      * @param h Handler for notification message.
509      * @param what User-defined message code.
510      * @param obj User object.
511      */
registerForSignalInfo(Handler h, int what, Object obj)512     void registerForSignalInfo(Handler h, int what, Object obj);
unregisterForSignalInfo(Handler h)513     void unregisterForSignalInfo(Handler h);
514 
515     /**
516      * Registers the handler for CDMA number information record
517      * Unlike the register* methods, there's only one notification handler
518      *
519      * @param h Handler for notification message.
520      * @param what User-defined message code.
521      * @param obj User object.
522      */
registerForNumberInfo(Handler h, int what, Object obj)523     void registerForNumberInfo(Handler h, int what, Object obj);
unregisterForNumberInfo(Handler h)524     void unregisterForNumberInfo(Handler h);
525 
526     /**
527      * Registers the handler for CDMA redirected number Information record
528      * Unlike the register* methods, there's only one notification handler
529      *
530      * @param h Handler for notification message.
531      * @param what User-defined message code.
532      * @param obj User object.
533      */
registerForRedirectedNumberInfo(Handler h, int what, Object obj)534     void registerForRedirectedNumberInfo(Handler h, int what, Object obj);
unregisterForRedirectedNumberInfo(Handler h)535     void unregisterForRedirectedNumberInfo(Handler h);
536 
537     /**
538      * Registers the handler for CDMA line control information record
539      * Unlike the register* methods, there's only one notification handler
540      *
541      * @param h Handler for notification message.
542      * @param what User-defined message code.
543      * @param obj User object.
544      */
registerForLineControlInfo(Handler h, int what, Object obj)545     void registerForLineControlInfo(Handler h, int what, Object obj);
unregisterForLineControlInfo(Handler h)546     void unregisterForLineControlInfo(Handler h);
547 
548     /**
549      * Registers the handler for CDMA T53 CLIR information record
550      * Unlike the register* methods, there's only one notification handler
551      *
552      * @param h Handler for notification message.
553      * @param what User-defined message code.
554      * @param obj User object.
555      */
registerFoT53ClirlInfo(Handler h, int what, Object obj)556     void registerFoT53ClirlInfo(Handler h, int what, Object obj);
unregisterForT53ClirInfo(Handler h)557     void unregisterForT53ClirInfo(Handler h);
558 
559     /**
560      * Registers the handler for CDMA T53 audio control information record
561      * Unlike the register* methods, there's only one notification handler
562      *
563      * @param h Handler for notification message.
564      * @param what User-defined message code.
565      * @param obj User object.
566      */
registerForT53AudioControlInfo(Handler h, int what, Object obj)567     void registerForT53AudioControlInfo(Handler h, int what, Object obj);
unregisterForT53AudioControlInfo(Handler h)568     void unregisterForT53AudioControlInfo(Handler h);
569 
570     /**
571      * Fires on if Modem enters Emergency Callback mode
572      */
573     @UnsupportedAppUsage
setEmergencyCallbackMode(Handler h, int what, Object obj)574     void setEmergencyCallbackMode(Handler h, int what, Object obj);
575 
576      /**
577       * Fires on any CDMA OTA provision status change
578       */
579      @UnsupportedAppUsage
registerForCdmaOtaProvision(Handler h,int what, Object obj)580      void registerForCdmaOtaProvision(Handler h,int what, Object obj);
581      @UnsupportedAppUsage
unregisterForCdmaOtaProvision(Handler h)582      void unregisterForCdmaOtaProvision(Handler h);
583 
584      /**
585       * Registers the handler when out-band ringback tone is needed.<p>
586       *
587       *  Messages received from this:
588       *  Message.obj will be an AsyncResult
589       *  AsyncResult.userObj = obj
590       *  AsyncResult.result = boolean. <p>
591       */
registerForRingbackTone(Handler h, int what, Object obj)592      void registerForRingbackTone(Handler h, int what, Object obj);
unregisterForRingbackTone(Handler h)593      void unregisterForRingbackTone(Handler h);
594 
595      /**
596       * Registers the handler when mute/unmute need to be resent to get
597       * uplink audio during a call.<p>
598       *
599       * @param h Handler for notification message.
600       * @param what User-defined message code.
601       * @param obj User object.
602       *
603       */
registerForResendIncallMute(Handler h, int what, Object obj)604      void registerForResendIncallMute(Handler h, int what, Object obj);
unregisterForResendIncallMute(Handler h)605      void unregisterForResendIncallMute(Handler h);
606 
607      /**
608       * Registers the handler for when Cdma subscription changed events
609       *
610       * @param h Handler for notification message.
611       * @param what User-defined message code.
612       * @param obj User object.
613       *
614       */
registerForCdmaSubscriptionChanged(Handler h, int what, Object obj)615      void registerForCdmaSubscriptionChanged(Handler h, int what, Object obj);
unregisterForCdmaSubscriptionChanged(Handler h)616      void unregisterForCdmaSubscriptionChanged(Handler h);
617 
618      /**
619       * Registers the handler for when Cdma prl changed events
620       *
621       * @param h Handler for notification message.
622       * @param what User-defined message code.
623       * @param obj User object.
624       *
625       */
registerForCdmaPrlChanged(Handler h, int what, Object obj)626      void registerForCdmaPrlChanged(Handler h, int what, Object obj);
unregisterForCdmaPrlChanged(Handler h)627      void unregisterForCdmaPrlChanged(Handler h);
628 
629      /**
630       * Registers the handler for when Cdma prl changed events
631       *
632       * @param h Handler for notification message.
633       * @param what User-defined message code.
634       * @param obj User object.
635       *
636       */
registerForExitEmergencyCallbackMode(Handler h, int what, Object obj)637      void registerForExitEmergencyCallbackMode(Handler h, int what, Object obj);
unregisterForExitEmergencyCallbackMode(Handler h)638      void unregisterForExitEmergencyCallbackMode(Handler h);
639 
640      /**
641       * Registers the handler for RIL_UNSOL_RIL_CONNECT events.
642       *
643       * When ril connects or disconnects a message is sent to the registrant
644       * which contains an AsyncResult, ar, in msg.obj. The ar.result is an
645       * Integer which is the version of the ril or -1 if the ril disconnected.
646       *
647       * @param h Handler for notification message.
648       * @param what User-defined message code.
649       * @param obj User object.
650       */
651      @UnsupportedAppUsage
registerForRilConnected(Handler h, int what, Object obj)652      void registerForRilConnected(Handler h, int what, Object obj);
653      @UnsupportedAppUsage
unregisterForRilConnected(Handler h)654      void unregisterForRilConnected(Handler h);
655 
656     /**
657      * Supply the ICC PIN to the ICC card
658      *
659      *  returned message
660      *  retMsg.obj = AsyncResult ar
661      *  ar.exception carries exception on failure
662      *  This exception is CommandException with an error of PASSWORD_INCORRECT
663      *  if the password is incorrect
664      *
665      *  ar.result is an optional array of integers where the first entry
666      *  is the number of attempts remaining before the ICC will be PUK locked.
667      *
668      * ar.exception and ar.result are null on success
669      */
670 
671     @UnsupportedAppUsage
supplyIccPin(String pin, Message result)672     void supplyIccPin(String pin, Message result);
673 
674     /**
675      * Supply the PIN for the app with this AID on the ICC card
676      *
677      *  AID (Application ID), See ETSI 102.221 8.1 and 101.220 4
678      *
679      *  returned message
680      *  retMsg.obj = AsyncResult ar
681      *  ar.exception carries exception on failure
682      *  This exception is CommandException with an error of PASSWORD_INCORRECT
683      *  if the password is incorrect
684      *
685      *  ar.result is an optional array of integers where the first entry
686      *  is the number of attempts remaining before the ICC will be PUK locked.
687      *
688      * ar.exception and ar.result are null on success
689      */
690 
supplyIccPinForApp(String pin, String aid, Message result)691     void supplyIccPinForApp(String pin, String aid, Message result);
692 
693     /**
694      * Supply the ICC PUK and newPin to the ICC card
695      *
696      *  returned message
697      *  retMsg.obj = AsyncResult ar
698      *  ar.exception carries exception on failure
699      *  This exception is CommandException with an error of PASSWORD_INCORRECT
700      *  if the password is incorrect
701      *
702      *  ar.result is an optional array of integers where the first entry
703      *  is the number of attempts remaining before the ICC is permanently disabled.
704      *
705      * ar.exception and ar.result are null on success
706      */
707 
supplyIccPuk(String puk, String newPin, Message result)708     void supplyIccPuk(String puk, String newPin, Message result);
709 
710     /**
711      * Supply the PUK, new pin for the app with this AID on the ICC card
712      *
713      *  AID (Application ID), See ETSI 102.221 8.1 and 101.220 4
714      *
715      *  retMsg.obj = AsyncResult ar
716      *  ar.exception carries exception on failure
717      *  This exception is CommandException with an error of PASSWORD_INCORRECT
718      *  if the password is incorrect
719      *
720      *  ar.result is an optional array of integers where the first entry
721      *  is the number of attempts remaining before the ICC is permanently disabled.
722      *
723      * ar.exception and ar.result are null on success
724      */
725 
supplyIccPukForApp(String puk, String newPin, String aid, Message result)726     void supplyIccPukForApp(String puk, String newPin, String aid, Message result);
727 
728     /**
729      * Supply the ICC PIN2 to the ICC card
730      * Only called following operation where ICC_PIN2 was
731      * returned as a a failure from a previous operation
732      *
733      *  returned message
734      *  retMsg.obj = AsyncResult ar
735      *  ar.exception carries exception on failure
736      *  This exception is CommandException with an error of PASSWORD_INCORRECT
737      *  if the password is incorrect
738      *
739      *  ar.result is an optional array of integers where the first entry
740      *  is the number of attempts remaining before the ICC will be PUK locked.
741      *
742      * ar.exception and ar.result are null on success
743      */
744 
supplyIccPin2(String pin2, Message result)745     void supplyIccPin2(String pin2, Message result);
746 
747     /**
748      * Supply the PIN2 for the app with this AID on the ICC card
749      * Only called following operation where ICC_PIN2 was
750      * returned as a a failure from a previous operation
751      *
752      *  AID (Application ID), See ETSI 102.221 8.1 and 101.220 4
753      *
754      *  returned message
755      *  retMsg.obj = AsyncResult ar
756      *  ar.exception carries exception on failure
757      *  This exception is CommandException with an error of PASSWORD_INCORRECT
758      *  if the password is incorrect
759      *
760      *  ar.result is an optional array of integers where the first entry
761      *  is the number of attempts remaining before the ICC will be PUK locked.
762      *
763      * ar.exception and ar.result are null on success
764      */
765 
supplyIccPin2ForApp(String pin2, String aid, Message result)766     void supplyIccPin2ForApp(String pin2, String aid, Message result);
767 
768     /**
769      * Supply the SIM PUK2 to the SIM card
770      * Only called following operation where SIM_PUK2 was
771      * returned as a a failure from a previous operation
772      *
773      *  returned message
774      *  retMsg.obj = AsyncResult ar
775      *  ar.exception carries exception on failure
776      *  This exception is CommandException with an error of PASSWORD_INCORRECT
777      *  if the password is incorrect
778      *
779      *  ar.result is an optional array of integers where the first entry
780      *  is the number of attempts remaining before the ICC is permanently disabled.
781      *
782      * ar.exception and ar.result are null on success
783      */
784 
supplyIccPuk2(String puk2, String newPin2, Message result)785     void supplyIccPuk2(String puk2, String newPin2, Message result);
786 
787     /**
788      * Supply the PUK2, newPin2 for the app with this AID on the ICC card
789      * Only called following operation where SIM_PUK2 was
790      * returned as a a failure from a previous operation
791      *
792      *  AID (Application ID), See ETSI 102.221 8.1 and 101.220 4
793      *
794      *  returned message
795      *  retMsg.obj = AsyncResult ar
796      *  ar.exception carries exception on failure
797      *  This exception is CommandException with an error of PASSWORD_INCORRECT
798      *  if the password is incorrect
799      *
800      *  ar.result is an optional array of integers where the first entry
801      *  is the number of attempts remaining before the ICC is permanently disabled.
802      *
803      * ar.exception and ar.result are null on success
804      */
805 
supplyIccPuk2ForApp(String puk2, String newPin2, String aid, Message result)806     void supplyIccPuk2ForApp(String puk2, String newPin2, String aid, Message result);
807 
808     // TODO: Add java doc and indicate that msg.arg1 contains the number of attempts remaining.
changeIccPin(String oldPin, String newPin, Message result)809     void changeIccPin(String oldPin, String newPin, Message result);
changeIccPinForApp(String oldPin, String newPin, String aidPtr, Message result)810     void changeIccPinForApp(String oldPin, String newPin, String aidPtr, Message result);
changeIccPin2(String oldPin2, String newPin2, Message result)811     void changeIccPin2(String oldPin2, String newPin2, Message result);
changeIccPin2ForApp(String oldPin2, String newPin2, String aidPtr, Message result)812     void changeIccPin2ForApp(String oldPin2, String newPin2, String aidPtr, Message result);
813 
814     @UnsupportedAppUsage
changeBarringPassword(String facility, String oldPwd, String newPwd, Message result)815     void changeBarringPassword(String facility, String oldPwd, String newPwd, Message result);
816 
supplyNetworkDepersonalization(String netpin, Message result)817     void supplyNetworkDepersonalization(String netpin, Message result);
818 
819     /**
820      *  returned message
821      *  retMsg.obj = AsyncResult ar
822      *  ar.exception carries exception on failure
823      *  ar.userObject contains the orignal value of result.obj
824      *  ar.result contains a List of DriverCall
825      *      The ar.result List is sorted by DriverCall.index
826      */
getCurrentCalls(Message result)827     void getCurrentCalls (Message result);
828 
829     /**
830      *  returned message
831      *  retMsg.obj = AsyncResult ar
832      *  ar.exception carries exception on failure
833      *  ar.userObject contains the orignal value of result.obj
834      *  ar.result contains a List of DataCallResponse
835      *  @deprecated Do not use.
836      */
837     @UnsupportedAppUsage
838     @Deprecated
getPDPContextList(Message result)839     void getPDPContextList(Message result);
840 
841     /**
842      *  returned message
843      *  retMsg.obj = AsyncResult ar
844      *  ar.exception carries exception on failure
845      *  ar.userObject contains the orignal value of result.obj
846      *  ar.result contains a List of DataCallResponse
847      */
848     @UnsupportedAppUsage
getDataCallList(Message result)849     void getDataCallList(Message result);
850 
851     /**
852      *  returned message
853      *  retMsg.obj = AsyncResult ar
854      *  ar.exception carries exception on failure
855      *  ar.userObject contains the orignal value of result.obj
856      *  ar.result is null on success and failure
857      *
858      * CLIR_DEFAULT     == on "use subscription default value"
859      * CLIR_SUPPRESSION == on "CLIR suppression" (allow CLI presentation)
860      * CLIR_INVOCATION  == on "CLIR invocation" (restrict CLI presentation)
861      */
dial(String address, boolean isEmergencyCall, EmergencyNumber emergencyNumberInfo, boolean hasKnownUserIntentEmergency, int clirMode, Message result)862     void dial(String address, boolean isEmergencyCall, EmergencyNumber emergencyNumberInfo,
863               boolean hasKnownUserIntentEmergency, int clirMode, Message result);
864 
865     /**
866      *  returned message
867      *  retMsg.obj = AsyncResult ar
868      *  ar.exception carries exception on failure
869      *  ar.userObject contains the orignal value of result.obj
870      *  ar.result is null on success and failure
871      *
872      * CLIR_DEFAULT     == on "use subscription default value"
873      * CLIR_SUPPRESSION == on "CLIR suppression" (allow CLI presentation)
874      * CLIR_INVOCATION  == on "CLIR invocation" (restrict CLI presentation)
875      */
dial(String address, boolean isEmergencyCall, EmergencyNumber emergencyNumberInfo, boolean hasKnownUserIntentEmergency, int clirMode, UUSInfo uusInfo, Message result)876     void dial(String address, boolean isEmergencyCall, EmergencyNumber emergencyNumberInfo,
877               boolean hasKnownUserIntentEmergency, int clirMode, UUSInfo uusInfo, Message result);
878 
879     /**
880      *  returned message
881      *  retMsg.obj = AsyncResult ar
882      *  ar.exception carries exception on failure
883      *  ar.userObject contains the orignal value of result.obj
884      *  ar.result is String containing IMSI on success
885      */
886     @UnsupportedAppUsage
getIMSI(Message result)887     void getIMSI(Message result);
888 
889     /**
890      *  returned message
891      *  retMsg.obj = AsyncResult ar
892      *  ar.exception carries exception on failure
893      *  ar.userObject contains the orignal value of result.obj
894      *  ar.result is String containing IMSI on success
895      */
getIMSIForApp(String aid, Message result)896     void getIMSIForApp(String aid, Message result);
897 
898     /**
899      *  returned message
900      *  retMsg.obj = AsyncResult ar
901      *  ar.exception carries exception on failure
902      *  ar.userObject contains the orignal value of result.obj
903      *  ar.result is String containing IMEI on success
904      */
getIMEI(Message result)905     void getIMEI(Message result);
906 
907     /**
908      *  returned message
909      *  retMsg.obj = AsyncResult ar
910      *  ar.exception carries exception on failure
911      *  ar.userObject contains the orignal value of result.obj
912      *  ar.result is String containing IMEISV on success
913      */
914     @UnsupportedAppUsage
getIMEISV(Message result)915     void getIMEISV(Message result);
916 
917     /**
918      * Hang up one individual connection.
919      *  returned message
920      *  retMsg.obj = AsyncResult ar
921      *  ar.exception carries exception on failure
922      *  ar.userObject contains the orignal value of result.obj
923      *  ar.result is null on success and failure
924      *
925      *  3GPP 22.030 6.5.5
926      *  "Releases a specific active call X"
927      */
hangupConnection(int gsmIndex, Message result)928     void hangupConnection (int gsmIndex, Message result);
929 
930     /**
931      * 3GPP 22.030 6.5.5
932      *  "Releases all held calls or sets User Determined User Busy (UDUB)
933      *   for a waiting call."
934      *  ar.exception carries exception on failure
935      *  ar.userObject contains the orignal value of result.obj
936      *  ar.result is null on success and failure
937      */
hangupWaitingOrBackground(Message result)938     void hangupWaitingOrBackground (Message result);
939 
940     /**
941      * 3GPP 22.030 6.5.5
942      * "Releases all active calls (if any exist) and accepts
943      *  the other (held or waiting) call."
944      *
945      *  ar.exception carries exception on failure
946      *  ar.userObject contains the orignal value of result.obj
947      *  ar.result is null on success and failure
948      */
hangupForegroundResumeBackground(Message result)949     void hangupForegroundResumeBackground (Message result);
950 
951     /**
952      * 3GPP 22.030 6.5.5
953      * "Places all active calls (if any exist) on hold and accepts
954      *  the other (held or waiting) call."
955      *
956      *  ar.exception carries exception on failure
957      *  ar.userObject contains the orignal value of result.obj
958      *  ar.result is null on success and failure
959      */
960     @UnsupportedAppUsage
switchWaitingOrHoldingAndActive(Message result)961     void switchWaitingOrHoldingAndActive (Message result);
962 
963     /**
964      * 3GPP 22.030 6.5.5
965      * "Adds a held call to the conversation"
966      *
967      *  ar.exception carries exception on failure
968      *  ar.userObject contains the orignal value of result.obj
969      *  ar.result is null on success and failure
970      */
conference(Message result)971     void conference (Message result);
972 
973     /**
974      * Set preferred Voice Privacy (VP).
975      *
976      * @param enable true is enhanced and false is normal VP
977      * @param result is a callback message
978      */
setPreferredVoicePrivacy(boolean enable, Message result)979     void setPreferredVoicePrivacy(boolean enable, Message result);
980 
981     /**
982      * Get currently set preferred Voice Privacy (VP) mode.
983      *
984      * @param result is a callback message
985      */
getPreferredVoicePrivacy(Message result)986     void getPreferredVoicePrivacy(Message result);
987 
988     /**
989      * 3GPP 22.030 6.5.5
990      * "Places all active calls on hold except call X with which
991      *  communication shall be supported."
992      */
separateConnection(int gsmIndex, Message result)993     void separateConnection (int gsmIndex, Message result);
994 
995     /**
996      *
997      *  ar.exception carries exception on failure
998      *  ar.userObject contains the orignal value of result.obj
999      *  ar.result is null on success and failure
1000      */
1001     @UnsupportedAppUsage
acceptCall(Message result)1002     void acceptCall (Message result);
1003 
1004     /**
1005      *  also known as UDUB
1006      *  ar.exception carries exception on failure
1007      *  ar.userObject contains the orignal value of result.obj
1008      *  ar.result is null on success and failure
1009      */
rejectCall(Message result)1010     void rejectCall (Message result);
1011 
1012     /**
1013      * 3GPP 22.030 6.5.5
1014      * "Connects the two calls and disconnects the subscriber from both calls"
1015      *
1016      *  ar.exception carries exception on failure
1017      *  ar.userObject contains the orignal value of result.obj
1018      *  ar.result is null on success and failure
1019      */
explicitCallTransfer(Message result)1020     void explicitCallTransfer (Message result);
1021 
1022     /**
1023      * cause code returned as int[0] in Message.obj.response
1024      * Returns integer cause code defined in TS 24.008
1025      * Annex H or closest approximation.
1026      * Most significant codes:
1027      * - Any defined in 22.001 F.4 (for generating busy/congestion)
1028      * - Cause 68: ACM >= ACMMax
1029      */
getLastCallFailCause(Message result)1030     void getLastCallFailCause (Message result);
1031 
1032 
1033     /**
1034      * Reason for last PDP context deactivate or failure to activate
1035      * cause code returned as int[0] in Message.obj.response
1036      * returns an integer cause code defined in TS 24.008
1037      * section 6.1.3.1.3 or close approximation
1038      * @deprecated Do not use.
1039      */
1040     @UnsupportedAppUsage
1041     @Deprecated
getLastPdpFailCause(Message result)1042     void getLastPdpFailCause (Message result);
1043 
1044     /**
1045      * The preferred new alternative to getLastPdpFailCause
1046      * that is also CDMA-compatible.
1047      */
1048     @UnsupportedAppUsage
getLastDataCallFailCause(Message result)1049     void getLastDataCallFailCause (Message result);
1050 
setMute(boolean enableMute, Message response)1051     void setMute (boolean enableMute, Message response);
1052 
getMute(Message response)1053     void getMute (Message response);
1054 
1055     /**
1056      * response.obj is an AsyncResult
1057      * response.obj.result is an int[2]
1058      * response.obj.result[0] is received signal strength (0-31, 99)
1059      * response.obj.result[1] is  bit error rate (0-7, 99)
1060      * as defined in TS 27.007 8.5
1061      */
1062     @UnsupportedAppUsage
getSignalStrength(Message response)1063     void getSignalStrength (Message response);
1064 
1065 
1066     /**
1067      * response.obj.result is an int[3]
1068      * response.obj.result[0] is registration state 0-5 from TS 27.007 7.2
1069      * response.obj.result[1] is LAC if registered or -1 if not
1070      * response.obj.result[2] is CID if registered or -1 if not
1071      * valid LAC and CIDs are 0x0000 - 0xffff
1072      *
1073      * Please note that registration state 4 ("unknown") is treated
1074      * as "out of service" above
1075      */
1076     @UnsupportedAppUsage
getVoiceRegistrationState(Message response)1077     void getVoiceRegistrationState (Message response);
1078 
1079     /**
1080      * response.obj.result is an int[3]
1081      * response.obj.result[0] is registration state 0-5 from TS 27.007 7.2
1082      * response.obj.result[1] is LAC if registered or -1 if not
1083      * response.obj.result[2] is CID if registered or -1 if not
1084      * valid LAC and CIDs are 0x0000 - 0xffff
1085      *
1086      * Please note that registration state 4 ("unknown") is treated
1087      * as "out of service" above
1088      */
getDataRegistrationState(Message response)1089     void getDataRegistrationState (Message response);
1090 
1091     /**
1092      * response.obj.result is a String[3]
1093      * response.obj.result[0] is long alpha or null if unregistered
1094      * response.obj.result[1] is short alpha or null if unregistered
1095      * response.obj.result[2] is numeric or null if unregistered
1096      */
1097     @UnsupportedAppUsage
getOperator(Message response)1098     void getOperator(Message response);
1099 
1100     /**
1101      *  ar.exception carries exception on failure
1102      *  ar.userObject contains the orignal value of result.obj
1103      *  ar.result is null on success and failure
1104      */
1105     @UnsupportedAppUsage
sendDtmf(char c, Message result)1106     void sendDtmf(char c, Message result);
1107 
1108 
1109     /**
1110      *  ar.exception carries exception on failure
1111      *  ar.userObject contains the orignal value of result.obj
1112      *  ar.result is null on success and failure
1113      */
startDtmf(char c, Message result)1114     void startDtmf(char c, Message result);
1115 
1116     /**
1117      *  ar.exception carries exception on failure
1118      *  ar.userObject contains the orignal value of result.obj
1119      *  ar.result is null on success and failure
1120      */
stopDtmf(Message result)1121     void stopDtmf(Message result);
1122 
1123     /**
1124      *  ar.exception carries exception on failure
1125      *  ar.userObject contains the orignal value of result.obj
1126      *  ar.result is null on success and failure
1127      */
sendBurstDtmf(String dtmfString, int on, int off, Message result)1128     void sendBurstDtmf(String dtmfString, int on, int off, Message result);
1129 
1130     /**
1131      * smscPDU is smsc address in PDU form GSM BCD format prefixed
1132      *      by a length byte (as expected by TS 27.005) or NULL for default SMSC
1133      * pdu is SMS in PDU format as an ASCII hex string
1134      *      less the SMSC address
1135      */
sendSMS(String smscPDU, String pdu, Message response)1136     void sendSMS (String smscPDU, String pdu, Message response);
1137 
1138     /**
1139      * Send an SMS message, Identical to sendSMS,
1140      * except that more messages are expected to be sent soon
1141      * smscPDU is smsc address in PDU form GSM BCD format prefixed
1142      *      by a length byte (as expected by TS 27.005) or NULL for default SMSC
1143      * pdu is SMS in PDU format as an ASCII hex string
1144      *      less the SMSC address
1145      */
sendSMSExpectMore(String smscPDU, String pdu, Message response)1146     void sendSMSExpectMore (String smscPDU, String pdu, Message response);
1147 
1148     /**
1149      * @param pdu is CDMA-SMS in internal pseudo-PDU format
1150      * @param response sent when operation completes
1151      */
sendCdmaSms(byte[] pdu, Message response)1152     void sendCdmaSms(byte[] pdu, Message response);
1153 
1154     /**
1155      * send SMS over IMS with 3GPP/GSM SMS format
1156      * @param smscPDU is smsc address in PDU form GSM BCD format prefixed
1157      *      by a length byte (as expected by TS 27.005) or NULL for default SMSC
1158      * @param pdu is SMS in PDU format as an ASCII hex string
1159      *      less the SMSC address
1160      * @param retry indicates if this is a retry; 0 == not retry, nonzero = retry
1161      * @param messageRef valid field if retry is set to nonzero.
1162      *        Contains messageRef from RIL_SMS_Response corresponding to failed MO SMS
1163      * @param response sent when operation completes
1164      */
sendImsGsmSms(String smscPDU, String pdu, int retry, int messageRef, Message response)1165     void sendImsGsmSms (String smscPDU, String pdu, int retry, int messageRef,
1166             Message response);
1167 
1168     /**
1169      * send SMS over IMS with 3GPP2/CDMA SMS format
1170      * @param pdu is CDMA-SMS in internal pseudo-PDU format
1171      * @param response sent when operation completes
1172      * @param retry indicates if this is a retry; 0 == not retry, nonzero = retry
1173      * @param messageRef valid field if retry is set to nonzero.
1174      *        Contains messageRef from RIL_SMS_Response corresponding to failed MO SMS
1175      * @param response sent when operation completes
1176      */
sendImsCdmaSms(byte[] pdu, int retry, int messageRef, Message response)1177     void sendImsCdmaSms(byte[] pdu, int retry, int messageRef, Message response);
1178 
1179     /**
1180      * Deletes the specified SMS record from SIM memory (EF_SMS).
1181      *
1182      * @param index index of the SMS record to delete
1183      * @param response sent when operation completes
1184      */
1185     @UnsupportedAppUsage
deleteSmsOnSim(int index, Message response)1186     void deleteSmsOnSim(int index, Message response);
1187 
1188     /**
1189      * Deletes the specified SMS record from RUIM memory (EF_SMS in DF_CDMA).
1190      *
1191      * @param index index of the SMS record to delete
1192      * @param response sent when operation completes
1193      */
1194     @UnsupportedAppUsage
deleteSmsOnRuim(int index, Message response)1195     void deleteSmsOnRuim(int index, Message response);
1196 
1197     /**
1198      * Writes an SMS message to SIM memory (EF_SMS).
1199      *
1200      * @param status status of message on SIM.  One of:
1201      *                  SmsManger.STATUS_ON_ICC_READ
1202      *                  SmsManger.STATUS_ON_ICC_UNREAD
1203      *                  SmsManger.STATUS_ON_ICC_SENT
1204      *                  SmsManger.STATUS_ON_ICC_UNSENT
1205      * @param pdu message PDU, as hex string
1206      * @param response sent when operation completes.
1207      *                  response.obj will be an AsyncResult, and will indicate
1208      *                  any error that may have occurred (eg, out of memory).
1209      */
1210     @UnsupportedAppUsage
writeSmsToSim(int status, String smsc, String pdu, Message response)1211     void writeSmsToSim(int status, String smsc, String pdu, Message response);
1212 
1213     @UnsupportedAppUsage
writeSmsToRuim(int status, String pdu, Message response)1214     void writeSmsToRuim(int status, String pdu, Message response);
1215 
1216     @UnsupportedAppUsage
setRadioPower(boolean on, Message response)1217     void setRadioPower(boolean on, Message response);
1218 
1219     @UnsupportedAppUsage
acknowledgeLastIncomingGsmSms(boolean success, int cause, Message response)1220     void acknowledgeLastIncomingGsmSms(boolean success, int cause, Message response);
1221 
1222     @UnsupportedAppUsage
acknowledgeLastIncomingCdmaSms(boolean success, int cause, Message response)1223     void acknowledgeLastIncomingCdmaSms(boolean success, int cause, Message response);
1224 
1225     /**
1226      * Acknowledge successful or failed receipt of last incoming SMS,
1227      * including acknowledgement TPDU to send as the RP-User-Data element
1228      * of the RP-ACK or RP-ERROR PDU.
1229      *
1230      * @param success true to send RP-ACK, false to send RP-ERROR
1231      * @param ackPdu the acknowledgement TPDU in hexadecimal format
1232      * @param response sent when operation completes.
1233      */
acknowledgeIncomingGsmSmsWithPdu(boolean success, String ackPdu, Message response)1234     void acknowledgeIncomingGsmSmsWithPdu(boolean success, String ackPdu, Message response);
1235 
1236     /**
1237      * parameters equivalent to 27.007 AT+CRSM command
1238      * response.obj will be an AsyncResult
1239      * response.obj.result will be an IccIoResult on success
1240      */
1241     @UnsupportedAppUsage
iccIO(int command, int fileid, String path, int p1, int p2, int p3, String data, String pin2, Message response)1242     void iccIO (int command, int fileid, String path, int p1, int p2, int p3,
1243             String data, String pin2, Message response);
1244 
1245     /**
1246      * parameters equivalent to 27.007 AT+CRSM command
1247      * response.obj will be an AsyncResult
1248      * response.obj.userObj will be a IccIoResult on success
1249      */
1250     @UnsupportedAppUsage
iccIOForApp(int command, int fileid, String path, int p1, int p2, int p3, String data, String pin2, String aid, Message response)1251     void iccIOForApp (int command, int fileid, String path, int p1, int p2, int p3,
1252             String data, String pin2, String aid, Message response);
1253 
1254     /**
1255      * (AsyncResult)response.obj).result is an int[] with element [0] set to
1256      * 1 for "CLIP is provisioned", and 0 for "CLIP is not provisioned".
1257      *
1258      * @param response is callback message
1259      */
1260 
queryCLIP(Message response)1261     void queryCLIP(Message response);
1262 
1263     /**
1264      * response.obj will be a an int[2]
1265      *
1266      * response.obj[0] will be TS 27.007 +CLIR parameter 'n'
1267      *  0 presentation indicator is used according to the subscription of the CLIR service
1268      *  1 CLIR invocation
1269      *  2 CLIR suppression
1270      *
1271      * response.obj[1] will be TS 27.007 +CLIR parameter 'm'
1272      *  0 CLIR not provisioned
1273      *  1 CLIR provisioned in permanent mode
1274      *  2 unknown (e.g. no network, etc.)
1275      *  3 CLIR temporary mode presentation restricted
1276      *  4 CLIR temporary mode presentation allowed
1277      */
1278 
getCLIR(Message response)1279     void getCLIR(Message response);
1280 
1281     /**
1282      * clirMode is one of the CLIR_* constants above
1283      *
1284      * response.obj is null
1285      */
1286 
setCLIR(int clirMode, Message response)1287     void setCLIR(int clirMode, Message response);
1288 
1289     /**
1290      * (AsyncResult)response.obj).result is an int[] with element [0] set to
1291      * 0 for disabled, 1 for enabled.
1292      *
1293      * @param serviceClass is a sum of SERVICE_CLASS_*
1294      * @param response is callback message
1295      */
1296 
1297     @UnsupportedAppUsage
queryCallWaiting(int serviceClass, Message response)1298     void queryCallWaiting(int serviceClass, Message response);
1299 
1300     /**
1301      * @param enable is true to enable, false to disable
1302      * @param serviceClass is a sum of SERVICE_CLASS_*
1303      * @param response is callback message
1304      */
1305 
1306     @UnsupportedAppUsage
setCallWaiting(boolean enable, int serviceClass, Message response)1307     void setCallWaiting(boolean enable, int serviceClass, Message response);
1308 
1309     /**
1310      * @param action is one of CF_ACTION_*
1311      * @param cfReason is one of CF_REASON_*
1312      * @param serviceClass is a sum of SERVICE_CLASSS_*
1313      */
1314     @UnsupportedAppUsage
setCallForward(int action, int cfReason, int serviceClass, String number, int timeSeconds, Message response)1315     void setCallForward(int action, int cfReason, int serviceClass,
1316                 String number, int timeSeconds, Message response);
1317 
1318     /**
1319      * cfReason is one of CF_REASON_*
1320      *
1321      * ((AsyncResult)response.obj).result will be an array of
1322      * CallForwardInfo's
1323      *
1324      * An array of length 0 means "disabled for all codes"
1325      */
1326     @UnsupportedAppUsage
queryCallForwardStatus(int cfReason, int serviceClass, String number, Message response)1327     void queryCallForwardStatus(int cfReason, int serviceClass,
1328             String number, Message response);
1329 
1330     @UnsupportedAppUsage
setNetworkSelectionModeAutomatic(Message response)1331     void setNetworkSelectionModeAutomatic(Message response);
1332 
1333     @UnsupportedAppUsage
setNetworkSelectionModeManual(String operatorNumeric, Message response)1334     void setNetworkSelectionModeManual(String operatorNumeric, Message response);
1335 
1336     /**
1337      * Queries whether the current network selection mode is automatic
1338      * or manual
1339      *
1340      * ((AsyncResult)response.obj).result  is an int[] with element [0] being
1341      * a 0 for automatic selection and a 1 for manual selection
1342      */
1343 
1344     @UnsupportedAppUsage
getNetworkSelectionMode(Message response)1345     void getNetworkSelectionMode(Message response);
1346 
1347     /**
1348      * Queries the currently available networks
1349      *
1350      * ((AsyncResult)response.obj).result is a List of NetworkInfo objects
1351      */
getAvailableNetworks(Message response)1352     void getAvailableNetworks(Message response);
1353 
1354     /**
1355      * Starts a radio network scan
1356      *
1357      * ((AsyncResult)response.obj).result is a NetworkScanResult object
1358      */
startNetworkScan(NetworkScanRequest nsr, Message response)1359     void startNetworkScan(NetworkScanRequest nsr, Message response);
1360 
1361     /**
1362      * Stops the ongoing network scan
1363      *
1364      * ((AsyncResult)response.obj).result is a NetworkScanResult object
1365      *
1366      */
stopNetworkScan(Message response)1367     void stopNetworkScan(Message response);
1368 
1369     /**
1370      * Gets the baseband version
1371      */
1372     @UnsupportedAppUsage
getBasebandVersion(Message response)1373     void getBasebandVersion(Message response);
1374 
1375     /**
1376      * (AsyncResult)response.obj).result will be an Integer representing
1377      * the sum of enabled service classes (sum of SERVICE_CLASS_*)
1378      *
1379      * @param facility one of CB_FACILTY_*
1380      * @param password password or "" if not required
1381      * @param serviceClass is a sum of SERVICE_CLASS_*
1382      * @param response is callback message
1383      */
1384 
1385     @UnsupportedAppUsage
queryFacilityLock(String facility, String password, int serviceClass, Message response)1386     void queryFacilityLock (String facility, String password, int serviceClass,
1387         Message response);
1388 
1389     /**
1390      * (AsyncResult)response.obj).result will be an Integer representing
1391      * the sum of enabled service classes (sum of SERVICE_CLASS_*) for the
1392      * application with appId.
1393      *
1394      * @param facility one of CB_FACILTY_*
1395      * @param password password or "" if not required
1396      * @param serviceClass is a sum of SERVICE_CLASS_*
1397      * @param appId is application Id or null if none
1398      * @param response is callback message
1399      */
1400 
queryFacilityLockForApp(String facility, String password, int serviceClass, String appId, Message response)1401     void queryFacilityLockForApp(String facility, String password, int serviceClass, String appId,
1402         Message response);
1403 
1404     /**
1405      * @param facility one of CB_FACILTY_*
1406      * @param lockState true means lock, false means unlock
1407      * @param password password or "" if not required
1408      * @param serviceClass is a sum of SERVICE_CLASS_*
1409      * @param response is callback message
1410      */
1411     @UnsupportedAppUsage
setFacilityLock(String facility, boolean lockState, String password, int serviceClass, Message response)1412     void setFacilityLock (String facility, boolean lockState, String password,
1413         int serviceClass, Message response);
1414 
1415     /**
1416      * Set the facility lock for the app with this AID on the ICC card.
1417      *
1418      * @param facility one of CB_FACILTY_*
1419      * @param lockState true means lock, false means unlock
1420      * @param password password or "" if not required
1421      * @param serviceClass is a sum of SERVICE_CLASS_*
1422      * @param appId is application Id or null if none
1423      * @param response is callback message
1424      */
setFacilityLockForApp(String facility, boolean lockState, String password, int serviceClass, String appId, Message response)1425     void setFacilityLockForApp(String facility, boolean lockState, String password,
1426         int serviceClass, String appId, Message response);
1427 
sendUSSD(String ussdString, Message response)1428     void sendUSSD (String ussdString, Message response);
1429 
1430     /**
1431      * Cancels a pending USSD session if one exists.
1432      * @param response callback message
1433      */
cancelPendingUssd(Message response)1434     void cancelPendingUssd (Message response);
1435 
resetRadio(Message result)1436     void resetRadio(Message result);
1437 
1438     /**
1439      * Assign a specified band for RF configuration.
1440      *
1441      * @param bandMode one of BM_*_BAND
1442      * @param response is callback message
1443      */
setBandMode(int bandMode, Message response)1444     void setBandMode (int bandMode, Message response);
1445 
1446     /**
1447      * Query the list of band mode supported by RF.
1448      *
1449      * @param response is callback message
1450      *        ((AsyncResult)response.obj).result  is an int[] where int[0] is
1451      *        the size of the array and the rest of each element representing
1452      *        one available BM_*_BAND
1453      */
queryAvailableBandMode(Message response)1454     void queryAvailableBandMode (Message response);
1455 
1456     /**
1457      *  Requests to set the preferred network type for searching and registering
1458      * (CS/PS domain, RAT, and operation mode)
1459      * @param networkType one of  NT_*_TYPE
1460      * @param response is callback message
1461      */
1462     @UnsupportedAppUsage
setPreferredNetworkType(int networkType , Message response)1463     void setPreferredNetworkType(int networkType , Message response);
1464 
1465      /**
1466      *  Query the preferred network type setting
1467      *
1468      * @param response is callback message to report one of  NT_*_TYPE
1469      */
1470     @UnsupportedAppUsage
getPreferredNetworkType(Message response)1471     void getPreferredNetworkType(Message response);
1472 
1473     /**
1474      * Request to enable/disable network state change notifications when
1475      * location information (lac and/or cid) has changed.
1476      *
1477      * @param enable true to enable, false to disable
1478      * @param response callback message
1479      */
setLocationUpdates(boolean enable, Message response)1480     void setLocationUpdates(boolean enable, Message response);
1481 
1482     /**
1483      * Gets the default SMSC address.
1484      *
1485      * @param result Callback message contains the SMSC address.
1486      */
1487     @UnsupportedAppUsage
getSmscAddress(Message result)1488     void getSmscAddress(Message result);
1489 
1490     /**
1491      * Sets the default SMSC address.
1492      *
1493      * @param address new SMSC address
1494      * @param result Callback message is empty on completion
1495      */
1496     @UnsupportedAppUsage
setSmscAddress(String address, Message result)1497     void setSmscAddress(String address, Message result);
1498 
1499     /**
1500      * Indicates whether there is storage available for new SMS messages.
1501      * @param available true if storage is available
1502      * @param result callback message
1503      */
1504     @UnsupportedAppUsage
reportSmsMemoryStatus(boolean available, Message result)1505     void reportSmsMemoryStatus(boolean available, Message result);
1506 
1507     /**
1508      * Indicates to the vendor ril that StkService is running
1509      * and is ready to receive RIL_UNSOL_STK_XXXX commands.
1510      *
1511      * @param result callback message
1512      */
1513     @UnsupportedAppUsage
reportStkServiceIsRunning(Message result)1514     void reportStkServiceIsRunning(Message result);
1515 
1516     @UnsupportedAppUsage
invokeOemRilRequestRaw(byte[] data, Message response)1517     void invokeOemRilRequestRaw(byte[] data, Message response);
1518 
1519     /**
1520      * Sends carrier specific information to the vendor ril that can be used to
1521      * encrypt the IMSI and IMPI.
1522      *
1523      * @param publicKey the public key of the carrier used to encrypt IMSI/IMPI.
1524      * @param keyIdentifier the key identifier is optional information that is carrier
1525      *        specific.
1526      * @param response callback message
1527      */
setCarrierInfoForImsiEncryption(ImsiEncryptionInfo imsiEncryptionInfo, Message response)1528     void setCarrierInfoForImsiEncryption(ImsiEncryptionInfo imsiEncryptionInfo,
1529                                          Message response);
1530 
invokeOemRilRequestStrings(String[] strings, Message response)1531     void invokeOemRilRequestStrings(String[] strings, Message response);
1532 
1533     /**
1534      * Fires when RIL_UNSOL_OEM_HOOK_RAW is received from the RIL.
1535      */
setOnUnsolOemHookRaw(Handler h, int what, Object obj)1536     void setOnUnsolOemHookRaw(Handler h, int what, Object obj);
unSetOnUnsolOemHookRaw(Handler h)1537     void unSetOnUnsolOemHookRaw(Handler h);
1538 
1539     /**
1540      * Send TERMINAL RESPONSE to the SIM, after processing a proactive command
1541      * sent by the SIM.
1542      *
1543      * @param contents  String containing SAT/USAT response in hexadecimal
1544      *                  format starting with first byte of response data. See
1545      *                  TS 102 223 for details.
1546      * @param response  Callback message
1547      */
1548     @UnsupportedAppUsage
sendTerminalResponse(String contents, Message response)1549     public void sendTerminalResponse(String contents, Message response);
1550 
1551     /**
1552      * Send ENVELOPE to the SIM, after processing a proactive command sent by
1553      * the SIM.
1554      *
1555      * @param contents  String containing SAT/USAT response in hexadecimal
1556      *                  format starting with command tag. See TS 102 223 for
1557      *                  details.
1558      * @param response  Callback message
1559      */
1560     @UnsupportedAppUsage
sendEnvelope(String contents, Message response)1561     public void sendEnvelope(String contents, Message response);
1562 
1563     /**
1564      * Send ENVELOPE to the SIM, such as an SMS-PP data download envelope
1565      * for a SIM data download message. This method has one difference
1566      * from {@link #sendEnvelope}: The SW1 and SW2 status bytes from the UICC response
1567      * are returned along with the response data.
1568      *
1569      * response.obj will be an AsyncResult
1570      * response.obj.result will be an IccIoResult on success
1571      *
1572      * @param contents  String containing SAT/USAT response in hexadecimal
1573      *                  format starting with command tag. See TS 102 223 for
1574      *                  details.
1575      * @param response  Callback message
1576      */
sendEnvelopeWithStatus(String contents, Message response)1577     public void sendEnvelopeWithStatus(String contents, Message response);
1578 
1579     /**
1580      * Accept or reject the call setup request from SIM.
1581      *
1582      * @param accept   true if the call is to be accepted, false otherwise.
1583      * @param response Callback message
1584      */
1585     @UnsupportedAppUsage
handleCallSetupRequestFromSim(boolean accept, Message response)1586     public void handleCallSetupRequestFromSim(boolean accept, Message response);
1587 
1588     /**
1589      * Activate or deactivate cell broadcast SMS for GSM.
1590      *
1591      * @param activate
1592      *            true = activate, false = deactivate
1593      * @param result Callback message is empty on completion
1594      */
setGsmBroadcastActivation(boolean activate, Message result)1595     public void setGsmBroadcastActivation(boolean activate, Message result);
1596 
1597     /**
1598      * Configure cell broadcast SMS for GSM.
1599      *
1600      * @param response Callback message is empty on completion
1601      */
setGsmBroadcastConfig(SmsBroadcastConfigInfo[] config, Message response)1602     public void setGsmBroadcastConfig(SmsBroadcastConfigInfo[] config, Message response);
1603 
1604     /**
1605      * Query the current configuration of cell broadcast SMS of GSM.
1606      *
1607      * @param response
1608      *        Callback message contains the configuration from the modem
1609      *        on completion
1610      */
getGsmBroadcastConfig(Message response)1611     public void getGsmBroadcastConfig(Message response);
1612 
1613     //***** new Methods for CDMA support
1614 
1615     /**
1616      * Request the device ESN / MEID / IMEI / IMEISV.
1617      * "response" is const char **
1618      *   [0] is IMEI if GSM subscription is available
1619      *   [1] is IMEISV if GSM subscription is available
1620      *   [2] is ESN if CDMA subscription is available
1621      *   [3] is MEID if CDMA subscription is available
1622      */
getDeviceIdentity(Message response)1623     public void getDeviceIdentity(Message response);
1624 
1625     /**
1626      * Request the device MDN / H_SID / H_NID / MIN.
1627      * "response" is const char **
1628      *   [0] is MDN if CDMA subscription is available
1629      *   [1] is a comma separated list of H_SID (Home SID) in decimal format
1630      *       if CDMA subscription is available
1631      *   [2] is a comma separated list of H_NID (Home NID) in decimal format
1632      *       if CDMA subscription is available
1633      *   [3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
1634      */
1635     @UnsupportedAppUsage
getCDMASubscription(Message response)1636     public void getCDMASubscription(Message response);
1637 
1638     /**
1639      * Send Flash Code.
1640      * "response" is is NULL
1641      *   [0] is a FLASH string
1642      */
sendCDMAFeatureCode(String FeatureCode, Message response)1643     public void sendCDMAFeatureCode(String FeatureCode, Message response);
1644 
1645     /** Set the Phone type created */
1646     @UnsupportedAppUsage
setPhoneType(int phoneType)1647     void setPhoneType(int phoneType);
1648 
1649     /**
1650      *  Query the CDMA roaming preference setting
1651      *
1652      * @param response is callback message to report one of  CDMA_RM_*
1653      */
queryCdmaRoamingPreference(Message response)1654     void queryCdmaRoamingPreference(Message response);
1655 
1656     /**
1657      *  Requests to set the CDMA roaming preference
1658      * @param cdmaRoamingType one of  CDMA_RM_*
1659      * @param response is callback message
1660      */
setCdmaRoamingPreference(int cdmaRoamingType, Message response)1661     void setCdmaRoamingPreference(int cdmaRoamingType, Message response);
1662 
1663     /**
1664      *  Requests to set the CDMA subscription mode
1665      * @param cdmaSubscriptionType one of  CDMA_SUBSCRIPTION_*
1666      * @param response is callback message
1667      */
setCdmaSubscriptionSource(int cdmaSubscriptionType, Message response)1668     void setCdmaSubscriptionSource(int cdmaSubscriptionType, Message response);
1669 
1670     /**
1671      *  Requests to get the CDMA subscription srouce
1672      * @param response is callback message
1673      */
getCdmaSubscriptionSource(Message response)1674     void getCdmaSubscriptionSource(Message response);
1675 
1676     /**
1677      *  Set the TTY mode
1678      *
1679      * @param ttyMode one of the following:
1680      * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
1681      * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
1682      * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
1683      * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
1684      * @param response is callback message
1685      */
1686     @UnsupportedAppUsage
setTTYMode(int ttyMode, Message response)1687     void setTTYMode(int ttyMode, Message response);
1688 
1689     /**
1690      *  Query the TTY mode
1691      * (AsyncResult)response.obj).result is an int[] with element [0] set to
1692      * tty mode:
1693      * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
1694      * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
1695      * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
1696      * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
1697      * @param response is callback message
1698      */
1699     @UnsupportedAppUsage
queryTTYMode(Message response)1700     void queryTTYMode(Message response);
1701 
1702     /**
1703      * Setup a packet data connection On successful completion, the result
1704      * message will return a SetupDataResult object containing the connection information.
1705      *
1706      * @param accessNetworkType
1707      *            Access network to use. Values is one of AccessNetworkConstants.AccessNetworkType.
1708      * @param dataProfile
1709      *            Data profile for data call setup
1710      * @param isRoaming
1711      *            Device is roaming or not
1712      * @param allowRoaming
1713      *            Flag indicating data roaming is enabled or not
1714      * @param reason
1715      *            The reason for data setup
1716      * @param linkProperties
1717      *            If the reason is for handover, this indicates the link properties of the existing
1718      *            data connection
1719      * @param result
1720      *            Callback message
1721      */
setupDataCall(int accessNetworkType, DataProfile dataProfile, boolean isRoaming, boolean allowRoaming, int reason, LinkProperties linkProperties, Message result)1722     void setupDataCall(int accessNetworkType, DataProfile dataProfile, boolean isRoaming,
1723                        boolean allowRoaming, int reason, LinkProperties linkProperties,
1724                        Message result);
1725 
1726     /**
1727      * Deactivate packet data connection
1728      *
1729      * @param cid
1730      *            The connection ID
1731      * @param reason
1732      *            Data disconnect reason.
1733      * @param result
1734      *            Callback message is empty on completion
1735      */
deactivateDataCall(int cid, int reason, Message result)1736     public void deactivateDataCall(int cid, int reason, Message result);
1737 
1738     /**
1739      * Activate or deactivate cell broadcast SMS for CDMA.
1740      *
1741      * @param activate
1742      *            true = activate, false = deactivate
1743      * @param result
1744      *            Callback message is empty on completion
1745      */
1746     @UnsupportedAppUsage
setCdmaBroadcastActivation(boolean activate, Message result)1747     public void setCdmaBroadcastActivation(boolean activate, Message result);
1748 
1749     /**
1750      * Configure cdma cell broadcast SMS.
1751      *
1752      * @param response
1753      *            Callback message is empty on completion
1754      */
setCdmaBroadcastConfig(CdmaSmsBroadcastConfigInfo[] configs, Message response)1755     public void setCdmaBroadcastConfig(CdmaSmsBroadcastConfigInfo[] configs, Message response);
1756 
1757     /**
1758      * Query the current configuration of cdma cell broadcast SMS.
1759      *
1760      * @param result
1761      *            Callback message contains the configuration from the modem on completion
1762      */
1763     @UnsupportedAppUsage
getCdmaBroadcastConfig(Message result)1764     public void getCdmaBroadcastConfig(Message result);
1765 
1766     /**
1767      *  Requests the radio's system selection module to exit emergency callback mode.
1768      *  This function should only be called from for CDMA.
1769      *
1770      * @param response callback message
1771      */
1772     @UnsupportedAppUsage
exitEmergencyCallbackMode(Message response)1773     public void exitEmergencyCallbackMode(Message response);
1774 
1775     /**
1776      * Request the status of the ICC and UICC cards.
1777      *
1778      * @param result
1779      *          Callback message containing {@link IccCardStatus} structure for the card.
1780      */
1781     @UnsupportedAppUsage
getIccCardStatus(Message result)1782     public void getIccCardStatus(Message result);
1783 
1784     /**
1785      * Request the status of all the physical UICC slots.
1786      *
1787      * @param result Callback message containing a {@link java.util.ArrayList} of
1788      * {@link com.android.internal.telephony.uicc.IccSlotStatus} instances for all the slots.
1789      */
getIccSlotsStatus(Message result)1790     void getIccSlotsStatus(Message result);
1791 
1792     /**
1793      * Set the mapping from logical slots to physical slots.
1794      *
1795      * @param physicalSlots Mapping from logical slots to physical slots.
1796      * @param result Callback message is empty on completion.
1797      */
setLogicalToPhysicalSlotMapping(int[] physicalSlots, Message result)1798     void setLogicalToPhysicalSlotMapping(int[] physicalSlots, Message result);
1799 
1800     /**
1801      * Return if the current radio is LTE on CDMA. This
1802      * is a tri-state return value as for a period of time
1803      * the mode may be unknown.
1804      *
1805      * @return {@link PhoneConstants#LTE_ON_CDMA_UNKNOWN}, {@link PhoneConstants#LTE_ON_CDMA_FALSE}
1806      * or {@link PhoneConstants#LTE_ON_CDMA_TRUE}
1807      */
getLteOnCdmaMode()1808     public int getLteOnCdmaMode();
1809 
1810     /**
1811      * Request the SIM application on the UICC to perform authentication
1812      * challenge/response algorithm. The data string and challenge response are
1813      * Base64 encoded Strings.
1814      * Can support EAP-SIM, EAP-AKA with results encoded per 3GPP TS 31.102.
1815      *
1816      * @param authContext is the P2 parameter that specifies the authentication context per 3GPP TS
1817      *                    31.102 (Section 7.1.2)
1818      * @param data authentication challenge data
1819      * @param aid used to determine which application/slot to send the auth command to. See ETSI
1820      *            102.221 8.1 and 101.220 4
1821      * @param response a callback message with the String response in the obj field
1822      */
1823     @UnsupportedAppUsage
requestIccSimAuthentication(int authContext, String data, String aid, Message response)1824     public void requestIccSimAuthentication(int authContext, String data, String aid, Message response);
1825 
1826     /**
1827      * Get the current Voice Radio Technology.
1828      *
1829      * AsyncResult.result is an int array with the first value
1830      * being one of the ServiceState.RIL_RADIO_TECHNOLOGY_xxx values.
1831      *
1832      * @param result is sent back to handler and result.obj is a AsyncResult
1833      */
getVoiceRadioTechnology(Message result)1834     void getVoiceRadioTechnology(Message result);
1835 
1836     /**
1837      * Return the current set of CellInfo records
1838      *
1839      * AsyncResult.result is a of Collection<CellInfo>
1840      *
1841      * @param result is sent back to handler and result.obj is a AsyncResult
1842      * @param workSource calling WorkSource
1843      */
getCellInfoList(Message result, WorkSource workSource)1844     default void getCellInfoList(Message result, WorkSource workSource) {}
1845 
1846     /**
1847      * Sets the minimum time in milli-seconds between when RIL_UNSOL_CELL_INFO_LIST
1848      * should be invoked.
1849      *
1850      * The default, 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
1851      * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
1852      * A RIL_UNSOL_CELL_INFO_LIST.
1853      *
1854      *
1855 
1856      * @param rateInMillis is sent back to handler and result.obj is a AsyncResult
1857      * @param response.obj is AsyncResult ar when sent to associated handler
1858      *                        ar.exception carries exception on failure or null on success
1859      *                        otherwise the error.
1860      * @param workSource calling WorkSource
1861      */
setCellInfoListRate(int rateInMillis, Message response, WorkSource workSource)1862     default void setCellInfoListRate(int rateInMillis, Message response, WorkSource workSource){}
1863 
1864     /**
1865      * Fires when RIL_UNSOL_CELL_INFO_LIST is received from the RIL.
1866      */
1867     @UnsupportedAppUsage
registerForCellInfoList(Handler h, int what, Object obj)1868     void registerForCellInfoList(Handler h, int what, Object obj);
unregisterForCellInfoList(Handler h)1869     void unregisterForCellInfoList(Handler h);
1870 
1871     /**
1872      * Fires when a new {@link android.telephony.PhysicalChannelConfig} list is received from the
1873      * RIL.
1874      */
registerForPhysicalChannelConfiguration(Handler h, int what, Object obj)1875     void registerForPhysicalChannelConfiguration(Handler h, int what, Object obj);
1876 
1877     /**
1878      * Unregisters the handler for {@link android.telephony.PhysicalChannelConfig} updates.
1879      */
unregisterForPhysicalChannelConfiguration(Handler h)1880     void unregisterForPhysicalChannelConfiguration(Handler h);
1881 
1882     /**
1883      * Set Initial Attach Apn
1884      *
1885      * @param dataProfile
1886      *            data profile for initial APN attach
1887      * @param isRoaming
1888      *            indicating the device is roaming or not
1889      * @param result
1890      *            callback message contains the information of SUCCESS/FAILURE
1891      */
setInitialAttachApn(DataProfile dataProfile, boolean isRoaming, Message result)1892     void setInitialAttachApn(DataProfile dataProfile, boolean isRoaming, Message result);
1893 
1894     /**
1895      * Set data profiles in modem
1896      *
1897      * @param dps
1898      *            Array of the data profiles set to modem
1899      * @param isRoaming
1900      *            Indicating if the device is roaming or not
1901      * @param result
1902      *            callback message contains the information of SUCCESS/FAILURE
1903      */
setDataProfile(DataProfile[] dps, boolean isRoaming, Message result)1904     void setDataProfile(DataProfile[] dps, boolean isRoaming, Message result);
1905 
1906     /**
1907      * Notifiy that we are testing an emergency call
1908      */
testingEmergencyCall()1909     public void testingEmergencyCall();
1910 
1911     /**
1912      * Open a logical channel to the SIM.
1913      *
1914      * Input parameters equivalent to TS 27.007 AT+CCHO command.
1915      *
1916      * @param AID Application id. See ETSI 102.221 and 101.220.
1917      * @param p2 P2 parameter (described in ISO 7816-4).
1918      * @param response Callback message. response.obj will be an int [1] with
1919      *            element [0] set to the id of the logical channel.
1920      */
iccOpenLogicalChannel(String AID, int p2, Message response)1921     public void iccOpenLogicalChannel(String AID, int p2, Message response);
1922 
1923     /**
1924      * Close a previously opened logical channel to the SIM.
1925      *
1926      * Input parameters equivalent to TS 27.007 AT+CCHC command.
1927      *
1928      * @param channel Channel id. Id of the channel to be closed.
1929      * @param response Callback message.
1930      */
iccCloseLogicalChannel(int channel, Message response)1931     public void iccCloseLogicalChannel(int channel, Message response);
1932 
1933     /**
1934      * Exchange APDUs with the SIM on a logical channel.
1935      *
1936      * Input parameters equivalent to TS 27.007 AT+CGLA command.
1937      *
1938      * @param channel Channel id of the channel to use for communication. Has to
1939      *            be greater than zero.
1940      * @param cla Class of the APDU command.
1941      * @param instruction Instruction of the APDU command.
1942      * @param p1 P1 value of the APDU command.
1943      * @param p2 P2 value of the APDU command.
1944      * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU
1945      *            is sent to the SIM.
1946      * @param data Data to be sent with the APDU.
1947      * @param response Callback message. response.obj.userObj will be
1948      *            an IccIoResult on success.
1949      */
iccTransmitApduLogicalChannel(int channel, int cla, int instruction, int p1, int p2, int p3, String data, Message response)1950     public void iccTransmitApduLogicalChannel(int channel, int cla, int instruction,
1951             int p1, int p2, int p3, String data, Message response);
1952 
1953     /**
1954      * Exchange APDUs with the SIM on a basic channel.
1955      *
1956      * Input parameters equivalent to TS 27.007 AT+CSIM command.
1957      *
1958      * @param cla Class of the APDU command.
1959      * @param instruction Instruction of the APDU command.
1960      * @param p1 P1 value of the APDU command.
1961      * @param p2 P2 value of the APDU command.
1962      * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU
1963      *            is sent to the SIM.
1964      * @param data Data to be sent with the APDU.
1965      * @param response Callback message. response.obj.userObj will be
1966      *            an IccIoResult on success.
1967      */
iccTransmitApduBasicChannel(int cla, int instruction, int p1, int p2, int p3, String data, Message response)1968     public void iccTransmitApduBasicChannel(int cla, int instruction, int p1, int p2,
1969             int p3, String data, Message response);
1970 
1971     /**
1972      * Read one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}.
1973      * Used for device configuration by some CDMA operators.
1974      *
1975      * @param itemID the ID of the item to read
1976      * @param response callback message with the String response in the obj field
1977      * @param workSource calling WorkSource
1978      */
nvReadItem(int itemID, Message response, WorkSource workSource)1979     default void nvReadItem(int itemID, Message response, WorkSource workSource) {}
1980 
1981     /**
1982      * Write one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}.
1983      * Used for device configuration by some CDMA operators.
1984      *
1985      * @param itemID the ID of the item to read
1986      * @param itemValue the value to write, as a String
1987      * @param response Callback message.
1988      * @param workSource calling WorkSource
1989      */
nvWriteItem(int itemID, String itemValue, Message response, WorkSource workSource)1990     default void nvWriteItem(int itemID, String itemValue, Message response,
1991             WorkSource workSource) {}
1992 
1993     /**
1994      * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
1995      * Used for device configuration by some CDMA operators.
1996      *
1997      * @param preferredRoamingList byte array containing the new PRL
1998      * @param response Callback message.
1999      */
nvWriteCdmaPrl(byte[] preferredRoamingList, Message response)2000     void nvWriteCdmaPrl(byte[] preferredRoamingList, Message response);
2001 
2002     /**
2003      * Perform the specified type of NV config reset. The radio will be taken offline
2004      * and the device must be rebooted after erasing the NV. Used for device
2005      * configuration by some CDMA operators.
2006      *
2007      * @param resetType reset type: 1: reload NV reset, 2: erase NV reset, 3: factory NV reset
2008      * @param response Callback message.
2009      */
nvResetConfig(int resetType, Message response)2010     void nvResetConfig(int resetType, Message response);
2011 
2012     /**
2013      *  returned message
2014      *  retMsg.obj = AsyncResult ar
2015      *  ar.exception carries exception on failure
2016      *  ar.userObject contains the orignal value of result.obj
2017      *  ar.result contains a List of HardwareConfig
2018      */
getHardwareConfig(Message result)2019     void getHardwareConfig (Message result);
2020 
2021     /**
2022      * @return version of the ril.
2023      */
getRilVersion()2024     int getRilVersion();
2025 
2026    /**
2027      * Sets user selected subscription at Modem.
2028      *
2029      * @param slotId
2030      *          Slot.
2031      * @param appIndex
2032      *          Application index in the card.
2033      * @param subId
2034      *          Indicates subscription 0 or subscription 1.
2035      * @param subStatus
2036      *          Activation status, 1 = activate and 0 = deactivate.
2037      * @param result
2038      *          Callback message contains the information of SUCCESS/FAILURE.
2039      */
2040     // FIXME Update the doc and consider modifying the request to make more generic.
2041     @UnsupportedAppUsage
setUiccSubscription(int slotId, int appIndex, int subId, int subStatus, Message result)2042     public void setUiccSubscription(int slotId, int appIndex, int subId, int subStatus,
2043             Message result);
2044 
2045     /**
2046      * Tells the modem if data is allowed or not.
2047      *
2048      * @param allowed
2049      *          true = allowed, false = not alowed
2050      * @param result
2051      *          Callback message contains the information of SUCCESS/FAILURE.
2052      */
2053     // FIXME We may need to pass AID and slotid also
2054     @UnsupportedAppUsage
setDataAllowed(boolean allowed, Message result)2055     public void setDataAllowed(boolean allowed, Message result);
2056 
2057     /**
2058      * Inform RIL that the device is shutting down
2059      *
2060      * @param result Callback message contains the information of SUCCESS/FAILURE
2061      */
2062     @UnsupportedAppUsage
requestShutdown(Message result)2063     public void requestShutdown(Message result);
2064 
2065     /**
2066      *  Set phone radio type and access technology.
2067      *
2068      *  @param rc the phone radio capability defined in
2069      *         RadioCapability. It's a input object used to transfer parameter to logic modem
2070      *
2071      *  @param result Callback message.
2072      */
setRadioCapability(RadioCapability rc, Message result)2073     public void setRadioCapability(RadioCapability rc, Message result);
2074 
2075     /**
2076      *  Get phone radio capability
2077      *
2078      *  @param result Callback message.
2079      */
getRadioCapability(Message result)2080     public void getRadioCapability(Message result);
2081 
2082     /**
2083      * Registers the handler when phone radio capability is changed.
2084      *
2085      * @param h Handler for notification message.
2086      * @param what User-defined message code.
2087      * @param obj User object.
2088      */
registerForRadioCapabilityChanged(Handler h, int what, Object obj)2089     public void registerForRadioCapabilityChanged(Handler h, int what, Object obj);
2090 
2091     /**
2092      * Unregister for notifications when phone radio capability is changed.
2093      *
2094      * @param h Handler to be removed from the registrant list.
2095      */
unregisterForRadioCapabilityChanged(Handler h)2096     public void unregisterForRadioCapabilityChanged(Handler h);
2097 
2098     /**
2099      * Start LCE (Link Capacity Estimation) service with a desired reporting interval.
2100      *
2101      * @param reportIntervalMs
2102      *        LCE info reporting interval (ms).
2103      *
2104      * @param result Callback message contains the current LCE status.
2105      * {byte status, int actualIntervalMs}
2106      */
startLceService(int reportIntervalMs, boolean pullMode, Message result)2107     public void startLceService(int reportIntervalMs, boolean pullMode, Message result);
2108 
2109     /**
2110      * Stop LCE service.
2111      *
2112      * @param result Callback message contains the current LCE status:
2113      * {byte status, int actualIntervalMs}
2114      *
2115      */
stopLceService(Message result)2116     public void stopLceService(Message result);
2117 
2118     /**
2119      * Pull LCE service for capacity data.
2120      *
2121      * @param result Callback message contains the capacity info:
2122      * {int capacityKbps, byte confidenceLevel, byte lceSuspendedTemporarily}
2123      */
pullLceData(Message result)2124     public void pullLceData(Message result);
2125 
2126     /**
2127      * Register a LCE info listener.
2128      *
2129      * @param h Handler for notification message.
2130      * @param what User-defined message code.
2131      * @param obj User object.
2132      */
registerForLceInfo(Handler h, int what, Object obj)2133     void registerForLceInfo(Handler h, int what, Object obj);
2134 
2135     /**
2136      * Unregister the LCE Info listener.
2137      *
2138      * @param h handle to be removed.
2139      */
unregisterForLceInfo(Handler h)2140     void unregisterForLceInfo(Handler h);
2141 
2142     /**
2143      *
2144      * Get modem activity info and stats
2145      *
2146      * @param result Callback message contains the modem activity information
2147      * @param workSource calling WorkSource
2148      */
getModemActivityInfo(Message result, WorkSource workSource)2149     default void getModemActivityInfo(Message result, WorkSource workSource) {}
2150 
2151     /**
2152      * Set allowed carriers
2153      *
2154      * @param carriers Allowed carriers
2155      * @param result Callback message contains the result of the operation
2156      * @param workSource calling WorkSource
2157      */
setAllowedCarriers(CarrierRestrictionRules carrierRestrictionRules, Message result, WorkSource workSource)2158     default void setAllowedCarriers(CarrierRestrictionRules carrierRestrictionRules,
2159             Message result, WorkSource workSource) {}
2160 
2161     /**
2162      * Get allowed carriers
2163      *
2164      * @param result Callback message contains the allowed carriers
2165      * @param workSource calling WorkSource
2166      */
getAllowedCarriers(Message result, WorkSource workSource)2167     default void getAllowedCarriers(Message result, WorkSource workSource) {}
2168 
2169     /**
2170      * Register for unsolicited PCO data.  This information is carrier-specific,
2171      * opaque binary blobs destined for carrier apps for interpretation.
2172      *
2173      * @param h Handler for notification message.
2174      * @param what User-defined message code.
2175      * @param obj User object.
2176      */
registerForPcoData(Handler h, int what, Object obj)2177     public void registerForPcoData(Handler h, int what, Object obj);
2178 
2179     /**
2180      * Unregister for PCO data.
2181      *
2182      * @param h handler to be removed
2183      */
unregisterForPcoData(Handler h)2184     public void unregisterForPcoData(Handler h);
2185 
2186     /**
2187      * Register for modem reset indication.
2188      *
2189      * @param h  Handler for the notification message
2190      * @param what User-defined message code
2191      * @param obj User object
2192      */
registerForModemReset(Handler h, int what, Object obj)2193     void registerForModemReset(Handler h, int what, Object obj);
2194 
2195     /**
2196      * Unregister for modem reset
2197      *
2198      * @param h handler to be removed
2199      */
unregisterForModemReset(Handler h)2200     void unregisterForModemReset(Handler h);
2201 
2202     /**
2203      * Send the updated device state
2204      *
2205      * @param stateType Device state type
2206      * @param state True if enabled, otherwise disabled
2207      * @param result callback message contains the information of SUCCESS/FAILURE
2208      */
sendDeviceState(int stateType, boolean state, Message result)2209     void sendDeviceState(int stateType, boolean state, Message result);
2210 
2211     /**
2212      * Send the device state to the modem
2213      *
2214      * @param filter unsolicited response filter. See DeviceStateMonitor.UnsolicitedResponseFilter
2215      * @param result callback message contains the information of SUCCESS/FAILURE
2216      */
setUnsolResponseFilter(int filter, Message result)2217     void setUnsolResponseFilter(int filter, Message result);
2218 
2219     /**
2220      * Send the signal strength reporting criteria to the modem.
2221      *
2222      * @param hysteresisMs A hysteresis time in milliseconds. A value of 0 disables hysteresis.
2223      * @param hysteresisDb An interval in dB defining the required magnitude change between reports.
2224      *     A value of 0 disables hysteresis.
2225      * @param thresholdsDbm An array of trigger thresholds in dBm. A size of 0 disables thresholds.
2226      * @param ran RadioAccessNetwork for which to apply criteria.
2227      * @param result callback message contains the information of SUCCESS/FAILURE
2228      */
setSignalStrengthReportingCriteria(int hysteresisMs, int hysteresisDb, int[] thresholdsDbm, int ran, Message result)2229     void setSignalStrengthReportingCriteria(int hysteresisMs, int hysteresisDb, int[] thresholdsDbm,
2230             int ran, Message result);
2231 
2232     /**
2233      * Send the link capacity reporting criteria to the modem
2234      *
2235      * @param hysteresisMs A hysteresis time in milliseconds. A value of 0 disables hysteresis.
2236      * @param hysteresisDlKbps An interval in kbps defining the required magnitude change between DL
2237      *     reports. A value of 0 disables hysteresis.
2238      * @param hysteresisUlKbps An interval in kbps defining the required magnitude change between UL
2239      *     reports. A value of 0 disables hysteresis.
2240      * @param thresholdsDlKbps An array of trigger thresholds in kbps for downlink reports. A size
2241      *     of 0 disables thresholds.
2242      * @param thresholdsUlKbps An array of trigger thresholds in kbps for uplink reports. A size
2243      *     of 0 disables thresholds.
2244      * @param ran RadioAccessNetwork for which to apply criteria.
2245      * @param result callback message contains the information of SUCCESS/FAILURE
2246      */
setLinkCapacityReportingCriteria(int hysteresisMs, int hysteresisDlKbps, int hysteresisUlKbps, int[] thresholdsDlKbps, int[] thresholdsUlKbps, int ran, Message result)2247     void setLinkCapacityReportingCriteria(int hysteresisMs, int hysteresisDlKbps,
2248             int hysteresisUlKbps, int[] thresholdsDlKbps, int[] thresholdsUlKbps, int ran,
2249             Message result);
2250 
2251     /**
2252      * Set SIM card power up or down
2253      *
2254      * @param state  State of SIM (power down, power up, pass through)
2255      * - {@link android.telephony.TelephonyManager#CARD_POWER_DOWN}
2256      * - {@link android.telephony.TelephonyManager#CARD_POWER_UP}
2257      * - {@link android.telephony.TelephonyManager#CARD_POWER_UP_PASS_THROUGH}
2258      * @param result callback message contains the information of SUCCESS/FAILURE
2259      * @param workSource calling WorkSource
2260      */
setSimCardPower(int state, Message result, WorkSource workSource)2261     default void setSimCardPower(int state, Message result, WorkSource workSource) {}
2262 
2263     /**
2264      * Register for unsolicited Carrier Public Key.
2265      *
2266      * @param h Handler for notification message.
2267      * @param what User-defined message code.
2268      * @param obj User object.
2269      */
registerForCarrierInfoForImsiEncryption(Handler h, int what, Object obj)2270     void registerForCarrierInfoForImsiEncryption(Handler h, int what, Object obj);
2271 
2272     /**
2273      * DeRegister for unsolicited Carrier Public Key.
2274      *
2275      * @param h Handler for notification message.
2276      */
unregisterForCarrierInfoForImsiEncryption(Handler h)2277     void unregisterForCarrierInfoForImsiEncryption(Handler h);
2278 
2279     /**
2280      * Register for unsolicited Network Scan result.
2281      *
2282      * @param h Handler for notification message.
2283      * @param what User-defined message code.
2284      * @param obj User object.
2285      */
registerForNetworkScanResult(Handler h, int what, Object obj)2286     void registerForNetworkScanResult(Handler h, int what, Object obj);
2287 
2288     /**
2289      * DeRegister for unsolicited Network Scan result.
2290      *
2291      * @param h Handler for notification message.
2292      */
unregisterForNetworkScanResult(Handler h)2293     void unregisterForNetworkScanResult(Handler h);
2294 
2295     /**
2296      * Register for unsolicited NATT Keepalive Status Indications
2297      *
2298      * @param h Handler for notification message.
2299      * @param what User-defined message code.
2300      * @param obj User object.
2301      */
registerForNattKeepaliveStatus(Handler h, int what, Object obj)2302     void registerForNattKeepaliveStatus(Handler h, int what, Object obj);
2303 
2304     /**
2305      * Deregister for unsolicited NATT Keepalive Status Indications.
2306      *
2307      * @param h Handler for notification message.
2308      */
unregisterForNattKeepaliveStatus(Handler h)2309     void unregisterForNattKeepaliveStatus(Handler h);
2310 
2311     /**
2312      * Register for unsolicited Emergency Number List Indications
2313      *
2314      * @param h Handler for notification message.
2315      * @param what User-defined message code.
2316      * @param obj User object.
2317      */
registerForEmergencyNumberList(Handler h, int what, Object obj)2318     void registerForEmergencyNumberList(Handler h, int what, Object obj);
2319 
2320     /**
2321      * Deregister for unsolicited Emergency Number List Indications
2322      *
2323      * @param h Handler for notification message.
2324      */
unregisterForEmergencyNumberList(Handler h)2325     void unregisterForEmergencyNumberList(Handler h);
2326 
2327     /**
2328      * Start sending NATT Keepalive packets on a specified data connection
2329      *
2330      * @param contextId cid that identifies the data connection for this keepalive
2331      * @param packetData the keepalive packet data description
2332      * @param intervalMillis a time interval in ms between keepalive packet transmissions
2333      * @param result a Message to return to the requester
2334      */
startNattKeepalive( int contextId, KeepalivePacketData packetData, int intervalMillis, Message result)2335     void startNattKeepalive(
2336             int contextId, KeepalivePacketData packetData, int intervalMillis, Message result);
2337 
2338     /**
2339      * Stop sending NATT Keepalive packets on a specified data connection
2340      *
2341      * @param sessionHandle the keepalive session handle (from the modem) to stop
2342      * @param result a Message to return to the requester
2343      */
stopNattKeepalive(int sessionHandle, Message result)2344     void stopNattKeepalive(int sessionHandle, Message result);
2345 
2346     /**
2347      * Enable or disable the logical modem.
2348      *
2349      * @param enable whether to enable or disable the modem
2350      * @param result a Message to return to the requester
2351      */
enableModem(boolean enable, Message result)2352     default void enableModem(boolean enable, Message result) {};
2353 
2354     /**
2355      * Query whether logical modem is enabled or disabled
2356      *
2357      * @param result a Message to return to the requester
2358      */
getModemStatus(Message result)2359     default void getModemStatus(Message result) {};
2360 
getClientRequestStats()2361     default List<ClientRequestStats> getClientRequestStats() {
2362         return null;
2363     }
2364 }
2365