• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.hardware.radio@1.0;
18
19import IRadioResponse;
20import IRadioIndication;
21
22/**
23 * This interface is used by telephony & telecom to talk to cellular radio.
24 * All the functions have minimum one parameter:
25 * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
26 * duration of a method call. If clients provide colliding serials (including passing the same
27 * serial to different methods), multiple responses (one for each method call) must still be served.
28 */
29interface IRadio {
30    /**
31     * Set response functions for radio requests & radio indications.
32     *
33     * @param radioResponse Object containing response functions
34     * @param radioIndication Object containing radio indications
35     */
36    setResponseFunctions(IRadioResponse radioResponse,
37            IRadioIndication radioIndication);
38
39    /**
40     * Requests status of the ICC card
41     *
42     * @param serial Serial number of request.
43     *
44     * Response function is IRadioResponse.getIccCardStatusResponse()
45     *
46     */
47    oneway getIccCardStatus(int32_t serial);
48
49    /**
50     * Supplies ICC PIN. Only called if CardStatus has AppState.PIN state
51     *
52     * @param serial Serial number of request.
53     * @param pin PIN value
54     * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
55     *
56     * Response function is IRadioResponse.supplyIccPinForAppResponse()
57     *
58     */
59    oneway supplyIccPinForApp(int32_t serial, string pin, string aid);
60
61    /**
62     * Supplies ICC PUK and new PIN.
63     *
64     * @param serial Serial number of request.
65     * @param puk PUK value
66     * @param pin New PIN value
67     * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
68     *
69     * Response function is IRadioResponse.supplyIccPukForAppResponse()
70     *
71     */
72    oneway supplyIccPukForApp(int32_t serial, string puk, string pin, string aid);
73
74    /**
75     * Supplies ICC PIN2. Only called following operation where SIM_PIN2 was
76     * returned as a a failure from a previous operation.
77     *
78     * @param serial Serial number of request.
79     * @param pin2 PIN2 value
80     * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
81     *
82     * Response function is IRadioResponse.supplyIccPin2ForAppResponse()
83     *
84     */
85    oneway supplyIccPin2ForApp(int32_t serial, string pin2, string aid);
86
87    /**
88     * Supplies ICC PUK2 and new PIN2.
89     *
90     * @param serial Serial number of request.
91     * @param puk2 PUK2 value
92     * @param pin2 New PIN2 value
93     * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
94     *
95     * Response function is IRadioResponse.supplyIccPuk2ForAppResponse()
96     *
97     */
98    oneway supplyIccPuk2ForApp(int32_t serial, string puk2, string pin2,
99            string aid);
100
101    /**
102     * Supplies old ICC PIN and new PIN.
103     *
104     * @param serial Serial number of request.
105     * @param oldPin Old pin value
106     * @param newPin New pin value
107     * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
108     *
109     * Response function is IRadioResponse.changeIccPinForAppResponse()
110     *
111     */
112    oneway changeIccPinForApp(int32_t serial, string oldPin, string newPin,
113            string aid);
114
115    /**
116     * Supplies old ICC PIN2 and new PIN2.
117     *
118     * @param serial Serial number of request.
119     * @param oldPin2 Old pin2 value
120     * @param newPin2 New pin2 value
121     * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
122     *
123     * Response function is IRadioResponse.changeIccPin2ForAppResponse()
124     *
125     */
126    oneway changeIccPin2ForApp(int32_t serial, string oldPin2, string newPin2,
127            string aid);
128
129    /**
130     * Requests that network personalization be deactivated
131     *
132     * @param serial Serial number of request.
133     * @param netPin Network depersonlization code
134     *
135     * Response function is IRadioResponse.supplyNetworkDepersonalizationResponse()
136     *
137     */
138    oneway supplyNetworkDepersonalization(int32_t serial, string netPin);
139
140    /**
141     * Requests current call list
142     *
143     * @param serial Serial number of request.
144     *
145     * Response function is IRadioResponse.getCurrentCallsResponse()
146     *
147     */
148    oneway getCurrentCalls(int32_t serial);
149
150    /**
151     * Initiate voice call.
152     * This method is never used for supplementary service codes
153     *
154     * @param serial Serial number of request.
155     * @param dialInfo Dial struct
156     *
157     * Response function is IRadioResponse.dialResponse()
158     *
159     */
160    oneway dial(int32_t serial, Dial dialInfo);
161
162    /**
163     * Get the SIM IMSI
164     * Only valid when radio state is "RADIO_STATE_ON"
165     *
166     * @param serial Serial number of request.
167     * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
168     *
169     * Response function is IRadioResponse.getImsiForAppResponse()
170     *
171     */
172    oneway getImsiForApp(int32_t serial, string aid);
173
174    /**
175     * Hang up a specific line (like AT+CHLD=1x)
176     * After this HANGUP request returns, Radio must show the connection is NOT
177     * active anymore in next requestGetCurrentCalls query.
178     *
179     * @param serial Serial number of request.
180     * @param gsmIndex Connection index (value of 'x' in CHLD above)
181     *
182     * Response function is IRadioResponse.hangupResponse()
183     *
184     */
185    oneway hangup(int32_t serial, int32_t gsmIndex);
186
187    /**
188     * Hang up waiting or held (like AT+CHLD=0)
189     * After this HANGUP request returns, Radio must show the connection is NOT
190     * active anymore in next getCurrentCalls() query.
191     *
192     * @param serial Serial number of request.
193     *
194     * Response function is IRadioResponse.hangupWaitingOrBackgroundResponse()
195     *
196     */
197    oneway hangupWaitingOrBackground(int32_t serial);
198
199    /**
200     * Hang up waiting or held (like AT+CHLD=1)
201     * After this HANGUP request returns, Radio must show the connection is NOT
202     * active anymore in next getCurrentCalls query.
203     *
204     * @param serial Serial number of request.
205     *
206     * Response function is IRadioResponse.hangupForegroundResumeBackgroundResponse()
207     *
208     */
209    oneway hangupForegroundResumeBackground(int32_t serial);
210
211    /**
212     * Switch waiting or holding call and active call (like AT+CHLD=2)
213     * State transitions must be as follows:
214     *
215     * Call transitions must happen as shown below.
216     *
217     *   BEFORE                               AFTER
218     * Call 1   Call 2                 Call 1       Call 2
219     * ACTIVE   HOLDING                HOLDING     ACTIVE
220     * ACTIVE   WAITING                HOLDING     ACTIVE
221     * HOLDING  WAITING                HOLDING     ACTIVE
222     * ACTIVE   IDLE                   HOLDING     IDLE
223     * IDLE     IDLE                   IDLE        IDLE
224     *
225     * @param serial Serial number of request.
226     *
227     * Response function is IRadioResponse.switchWaitingOrHoldingAndActiveResponse()
228     *
229     */
230    oneway switchWaitingOrHoldingAndActive(int32_t serial);
231
232    /**
233     * Conference holding and active (like AT+CHLD=3)
234     *
235     * @param serial Serial number of request.
236     *
237     * Response function is IRadioResponse.conferenceResponse()
238     *
239     */
240    oneway conference(int32_t serial);
241
242    /**
243     * Send UDUB (user determined user busy) to ringing or
244     * waiting call answer)
245     *
246     * @param serial Serial number of request.
247     *
248     * Response function is IRadioResponse.rejectCallResponse()
249     *
250     */
251    oneway rejectCall(int32_t serial);
252
253    /**
254     * Requests the failure cause code for the most recently terminated call.
255     *
256     * @param serial Serial number of request.
257     *
258     * Response function is IRadioResponse.getLastCallFailCauseResponse()
259     *
260     */
261    oneway getLastCallFailCause(int32_t serial);
262
263    /**
264     * Requests current signal strength and associated information.
265     * Must succeed if radio is on.
266     *
267     * @param serial Serial number of request.
268     *
269     * Response function is IRadioResponse.getSignalStrengthResponse()
270     */
271    oneway getSignalStrength(int32_t serial);
272
273    /**
274     * Request current voice registration state
275     *
276     * @param serial Serial number of request.
277     *
278     * Response function is IRadioResponse.getVoiceRegistrationStateResponse()
279     */
280    oneway getVoiceRegistrationState(int32_t serial);
281
282    /**
283     * Request current data registration state
284     *
285     * @param serial Serial number of request.
286     *
287     * Response function is IRadioResponse.getDataRegistrationStateResponse()
288     */
289    oneway getDataRegistrationState(int32_t serial);
290
291    /**
292     * Request current operator ONS or EONS
293     *
294     * @param serial Serial number of request.
295     *
296     * Response function is IRadioResponse.getOperatorResponse()
297     */
298    oneway getOperator(int32_t serial);
299
300    /**
301     * Toggle radio on and off (for "airplane" mode)
302     * If the radio is turned off/on the radio modem subsystem
303     * is expected return to an initialized state. For instance,
304     * any voice and data calls must be terminated and all associated
305     * lists emptied.
306     *
307     * @param serial Serial number of request.
308     * @param on To turn on radio -> on = true, to turn off radio -> on = false.
309     *
310     * Response function is IRadioResponse.setRadioPowerResponse()
311     */
312    oneway setRadioPower(int32_t serial, bool on);
313
314    /**
315     * Send a DTMF tone
316     *
317     * If the implementation is currently playing a tone requested via
318     * startDtmf(), that tone must be cancelled and the new tone
319     * must be played instead
320     *
321     * @param serial Serial number of request.
322     * @param s string with single char having one of 12 values: 0-9, *, #
323     *
324     * Response function is IRadioResponse.sendDtmfResponse()
325     */
326    oneway sendDtmf(int32_t serial, string s);
327
328    /**
329     * Send an SMS message
330     *
331     * @param serial Serial number of request.
332     * @param message GsmSmsMessage as defined in types.hal
333     *
334     * Response function is IRadioResponse.sendSmsResponse()
335     *
336     * Based on the return error, caller decides to resend if sending sms
337     * fails. RadioError:SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
338     * and RadioError:GENERIC_FAILURE means no retry (i.e. error cause is 500)
339     */
340    oneway sendSms(int32_t serial, GsmSmsMessage message);
341
342    /**
343     * Send an SMS message. Identical to sendSms,
344     * except that more messages are expected to be sent soon. If possible,
345     * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
346     *
347     * @param serial Serial number of request.
348     * @param message GsmSmsMessage as defined in types.hal
349     *
350     * Response function is IRadioResponse.sendSMSExpectMoreResponse()
351     *
352     * Based on the return error, caller decides to resend if sending sms
353     * fails. RadioError:SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
354     * and RadioError:GENERIC_FAILURE means no retry (i.e. error cause is 500)
355     */
356    oneway sendSMSExpectMore(int32_t serial, GsmSmsMessage message);
357
358    /**
359     * Setup a packet data connection. If DataCallResponse.status
360     * return DataCallFailCause:NONE it is added to the list of data calls and a
361     * unsolDataCallListChanged() is sent. The call remains in the
362     * list until deactivateDataCall() is issued or the
363     * radio is powered off/on. This list is returned by getDataCallList()
364     * and dataCallListChanged().
365     *
366     * The Radio is expected to:
367     *  - Create one data call context.
368     *  - Create and configure a dedicated interface for the context
369     *  - The interface must be point to point.
370     *  - The interface is configured with one or more addresses and
371     *    is capable of sending and receiving packets. The prefix length
372     *    of the addresses must be /32 for IPv4 and /128 for IPv6.
373     *  - Must NOT change the linux routing table.
374     *  - Support up to getDataRegistrationState response[5]
375     *    number of simultaneous data call contexts.
376     *
377     * @param serial Serial number of request.
378     * @param radioTechnology Radio technology to use.
379     * @param dataProfileInfo data profile info.
380     * @param modemCognitive Indicating this profile was sent to the modem through setDataProfile
381     *                       earlier.
382     * @param roamingAllowed Indicating data roaming is allowed or not by the user.
383     * @param isRoaming Indicating the device is roaming or not. The 'protocol' parameter in the old
384     *                  RIL API must be filled accordingly based on the roaming condition.
385     *                  Note this is for backward compatibility with the old radio modem. The modem
386     *                  must not use this param for any other reason.
387     *
388     * Response function is IRadioResponse.setupDataCallResponse() which may return
389     * RadioError:REQUEST_NOT_SUPPORTED if @1.2::IRadio or higher is supported.
390     *
391     * DEPRECATED in @1.2 or higher, use @1.2::IRadio.setupDataCall_1_2() instead.
392     */
393    oneway setupDataCall(int32_t serial, RadioTechnology radioTechnology,
394            DataProfileInfo dataProfileInfo, bool modemCognitive, bool roamingAllowed,
395            bool isRoaming);
396
397    /**
398     * Request ICC I/O operation.
399     * This is similar to the TS 27.007 "restricted SIM" operation
400     * where it assumes all of the EF selection must be done by the
401     * callee
402     *
403     * Arguments and responses that are unused for certain
404     * values of "command" must be ignored or set to empty string
405     *
406     * @param serial Serial number of request.
407     * @param iccIo IccIo
408     *
409     * Please note that IccIo has a "PIN2" field which may be empty string,
410     * or may specify a PIN2 for operations that require a PIN2 (eg
411     * updating FDN records)
412     *
413     * Response function is IRadioResponse.iccIOForAppResponse()
414     */
415    oneway iccIOForApp(int32_t serial, IccIo iccIo);
416
417    /**
418     * Send a USSD message.
419     *
420     * If a USSD session already exists, the message must be sent in the
421     * context of that session. Otherwise, a new session must be created.
422     *
423     * The network reply must be reported via unsolOnUssd
424     *
425     * Only one USSD session must exist at a time, and the session is assumed
426     * to exist until:
427     * a) The android system invokes cancelUssd()
428     * b) The implementation sends a unsolOnUssd() with a type code
429     * of "0" (USSD-Notify/no further action) or "2" (session terminated)
430     *
431     * @param serial Serial number of request.
432     * @param ussd string containing the USSD request in UTF-8 format
433     *
434     * Response function is IRadioResponse.sendUssdResponse()
435     *
436     * See also requestCancelUssd, unsolOnUssd
437     */
438    oneway sendUssd(int32_t serial, string ussd);
439
440    /**
441     * Cancel the current USSD session if one exists.
442     *
443     * @param serial Serial number of request.
444     *
445     * Response function is IRadioResponse.cancelPendingUssdResponse()
446     */
447    oneway cancelPendingUssd(int32_t serial);
448
449    /**
450     * Gets current CLIR status
451     *
452     * @param serial Serial number of request.
453     *
454     * Response function is IRadioResponse.getClirResponse()
455     */
456    oneway getClir(int32_t serial);
457
458    /**
459     * Set current CLIR status
460     *
461     * @param serial Serial number of request.
462     * @param status "n" parameter from TS 27.007 7.7
463     *
464     * Response function is IRadioResponse.setClirResponse()
465     */
466    oneway setClir(int32_t serial, int32_t status);
467
468    /**
469     * Request call forward status.
470     *
471     * @param serial Serial number of request.
472     * @param callInfo CallForwardInfo
473     *
474     * Response function is IRadioResponse.getCallForwardStatusResponse()
475     */
476    oneway getCallForwardStatus(int32_t serial,
477            CallForwardInfo callInfo);
478
479    /**
480     * Configure call forward rule
481     *
482     * @param serial Serial number of request.
483     * @param callInfo CallForwardInfo
484     *
485     * Response function is IRadioResponse.setCallForwardResponse()
486     */
487    oneway setCallForward(int32_t serial, CallForwardInfo callInfo);
488
489    /**
490     * Query current call waiting state
491     *
492     * @param serial Serial number of request.
493     * @param serviceClass Service class is the TS 27.007 service class to query
494     *
495     * Response function is IRadioResponse.getCallWaitingResponse()
496     */
497    oneway getCallWaiting(int32_t serial, int32_t serviceClass);
498
499    /**
500     * Configure current call waiting state
501     *
502     * @param serial Serial number of request.
503     * @param enable is false for "disabled" and true for "enabled"
504     * @param serviceClass is the TS 27.007 service class bit vector of services to modify
505     *
506     * Response function is IRadioResponse.setCallWaitingResponse()
507     */
508    oneway setCallWaiting(int32_t serial, bool enable,
509            int32_t serviceClass);
510
511    /**
512     * Acknowledge successful or failed receipt of SMS previously indicated
513     * via unsolResponseNewSms
514     *
515     * @param serial Serial number of request.
516     * @param success is true on successful receipt
517     *        (basically, AT+CNMA=1 from TS 27.005 is 0 on failed receipt
518     *        (basically, AT+CNMA=2 from TS 27.005)
519     * @param cause: if success is false, this contains the failure cause as defined
520     *        in TS 23.040, 9.2.3.22.
521     *
522     * Response function is IRadioResponse.acknowledgeLastIncomingGsmSmsResponse()
523     */
524    oneway acknowledgeLastIncomingGsmSms(int32_t serial, bool success,
525            SmsAcknowledgeFailCause cause);
526
527    /**
528     * Answer incoming call
529     * Must not be called for WAITING calls.
530     * switchWaitingOrHoldingAndActive() must be used in this case
531     * instead
532     *
533     * @param serial Serial number of request.
534     *
535     * Response function is IRadioResponse.acceptCallResponse()
536     */
537    oneway acceptCall(int32_t serial);
538
539    /**
540     * Deactivate packet data connection and remove from the
541     * data call list if RadioError:NONE is returned. Any other return
542     * values must also try to remove the call from the list. An
543     * unsolDataCallListChanged must be
544     * issued because of an deactivateDataCall.
545     *
546     * @param serial Serial number of request.
547     * @param cid Indicates CID
548     * @param reasonRadioShutDown Indicates Disconnect Reason
549     *        false => No specific reason specified
550     *        true => Radio shutdown requested
551     *
552     * Response function is IRadioResponse.deactivateDataCallResponse() which may return
553     * RadioError:REQUEST_NOT_SUPPORTED if @1.2::IRadio or higher is supported.
554     *
555     * DEPRECATED in @1.2 or higher, use @1.2::IRadio.deactivateDataCall_1_2() instead.
556     */
557    oneway deactivateDataCall(int32_t serial, int32_t cid,
558            bool reasonRadioShutDown);
559
560    /**
561     * Query the status of a facility lock state
562     *
563     * @param serial Serial number of request.
564     * @param facility is the facility string code from TS 27.007 7.4
565     *        (eg "AO" for BAOC, "SC" for SIM lock)
566     * @param password is the password, or "" if not required
567     * @param serviceClass is the TS 27.007 service class bit vector of services to query
568     * @param appId is AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
569     *        This is only applicable in the case of Fixed Dialing Numbers (FDN) requests.
570     *
571     * Response function is IRadioResponse.getFacilityLockForAppResponse()
572     */
573    oneway getFacilityLockForApp(int32_t serial, string facility,
574            string password, int32_t serviceClass, string appId);
575
576    /**
577     * Enable/disable one facility lock
578     *
579     * @param serial Serial number of request.
580     * @param facility is the facility string code from TS 27.007 7.4 (eg "AO" for BAOC)
581     * @param lockState false for "unlock" and true for "lock"
582     * @param password is the password
583     * @param serviceClass is string representation of decimal TS 27.007
584     *        service class bit vector. Eg, the string
585     *        "1" means "set this facility for voice services"
586     * @param appId is AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
587     *        This is only applicable in the case of Fixed Dialing Numbers (FDN) requests.
588     *
589     * Response function is IRadioResponse.setFacilityLockForAppResponse()
590     */
591    oneway setFacilityLockForApp(int32_t serial, string facility, bool lockState,
592            string password, int32_t serviceClass, string appId);
593
594    /**
595     * Change call barring facility password
596     *
597     * @param serial Serial number of request.
598     * @param facility facility string code from TS 27.007 7.4 (eg "AO" for BAOC)
599     * @param oldPassword old password
600     * @param newPassword new password
601     *
602     * Response function is IRadioResponse.setBarringPasswordResponse()
603     */
604    oneway setBarringPassword(int32_t serial, string facility,
605            string oldPassword, string newPassword);
606
607    /**
608     * Query current network selection mode
609     *
610     * @param serial Serial number of request.
611     *
612     * Response function is IRadioResponse.getNetworkSelectionModeResponse()
613     */
614    oneway getNetworkSelectionMode(int32_t serial);
615
616    /**
617     * Specify that the network must be selected automatically.
618     * This request must not respond until the new operator is selected and registered.
619     *
620     * @param serial Serial number of request.
621     *
622     * Response function is IRadioResponse.setNetworkSelectionModeAutomaticResponse()
623     */
624    oneway setNetworkSelectionModeAutomatic(int32_t serial);
625
626    /**
627     * Manually select a specified network.
628     * This request must not respond until the new operator is selected and registered.
629     *
630     * @param serial Serial number of request.
631     * @param operatorNumeric string specifying MCCMNC of network to select (eg "310170")
632     *
633     * Response function is IRadioResponse.setNetworkSelectionModeManualResponse()
634     */
635    oneway setNetworkSelectionModeManual(int32_t serial, string operatorNumeric);
636
637    /**
638     * Scans for available networks
639     *
640     * @param serial Serial number of request.
641     *
642     * Response function is IRadioResponse.getAvailableNetworksResponse()
643     */
644    oneway getAvailableNetworks(int32_t serial);
645
646    /**
647     * Start playing a DTMF tone. Continue playing DTMF tone until
648     * stopDtmf is received.
649     * If a startDtmf() is received while a tone is currently playing,
650     * it must cancel the previous tone and play the new one.
651     *
652     * @param serial Serial number of request.
653     * @param s string having a single character with one of 12 values: 0-9,*,#
654     *
655     * Response function is IRadioResponse.startDtmfResponse()
656     */
657    oneway startDtmf(int32_t serial, string s);
658
659    /**
660     * Stop playing a currently playing DTMF tone.
661     *
662     * @param serial Serial number of request.
663     *
664     * Response function is IRadioResponse.stopDtmfResponse()
665     */
666    oneway stopDtmf(int32_t serial);
667
668    /**
669     * Return string value indicating baseband version, eg response from AT+CGMR
670     *
671     * @param serial Serial number of request.
672     *
673     * Response function is IRadioResponse.getBasebandVersionResponse()
674     */
675    oneway getBasebandVersion(int32_t serial);
676
677    /**
678     * Separate a party from a multiparty call placing the multiparty call
679     * (less the specified party) on hold and leaving the specified party
680     * as the only other member of the current (active) call
681     *
682     * Like AT+CHLD=2x
683     *
684     * See TS 22.084 1.3.8.2 (iii)
685     * TS 22.030 6.5.5 "Entering "2X followed by send"
686     * TS 27.007 "AT+CHLD=2x"
687     *
688     * @param serial Serial number of request.
689     * @param gsmIndex contains Connection index (value of 'x' in CHLD above)
690     *
691     * Response function is IRadioResponse.separateConnectionResponse()
692     */
693    oneway separateConnection(int32_t serial, int32_t gsmIndex);
694
695    /**
696     * Turn on or off uplink (microphone) mute.
697     * Must only be sent while voice call is active.
698     * Must always be reset to "disable mute" when a new voice call is initiated
699     *
700     * @param serial Serial number of request.
701     * @param enable true for "enable mute" and false for "disable mute"
702     *
703     * Response function is IRadioResponse.setMuteResponse()
704     */
705    oneway setMute(int32_t serial, bool enable);
706
707    /**
708     * Queries the current state of the uplink mute setting
709     *
710     * @param serial Serial number of request.
711     *
712     * Response function is IRadioResponse.getMuteResponse()
713     */
714    oneway getMute(int32_t serial);
715
716    /**
717     * Queries the status of the CLIP supplementary service
718     * (for MMI code "*#30#")
719     *
720     * @param serial Serial number of request.
721     *
722     * Response function is IRadioResponse.getClipResponse()
723     */
724    oneway getClip(int32_t serial);
725
726    /**
727     * Returns the data call list. An entry is added when a
728     * setupDataCall() is issued and removed on a
729     * deactivateDataCall(). The list is emptied when
730     * setRadioPower() off/on is issued.
731     *
732     * @param serial Serial number of request.
733     *
734     * Response function is IRadioResponse.getDataCallListResponse()
735     */
736    oneway getDataCallList(int32_t serial);
737
738    /**
739     * Enables/disables supplementary service related notifications from the network.
740     * Notifications are reported via unsolSuppSvcNotification().
741     *
742     * @param serial Serial number of request.
743     * @param enable true = notifications enabled, false = notifications disabled.
744     *
745     * Response function is IRadioResponse.setSuppServiceNotificationsResponse()
746     */
747    oneway setSuppServiceNotifications(int32_t serial, bool enable);
748
749    /**
750     * Stores a SMS message to SIM memory.
751     *
752     * @param serial Serial number of request.
753     * @param smsWriteArgs SmsWriteArgs defined in types.hal
754     *
755     * Response function is IRadioResponse.writeSmsToSimResponse()
756     */
757    oneway writeSmsToSim(int32_t serial, SmsWriteArgs smsWriteArgs);
758
759    /**
760     * Deletes a SMS message from SIM memory.
761     *
762     * @param serial Serial number of request.
763     * @param index Record index of the message to delete.
764     *
765     * Response function is IRadioResponse.deleteSmsOnSimResponse()
766     */
767    oneway deleteSmsOnSim(int32_t serial, int32_t index);
768
769    /**
770     * Assign a specified band for RF configuration.
771     *
772     * @param serial Serial number of request.
773     * @param mode RadioBandMode defined in types.hal
774     *
775     * Response function is IRadioResponse.setBandModeResponse()
776     */
777    oneway setBandMode(int32_t serial, RadioBandMode mode);
778
779    /**
780     * Get the list of band modes supported by RF.
781     *
782     * @param serial Serial number of request.
783     *
784     * Response function is IRadioResponse.getAvailableBandModesResponse()
785     */
786    oneway getAvailableBandModes(int32_t serial);
787
788    /**
789     * Requests to send a SAT/USAT envelope command to SIM.
790     * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
791     *
792     * @param serial Serial number of request.
793     * @param command SAT/USAT command in hexadecimal format string starting with command tag
794     *
795     * Response function is IRadioResponse.sendEnvelopeResponse()
796     */
797    oneway sendEnvelope(int32_t serial, string command);
798
799    /**
800     * Requests to send a terminal response to SIM for a received proactive command
801     *
802     * @param serial Serial number of request.
803     * @param commandResponse SAT/USAT response in hexadecimal format string starting with
804     *        first byte of response data
805     *
806     * Response function is IRadioResponse.sendTerminalResponseResponseToSim()
807     */
808    oneway sendTerminalResponseToSim(int32_t serial, string commandResponse);
809
810    /**
811     * When STK application gets stkCallSetup(), the call actually has
812     * been initialized by mobile device already. (We could see the call has been in the 'call
813     * list') So, STK application needs to accept/reject the call according to user
814     * operations.
815     *
816     * @param serial Serial number of request.
817     * @param accept true = accept the call setup, false = reject the call setup
818     *
819     * Response callback is IRadioResponse.handleStkCallSetupRequestFromSimResponse()
820     */
821    oneway handleStkCallSetupRequestFromSim(int32_t serial,
822            bool accept);
823
824    /**
825     * Connects the two calls and disconnects the subscriber from both calls.
826     *
827     * @param serial Serial number of request.
828     *
829     * Response callback is IRadioResponse.explicitCallTransferResponse()
830     */
831    oneway explicitCallTransfer(int32_t serial);
832
833    /**
834     * Requests to set the preferred network type for searching and registering
835     * (CS/PS domain, RAT, and operation mode)
836     *
837     * @param serial Serial number of request.
838     * @param nwType PreferredNetworkType defined in types.hal
839     *
840     * Response callback is IRadioResponse.setPreferredNetworkTypeResponse()
841     */
842    oneway setPreferredNetworkType(int32_t serial,
843            PreferredNetworkType nwType);
844
845    /**
846     * Query the preferred network type (CS/PS domain, RAT, and operation mode)
847     * for searching and registering
848     *
849     * @param serial Serial number of request.
850     *
851     * Response callback is IRadioResponse.getPreferredNetworkTypeResponse()
852     */
853    oneway getPreferredNetworkType(int32_t serial);
854
855    /**
856     * Request neighboring cell id in GSM network
857     *
858     * @param serial Serial number of request.
859     *
860     * Response callback is IRadioResponse.getNeighboringCidsResponse()
861     */
862    oneway getNeighboringCids(int32_t serial);
863
864    /**
865     * Enables/disables network state change notifications due to changes in
866     * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
867     * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
868     * Note:  The Radio implementation must default to "updates enabled"
869     * when the screen is on and "updates disabled" when the screen is off.
870     *
871     * @param serial Serial number of request.
872     * @param enable true = updates enabled (+CREG=2), false = updates disabled (+CREG=1)
873     *
874     * Response callback is IRadioResponse.setLocationUpdatesResponse()
875     */
876    oneway setLocationUpdates(int32_t serial, bool enable);
877
878    /**
879     * Request to set the location where the CDMA subscription shall
880     * be retrieved
881     *
882     * @param serial Serial number of request.
883     * @param cdmaSub CdmaSubscriptionSource
884     *
885     * Response callback is IRadioResponse.setCdmaSubscriptionSourceResponse()
886     */
887    oneway setCdmaSubscriptionSource(int32_t serial,
888            CdmaSubscriptionSource cdmaSub);
889
890    /**
891     * Request to set the roaming preferences in CDMA
892     *
893     * @param serial Serial number of request.
894     * @param type CdmaRoamingType defined in types.hal
895     *
896     * Response callback is IRadioResponse.setCdmaRoamingPreferenceResponse()
897     */
898    oneway setCdmaRoamingPreference(int32_t serial,
899            CdmaRoamingType type);
900
901    /**
902     * Request the actual setting of the roaming preferences in CDMA in the modem
903     *
904     * @param serial Serial number of request.
905     *
906     * Response callback is IRadioResponse.getCdmaRoamingPreferenceResponse()
907     */
908    oneway getCdmaRoamingPreference(int32_t serial);
909
910    /**
911     * Request to set the TTY mode
912     *
913     * @param serial Serial number of request.
914     * @param mode TtyMode
915     *
916     * Response callback is IRadioResponse.setTTYModeResponse()
917     */
918    oneway setTTYMode(int32_t serial, TtyMode mode);
919
920    /**
921     * Request the setting of TTY mode
922     *
923     * @param serial Serial number of request.
924     *
925     * Response callback is IRadioResponse.getTTYModeResponse()
926     */
927    oneway getTTYMode(int32_t serial);
928
929    /**
930     * Request to set the preferred voice privacy mode used in voice scrambling.
931     *
932     * @param serial Serial number of request.
933     * @param enable false for Standard Privacy Mode (Public Long Code Mask)
934     *        true for Enhanced Privacy Mode (Private Long Code Mask)
935     *
936     * Response callback is IRadioResponse.setPreferredVoicePrivacyResponse()
937     */
938    oneway setPreferredVoicePrivacy(int32_t serial, bool enable);
939
940    /**
941     * Request the setting of preferred voice privacy mode.
942     *
943     * @param serial Serial number of request.
944     *
945     * Response callback is IRadioResponse.getPreferredVoicePrivacyResponse()
946     */
947    oneway getPreferredVoicePrivacy(int32_t serial);
948
949    /**
950     * Send FLASH command
951     *
952     * @param serial Serial number of request.
953     * @param featureCode String associated with Flash command
954     *
955     * Response callback is IRadioResponse.sendCDMAFeatureCodeResponse()
956     */
957    oneway sendCDMAFeatureCode(int32_t serial, string featureCode);
958
959    /**
960     * Send DTMF string
961     *
962     * @param serial Serial number of request.
963     * @param dtmf DTMF string
964     * @param on DTMF ON length in milliseconds, or 0 to use default
965     * @param off is the DTMF OFF length in milliseconds, or 0 to use default
966     *
967     * Response callback is IRadioResponse.sendBurstDtmfResponse()
968     */
969    oneway sendBurstDtmf(int32_t serial, string dtmf, int32_t on, int32_t off);
970
971    /**
972     * Send a CDMA SMS message
973     *
974     * @param serial Serial number of request.
975     * @param sms Cdma Sms to be sent described by CdmaSmsMessage in types.hal
976     *
977     * Response callback is IRadioResponse.sendCdmaSmsResponse()
978     */
979    oneway sendCdmaSms(int32_t serial, CdmaSmsMessage sms);
980
981    /**
982     * Acknowledge the success or failure in the receipt of SMS
983     * previously indicated via responseCdmaNewSms()
984     *
985     * @param serial Serial number of request.
986     * @param smsAck Cdma Sms ack to be sent described by CdmaSmsAck in types.hal
987     *
988     * Response callback is IRadioResponse.acknowledgeLastIncomingCdmaSmsResponse()
989     */
990    oneway acknowledgeLastIncomingCdmaSms(int32_t serial, CdmaSmsAck smsAck);
991
992    /**
993     * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
994     *
995     * @param serial Serial number of request.
996     *
997     * Response callback is IRadioResponse.getGsmBroadcastConfigResponse()
998     */
999    oneway getGsmBroadcastConfig(int32_t serial);
1000
1001    /**
1002     * Set GSM/WCDMA Cell Broadcast SMS config
1003     *
1004     * @param serial Serial number of request.
1005     * @param configInfo Setting of GSM/WCDMA Cell broadcast config
1006     *
1007     * Response callback is IRadioResponse.setGsmBroadcastConfigResponse()
1008     */
1009    oneway setGsmBroadcastConfig(int32_t serial, vec<GsmBroadcastSmsConfigInfo> configInfo);
1010
1011    /**
1012     * Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
1013     *
1014     * @param serial Serial number of request.
1015     * @param activate indicates to activate or turn off the reception of GSM/WCDMA
1016     *        Cell Broadcast SMS. true = activate, false = turn off
1017     *
1018     * Response callback is IRadioResponse.setGsmBroadcastActivationResponse()
1019     */
1020    oneway setGsmBroadcastActivation(int32_t serial, bool activate);
1021
1022    /**
1023     * Request the setting of CDMA Broadcast SMS config
1024     *
1025     * @param serial Serial number of request.
1026     *
1027     * Response callback is IRadioResponse.getCdmaBroadcastConfigResponse()
1028     */
1029    oneway getCdmaBroadcastConfig(int32_t serial);
1030
1031    /**
1032     * Set CDMA Broadcast SMS config
1033     *
1034     * @param serial Serial number of request.
1035     * @param configInfo CDMA Broadcast SMS config to be set.
1036     *
1037     * Response callback is IRadioResponse.setCdmaBroadcastConfigResponse()
1038     */
1039    oneway setCdmaBroadcastConfig(int32_t serial, vec<CdmaBroadcastSmsConfigInfo> configInfo);
1040
1041    /**
1042     * Enable or disable the reception of CDMA Cell Broadcast SMS
1043     *
1044     * @param serial Serial number of request.
1045     * @param activate indicates to activate or turn off the reception of CDMA
1046     *        Cell Broadcast SMS. true = activate, false = turn off
1047     *
1048     * Response callback is IRadioResponse.setCdmaBroadcastActivationResponse()
1049     */
1050    oneway setCdmaBroadcastActivation(int32_t serial, bool activate);
1051
1052    /**
1053     * Request the device MDN / H_SID / H_NID.
1054     * The request is only allowed when CDMA subscription is available. When CDMA
1055     * subscription is changed, application layer must re-issue the request to
1056     * update the subscription information.
1057     *
1058     * @param serial Serial number of request.
1059     *
1060     * Response callback is IRadioResponse.getCDMASubscriptionResponse()
1061     */
1062    oneway getCDMASubscription(int32_t serial);
1063
1064    /**
1065     * Stores a CDMA SMS message to RUIM memory.
1066     *
1067     * @param serial Serial number of request.
1068     * @param cdmaSms CDMA message as defined by CdmaSmsWriteArgs in types.hal
1069     *
1070     * Response callback is IRadioResponse.writeSmsToRuimResponse()
1071     */
1072    oneway writeSmsToRuim(int32_t serial, CdmaSmsWriteArgs cdmaSms);
1073
1074    /**
1075     * Deletes a CDMA SMS message from RUIM memory.
1076     *
1077     * @param serial Serial number of request.
1078     * @param index record index of the message to delete
1079     *
1080     * Response callback is IRadioResponse.deleteSmsOnRuimResponse()
1081     */
1082    oneway deleteSmsOnRuim(int32_t serial, int32_t index);
1083
1084    /**
1085     * Request the device ESN / MEID / IMEI / IMEISV.
1086     * The request is always allowed and contains GSM and CDMA device identity.
1087     * When CDMA subscription is changed the ESN/MEID changes. The application
1088     * layer must re-issue the request to update the device identity in this case.
1089     *
1090     * @param serial Serial number of request.
1091     *
1092     * Response callback is IRadioResponse.getDeviceIdentityResponse()
1093     */
1094    oneway getDeviceIdentity(int32_t serial);
1095
1096    /**
1097     * Request the radio's system selection module to exit emergency
1098     * callback mode. Radio must not respond with SUCCESS until the modem has
1099     * completely exited from Emergency Callback Mode.
1100     *
1101     * @param serial Serial number of request.
1102     *
1103     * Response callback is IRadioResponse.exitEmergencyCallbackModeResponse()
1104     */
1105    oneway exitEmergencyCallbackMode(int32_t serial);
1106
1107    /**
1108     * Get the default Short Message Service Center address on the device.
1109     *
1110     * @param serial Serial number of request.
1111     *
1112     * Response callback is IRadioResponse.getSmscAddressResponse()
1113     */
1114    oneway getSmscAddress(int32_t serial);
1115
1116    /**
1117     * Set the default Short Message Service Center address on the device.
1118     *
1119     * @param serial Serial number of request.
1120     * @param smsc Short Message Service Center address to set
1121     *
1122     * Response callback is IRadioResponse.setSmscAddressResponse()
1123     */
1124    oneway setSmscAddress(int32_t serial, string smsc);
1125
1126    /**
1127     * Indicates whether there is storage available for new SMS messages.
1128     *
1129     * @param serial Serial number of request.
1130     * @param available true if memory is available for storing new messages,
1131     *        false if memory capacity is exceeded
1132     *
1133     * Response callback is IRadioResponse.reportSmsMemoryStatusResponse()
1134     */
1135    oneway reportSmsMemoryStatus(int32_t serial, bool available);
1136
1137    /**
1138     * Indicates that the StkService is running and is
1139     * ready to receive unsolicited stkXXXXX commands.
1140     *
1141     * @param serial Serial number of request.
1142     *
1143     * Response callback is IRadioResponse.reportStkServiceIsRunningResponse()
1144     */
1145    oneway reportStkServiceIsRunning(int32_t serial);
1146
1147    /**
1148     * Request to query the location where the CDMA subscription shall be retrieved.
1149     *
1150     * @param serial Serial number of request.
1151     *
1152     * Response callback is IRadioResponse.getCdmaSubscriptionSourceResponse()
1153     */
1154    oneway getCdmaSubscriptionSource(int32_t serial);
1155
1156    /**
1157     * Request the ISIM application on the UICC to perform AKA
1158     * challenge/response algorithm for IMS authentication
1159     *
1160     * @param serial Serial number of request.
1161     * @param challenge challenge string in Base64 format
1162     *
1163     * Response callback is IRadioResponse.requestIsimAuthenticationResponse()
1164     */
1165    oneway requestIsimAuthentication(int32_t serial, string challenge);
1166
1167    /**
1168     * Acknowledge successful or failed receipt of SMS previously indicated
1169     * via unsol responseNewSms(), including acknowledgement TPDU to send
1170     * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
1171     *
1172     * @param serial Serial number of request.
1173     * @param success true on successful receipt (send RP-ACK)
1174     *        false on failed receipt (send RP-ERROR)
1175     * @param ackPdu acknowledgement TPDU in hexadecimal format
1176     *
1177     * Response callback is IRadioResponse.acknowledgeIncomingGsmSmsWithPduResponse()
1178     */
1179    oneway acknowledgeIncomingGsmSmsWithPdu(int32_t serial, bool success, string ackPdu);
1180
1181    /**
1182     * Requests to send a SAT/USAT envelope command to SIM.
1183     * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
1184     *
1185     * This request has one difference from sendEnvelope():
1186     * the SW1 and SW2 status bytes from the UICC response are returned along with
1187     * the response data, using the same structure as iccIOForApp().
1188     *
1189     * The implementation must perform normal processing of a '91XX'
1190     * response in SW1/SW2 to retrieve the pending proactive command and send it
1191     * as an unsolicited response, as sendEnvelope() does.
1192     *
1193     * @param serial Serial number of request.
1194     * @param contents SAT/USAT command in hexadecimal format starting with command tag
1195     *
1196     * Response callback is IRadioResponse.sendEnvelopeWithStatusResponse()
1197     */
1198    oneway sendEnvelopeWithStatus(int32_t serial, string contents);
1199
1200    /**
1201     * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
1202     * when radio state is not RADIO_STATE_UNAVAILABLE
1203     *
1204     * @param serial Serial number of request.
1205     *
1206     * Response callback is IRadioResponse.getVoiceRadioTechnologyResponse()
1207     */
1208    oneway getVoiceRadioTechnology(int32_t serial);
1209
1210    /**
1211     * Request all of the current cell information known to the radio. The radio
1212     * must return list of all current cells, including the neighboring cells. If for a particular
1213     * cell information isn't known then the appropriate unknown value will be returned.
1214     * This does not cause or change the rate of unsolicited cellInfoList().
1215     *
1216     * @param serial Serial number of request.
1217     *
1218     * Response callback is IRadioResponse.getCellInfoListResponse()
1219     */
1220    oneway getCellInfoList(int32_t serial);
1221
1222    /**
1223     * Sets the minimum time between when unsolicited cellInfoList() must be invoked.
1224     * A value of 0, means invoke cellInfoList() when any of the reported
1225     * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
1226     * a unsolicited cellInfoList().
1227     *
1228     * @param serial Serial number of request.
1229     * @param rate minimum time in milliseconds to indicate time between unsolicited cellInfoList()
1230     *
1231     * Response callback is IRadioResponse.setCellInfoListRateResponse()
1232     */
1233    oneway setCellInfoListRate(int32_t serial, int32_t rate);
1234
1235    /**
1236     * Set an apn to initial attach network
1237     *
1238     * @param serial Serial number of request.
1239     * @param dataProfileInfo data profile containing APN settings
1240     * @param modemCognitive indicating the data profile was sent to the modem through
1241     *                       setDataProfile earlier.
1242     * @param isRoaming Indicating the device is roaming or not. The 'protocol' parameter in the old
1243     *                  RIL_InitialAttachApn must be filled accordingly based on the roaming
1244     *                  condition. Note this is for backward compatibility with the old radio modem.
1245     *                  The modem must not use this param for any other reason.
1246     *
1247     * Response callback is IRadioResponse.setInitialAttachApnResponse()
1248     */
1249    oneway setInitialAttachApn(int32_t serial, DataProfileInfo dataProfileInfo,
1250            bool modemCognitive, bool isRoaming);
1251
1252    /**
1253     * Request current IMS registration state
1254     *
1255     * @param serial Serial number of request.
1256     *
1257     * Response callback is IRadioResponse.getImsRegistrationStateResponse()
1258     */
1259    oneway getImsRegistrationState(int32_t serial);
1260
1261    /**
1262     * Send a SMS message over IMS.
1263     * Based on the return error, caller decides to resend if sending sms
1264     * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
1265     * In case of retry, data is encoded based on Voice Technology available.
1266     *
1267     * @param serial Serial number of request.
1268     * @param message ImsSmsMessage as defined in types.hal to be sent
1269     *
1270     * Response callback is IRadioResponse.sendImsSmsResponse()
1271     */
1272    oneway sendImsSms(int32_t serial, ImsSmsMessage message);
1273
1274    /**
1275     * Request APDU exchange on the basic channel. This command reflects TS 27.007
1276     * "generic SIM access" operation (+CSIM). The modem must ensure proper function
1277     * of GSM/CDMA, and filter commands appropriately. It must filter
1278     * channel management and SELECT by DF name commands.
1279     * "sessionid" field must be ignored.
1280     *
1281     * @param serial Serial number of request.
1282     * @param message SimApdu as defined in types.hal to be sent
1283     *
1284     * Response callback is IRadioResponse.iccTransmitApduBasicChannelResponse()
1285     */
1286    oneway iccTransmitApduBasicChannel(int32_t serial, SimApdu message);
1287
1288    /**
1289     * Open a new logical channel and select the given application. This command
1290     * reflects TS 27.007 "open logical channel" operation (+CCHO).
1291     *
1292     * @param serial Serial number of request.
1293     * @param aid AID value, See ETSI 102.221 and 101.220.
1294     * @param p2 P2 value, described in ISO 7816-4. Ignore if equal to P2Constant:NO_P2
1295     *
1296     * Response callback is IRadioResponse.iccOpenLogicalChannelResponse()
1297     */
1298    oneway iccOpenLogicalChannel(int32_t serial, string aid, int32_t p2);
1299
1300    /**
1301     * Close a previously opened logical channel. This command reflects TS 27.007
1302     * "close logical channel" operation (+CCHC).
1303     *
1304     * @param serial Serial number of request.
1305     * @param channelId session id of the logical channel (+CCHC).
1306     *
1307     * Response callback is IRadioResponse.iccCloseLogicalChannelResponse()
1308     */
1309    oneway iccCloseLogicalChannel(int32_t serial, int32_t channelId);
1310
1311    /**
1312     * Exchange APDUs with a UICC over a previously opened logical channel. This
1313     * command reflects TS 27.007 "generic logical channel access" operation
1314     * (+CGLA). The modem must filter channel management and SELECT by DF name
1315     * commands.
1316     *
1317     * @param serial Serial number of request.
1318     * @param message SimApdu as defined in types.hal to be sent
1319     *
1320     * Response callback is IRadioResponse.iccTransmitApduLogicalChannelResponse()
1321     */
1322    oneway iccTransmitApduLogicalChannel(int32_t serial, SimApdu message);
1323
1324    /**
1325     * Read one of the radio NV items.
1326     * This is used for device configuration by some CDMA operators.
1327     *
1328     * @param serial Serial number of request.
1329     * @param itemId NvItem is radio NV item as defined in types.hal
1330     *
1331     * Response callback is IRadioResponse.nvReadItemResponse()
1332     */
1333    oneway nvReadItem(int32_t serial, NvItem itemId);
1334
1335    /**
1336     * Write one of the radio NV items.
1337     * This is used for device configuration by some CDMA operators.
1338     *
1339     * @param serial Serial number of request.
1340     * @param item NvWriteItem as defined in types.hal
1341     *
1342     * Response callback is IRadioResponse.nvWriteItemResponse()
1343     */
1344    oneway nvWriteItem(int32_t serial, NvWriteItem item);
1345
1346    /**
1347     * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
1348     * This is used for device configuration by some CDMA operators.
1349     *
1350     * @param serial Serial number of request.
1351     * @param prl PRL as a byte array
1352     *
1353     * Response callback is IRadioResponse.nvWriteCdmaPrlResponse()
1354     */
1355    oneway nvWriteCdmaPrl(int32_t serial, vec<uint8_t> prl);
1356
1357    /**
1358     * Reset the radio NV configuration to the factory state.
1359     * This is used for device configuration by some CDMA operators.
1360     *
1361     * @param serial Serial number of request.
1362     * @param resetType ResetNvType as defined in types.hal
1363     *
1364     * Response callback is IRadioResponse.nvResetConfigResponse()
1365     */
1366    oneway nvResetConfig(int32_t serial, ResetNvType resetType);
1367
1368    /**
1369     * Selection/de-selection of a subscription from a SIM card
1370     *
1371     * @param serial Serial number of request.
1372     * @param uiccSub SelectUiccSub as defined in types.hal
1373     *
1374     * Response callback is IRadioResponse.setUiccSubscriptionResponse()
1375     */
1376    oneway setUiccSubscription(int32_t serial, SelectUiccSub uiccSub);
1377
1378    /**
1379     * Tells the modem whether data calls are allowed or not
1380     *
1381     * @param serial Serial number of request.
1382     * @param allow true to allow data calls, false to disallow data calls
1383     *
1384     * Response callback is IRadioResponse.setDataAllowedResponse()
1385     */
1386    oneway setDataAllowed(int32_t serial, bool allow);
1387
1388    /**
1389     * Request all of the current hardware (modem and sim) associated with Radio.
1390     *
1391     * @param serial Serial number of request.
1392     *
1393     * Response callback is IRadioResponse.getHardwareConfigResponse()
1394     */
1395    oneway getHardwareConfig(int32_t serial);
1396
1397    /**
1398     * Returns the response of SIM Authentication through Radio challenge request.
1399     *
1400     * @param serial Serial number of request.
1401     * @param authContext P2 value of authentication command, see P2 parameter in
1402     *        3GPP TS 31.102 7.1.2
1403     * @param authData the challenge string in Base64 format, see 3GPP TS 31.102 7.1.2
1404     * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value
1405     *
1406     * Response callback is IRadioResponse.requestIccSimAuthenticationResponse()
1407     */
1408    oneway requestIccSimAuthentication(int32_t serial, int32_t authContext, string authData,
1409            string aid);
1410
1411    /**
1412     * Set data profile in modem.
1413     * Modem must erase existed profiles from framework, and apply new profiles
1414     *
1415     * @param serial Serial number of request.
1416     * @param profiles Array of DataProfiles to set.
1417     * @param isRoaming Indicating the device is roaming or not. The 'protocol' parameter in the old
1418     *                  RIL API RIL_DataProfileInfo must be filled accordingly based on the
1419     *                  roaming condition. Note this is for backward compatibility with the old
1420     *                  radio modem. The modem must not use this param for any other reason.
1421     *
1422     * Response callback is IRadioResponse.setDataProfileResponse()
1423     */
1424    oneway setDataProfile(int32_t serial, vec<DataProfileInfo> profiles, bool isRoaming);
1425
1426    /**
1427     * Device is shutting down. All further commands are ignored
1428     * and RADIO_NOT_AVAILABLE must be returned.
1429     *
1430     * @param serial Serial number of request.
1431     *
1432     * Response callback is IRadioResponse.requestShutdownResponse()
1433     */
1434    oneway requestShutdown(int32_t serial);
1435
1436    /**
1437     * Used to get phone radio capability.
1438     *
1439     * @param serial Serial number of request.
1440     *
1441     * Response callback is IRadioResponse.getRadioCapabilityResponse()
1442     */
1443    oneway getRadioCapability(int32_t serial);
1444
1445    /**
1446     * Used to set the phones radio capability. Be VERY careful
1447     * using this request as it may cause some vendor modems to reset. Because
1448     * of the possible modem reset any radio commands after this one may not be
1449     * processed.
1450     *
1451     * @param serial Serial number of request.
1452     * @param rc RadioCapability structure to be set
1453     *
1454     * Response callback is IRadioResponse.setRadioCapabilityResponse()
1455     */
1456    oneway setRadioCapability(int32_t serial, RadioCapability rc);
1457
1458    /**
1459     * Start Link Capacity Estimate (LCE) service if supported by the radio.
1460     *
1461     * @param serial Serial number of request.
1462     * @param reportInterval desired reporting interval (ms).
1463     * @param pullMode LCE service mode. true: PULL; false: PUSH.
1464     *
1465     * Response callback is IRadioResponse.startLceServiceResponse() which may return
1466     * RadioError:REQUEST_NOT_SUPPORTED if @1.2::IRadio or higher is supported.
1467     *
1468     * DEPRECATED in @1.2 or higher which use the always-on LCE that relies on indications.
1469     */
1470    oneway startLceService(int32_t serial, int32_t reportInterval, bool pullMode);
1471
1472    /**
1473     * Stop Link Capacity Estimate (LCE) service, the STOP operation must be
1474     * idempotent for the radio modem.
1475     *
1476     * @param serial Serial number of request.
1477     *
1478     * Response callback is IRadioResponse.stopLceServiceResponse() which may return
1479     * RadioError:REQUEST_NOT_SUPPORTED if @1.2::IRadio or higher is supported.
1480     *
1481     * DEPRECATED in @1.2 or higher which use the always-on LCE that relies on indications.
1482     */
1483    oneway stopLceService(int32_t serial);
1484
1485    /**
1486     * Pull LCE service for capacity information.
1487     *
1488     * @param serial Serial number of request.
1489     *
1490     * Response callback is IRadioResponse.pullLceDataResponse() which may return
1491     * RadioError:REQUEST_NOT_SUPPORTED if @1.2::IRadio or higher is supported.
1492     *
1493     * DEPRECATED in @1.2 or higher which use the always-on LCE that relies on indications.
1494     */
1495    oneway pullLceData(int32_t serial);
1496
1497    /**
1498     * Get modem activity information for power consumption estimation.
1499     * Request clear-on-read statistics information that is used for
1500     * estimating the per-millisecond power consumption of the cellular
1501     * modem.
1502     *
1503     * @param serial Serial number of request.
1504     *
1505     * Response callback is IRadioResponse.getModemActivityInfoResponse()
1506     */
1507    oneway getModemActivityInfo(int32_t serial);
1508
1509    /**
1510     * Set carrier restrictions. Expected modem behavior:
1511     *  If never receives this command
1512     *  - Must allow all carriers
1513     *  Receives this command with allAllowed true
1514     *  - Must allow all carriers. If a previously allowed SIM is present, modem must not reload
1515     *    the SIM. If a previously disallowed SIM is present, reload the SIM and notify Android.
1516     *  Receives this command with a list of carriers & allAllowed = false
1517     *  - Only allow specified carriers, persist across power cycles and FDR. If a present SIM
1518     *    is in the allowed list, modem must not reload the SIM. If a present SIM is *not* in
1519     *    the allowed list, modem must detach from the registered network and only keep emergency
1520     *    service, and notify Android SIM refresh reset with new SIM state being
1521     *    CardState:RESTRICTED. Emergency service must be enabled.
1522     *
1523     * @param serial Serial number of request.
1524     * @param allAllowed true only when all carriers are allowed. Ignore "carriers" struct.
1525     *        If false, consider "carriers" struct
1526     * @param carriers CarrierRestrictions consisting allowed and excluded carriers as defined
1527     *        in types.hal
1528     *
1529     * Response callback is IRadioResponse.setAllowedCarriersResponse()
1530     */
1531    oneway setAllowedCarriers(int32_t serial, bool allAllowed, CarrierRestrictions carriers);
1532
1533    /**
1534     * Get carrier restrictions.
1535     *
1536     * @param serial Serial number of request.
1537     *
1538     * Response callback is IRadioResponse.getAllowedCarriersResponse()
1539     */
1540    oneway getAllowedCarriers(int32_t serial);
1541
1542    /**
1543     * Send the updated device state.
1544     * This is providing the device state information for the modem to perform power saving
1545     * strategies.
1546     *
1547     * @param serial Serial number of request.
1548     * @param deviceStateType The updated device state type.
1549     * @param state The updated state. See the definition of state at DeviceStateType.
1550     *
1551     * Response callback is IRadioResponse.sendDeviceStateResponse()
1552     */
1553    oneway sendDeviceState(int32_t serial, DeviceStateType deviceStateType, bool state);
1554
1555    /**
1556     * Set the indication filter.
1557     * This is used to prevent unnecessary application processor wake up for power saving purposes
1558     * by suppressing the indications in certain scenarios.
1559     *
1560     * @param serial Serial number of request.
1561     * @param indicationFilter 32-bit bitmap of IndicationFilter. Bits set to 1 indicate the
1562     *        indications are enabled. See IndicationFilter for the definition of each bit.
1563     *
1564     * Response callback is IRadioResponse.setIndicationFilterResponse() which may return
1565     * RadioError:REQUEST_NOT_SUPPORTED if @1.2::IRadio or higher is supported.
1566     *
1567     * DEPRECATED in @1.2 or higher, use @1.2::IRadio.setIndicationFilter_1_2() instead.
1568     */
1569    oneway setIndicationFilter(int32_t serial, bitfield<IndicationFilter> indicationFilter);
1570
1571    /**
1572     * Set SIM card power state.
1573     * Request is equivalent to inserting or removing the card.
1574     *
1575     * The radio modem must generate IRadioIndication.simStatusChanged() as if the SIM had been
1576     * inserted or removed.
1577     *
1578     * @param serial Serial number of request
1579     * @param powerUp True if powering up the sim card
1580     *
1581     * Response callback is IRadioResponse.setSimCardPowerResponse() which may return
1582     * RadioError:REQUEST_NOT_SUPPORTED if @1.1::IRadio or higher is supported.
1583     *
1584     * DEPRECATED in @1.1 or higher, use @1.1::IRadio.setSimCardPower_1_1() instead.
1585     */
1586    oneway setSimCardPower(int32_t serial, bool powerUp);
1587
1588    /**
1589     * When response type received from a radio indication or radio response is
1590     * RadioIndicationType:UNSOLICITED_ACK_EXP or RadioResponseType:SOLICITED_ACK_EXP respectively,
1591     * acknowledge the receipt of those messages by sending responseAcknowledgement().
1592     *
1593     */
1594    oneway responseAcknowledgement();
1595};
1596