blob: 0b9582190b3860f624725edd556d8338ecdc01d5 [file] [log] [blame]
Amit Mahajan4cb7b842016-08-12 15:25:10 -07001/*
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
Sanket Padawe76372492016-10-27 13:20:49 -070019/*
20 * Interface declaring unsolicited radio indications.
21 */
22interface IRadioIndication {
23 /*
Sanket Padawea08c29c2016-11-09 14:21:31 -080024 * Indicates when radio state changes.
Amit Mahajan4cb7b842016-08-12 15:25:10 -070025 *
Sanket Padawea08c29c2016-11-09 14:21:31 -080026 * @param type Type of radio indication
Amit Mahajan4cb7b842016-08-12 15:25:10 -070027 * @param radioState Current radio state
28 */
Sanket Padawea08c29c2016-11-09 14:21:31 -080029 oneway radioStateChanged(RadioIndicationType type, RadioState radioState);
30
31 /*
32 * Indicates when call state has changed.
33 * Callee must invoke IRadio.getCurrentCalls()
34 * Must be invoked on, for example,
35 * "RING", "BUSY", "NO CARRIER", and also call state
36 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
37 *
38 * Redundent or extraneous invocations are tolerated
39 *
40 * @param type Type of radio indication
41 */
42 oneway callStateChanged(RadioIndicationType type);
43
44 /*
Jack Yuac2aec92017-01-24 11:56:52 -080045 * Indicates when voice or data network state changed
46 * Callee must invoke IRadio.getVoiceRegistrationState(), IRadio.getDataRegistrationState(),
47 * and IRadio.getOperator()
Sanket Padawea08c29c2016-11-09 14:21:31 -080048 *
49 * @param type Type of radio indication
50 */
Jack Yuac2aec92017-01-24 11:56:52 -080051 oneway networkStateChanged(RadioIndicationType type);
Sanket Padawea08c29c2016-11-09 14:21:31 -080052
53 /*
54 * Indicates when new SMS is received.
55 * Callee must subsequently confirm the receipt of the SMS with a
56 * acknowledgeLastIncomingGsmSms()
57 *
58 * Server must not send newSms() nor newSmsStatusReport() messages until a
59 * acknowledgeLastIncomingGsmSms() has been received
60 *
61 * @param type Type of radio indication
62 * @param pdu PDU of SMS-DELIVER represented as byte array.
63 * The PDU starts with the SMSC address per TS 27.005 (+CMT:)
64 */
65 oneway newSms(RadioIndicationType type, vec<uint8_t> pdu);
66
67 /*
68 * Indicates when new SMS Status Report is received.
69 * Callee must subsequently confirm the receipt of the SMS with a
70 * acknowledgeLastIncomingGsmSms()
71 *
72 * Server must not send newSms() nor newSmsStatusReport() messages until a
73 * acknowledgeLastIncomingGsmSms() has been received
74 *
75 * @param type Type of radio indication
76 * @param pdu PDU of SMS-STATUS-REPORT represented as byte array.
77 * The PDU starts with the SMSC address per TS 27.005 (+CMT:)
78 */
79 oneway newSmsStatusReport(RadioIndicationType type, vec<uint8_t> pdu);
80
81 /*
82 * Indicates when new SMS has been stored on SIM card
83 *
84 * @param type Type of radio indication
Amit Mahajand7c7e642016-12-28 17:30:04 -080085 * @param recordNumber Record number on the sim
Sanket Padawea08c29c2016-11-09 14:21:31 -080086 */
Amit Mahajand7c7e642016-12-28 17:30:04 -080087 oneway newSmsOnSim(RadioIndicationType type, int32_t recordNumber);
Sanket Padawea08c29c2016-11-09 14:21:31 -080088
89 /*
90 * Indicates when a new USSD message is received.
91 * The USSD session is assumed to persist if the type code is REQUEST, otherwise
92 * the current session (if any) is assumed to have terminated.
93 *
94 * @param type Type of radio indication
95 * @param modeType USSD type code
Amit Mahajand7c7e642016-12-28 17:30:04 -080096 * @param msg Message string in UTF-8, if applicable
Sanket Padawea08c29c2016-11-09 14:21:31 -080097 */
Amit Mahajand7c7e642016-12-28 17:30:04 -080098 oneway onUssd(RadioIndicationType type, UssdModeType modeType, string msg);
Sanket Padawea08c29c2016-11-09 14:21:31 -080099
100 /*
101 * Indicates when radio has received a NITZ time message.
102 *
103 * @param type Type of radio indication
104 * @param nitzTime NITZ time string in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
105 * @param receivedTime milliseconds since boot that the NITZ time was received
106 */
107 oneway nitzTimeReceived(RadioIndicationType type, string nitzTime, uint64_t receivedTime);
108
109 /*
110 * Indicates current signal strength of the radio.
111 *
112 * @param type Type of radio indication
113 * @param signalStrength SignalStrength information as defined in types.hal
114 */
115 oneway currentSignalStrength(RadioIndicationType type, SignalStrength signalStrength);
116
117 /*
118 * Indicates data call contexts have changed.
119 *
120 * @param type Type of radio indication
121 * @param dcList array of SetupDataCallResult identical to that
122 * returned by IRadio.getDataCallList(). It is the complete list
123 * of current data contexts including new contexts that have been
124 * activated. A data call is only removed from this list when the
125 * framework sends a IRadio.deactivateDataCall() or the radio
126 * is powered off/on
127 */
128 oneway dataCallListChanged(RadioIndicationType type, vec<SetupDataCallResult> dcList);
129
130 /*
131 * Reports supplementary service related notification from the network.
132 *
133 * @param type Type of radio indication
134 * @param suppSvc SuppSvcNotification as defined in types.hal
135 */
136 oneway suppSvcNotify(RadioIndicationType type, SuppSvcNotification suppSvc);
137
138 /*
139 * Indicates when STK session is terminated by SIM.
140 *
141 * @param type Type of radio indication
142 */
143 oneway stkSessionEnd(RadioIndicationType type);
144
145 /*
146 * Indicates when SIM issue a STK proactive command to applications
147 *
148 * @param type Type of radio indication
149 * @param cmd SAT/USAT proactive represented as byte array starting with command tag.
150 * Refer ETSI TS 102.223 section 9.4 for command types
151 */
Amit Mahajand7c7e642016-12-28 17:30:04 -0800152 oneway stkProactiveCommand(RadioIndicationType type, string cmd);
Sanket Padawea08c29c2016-11-09 14:21:31 -0800153
154 /*
155 * Indicates when SIM notifies applcations some event happens.
156 *
157 * @param type Type of radio indication
158 * @param cmd SAT/USAT commands or responses
159 * sent by ME to SIM or commands handled by ME, represented as byte array
160 * starting with first byte of response data for command tag. Refer
161 * ETSI TS 102.223 section 9.4 for command types
162 */
Amit Mahajand7c7e642016-12-28 17:30:04 -0800163 oneway stkEventNotify(RadioIndicationType type, string cmd);
Sanket Padawea08c29c2016-11-09 14:21:31 -0800164
165 /*
166 * Indicates when SIM wants application to setup a voice call.
167 *
168 * @param type Type of radio indication
169 * @param timeout Timeout value in millisec for setting up voice call
170 */
171 oneway stkCallSetup(RadioIndicationType type, int64_t timeout);
172
173 /*
174 * Indicates that SMS storage on the SIM is full. Sent when the network
175 * attempts to deliver a new SMS message. Messages cannot be saved on the
176 * SIM until space is freed. In particular, incoming Class 2 messages must not
177 * be stored
178 *
179 * @param type Type of radio indication
180 */
181 oneway simSmsStorageFull(RadioIndicationType type);
182
183 /*
184 * Indicates that file(s) on the SIM have been updated, or the SIM
185 * has been reinitialized.
186 * Note: If the SIM state changes as a result of the SIM refresh (eg,
187 * SIM_READY -> SIM_LOCKED_OR_ABSENT), simStatusChanged()
188 * must be sent.
189 *
190 * @param type Type of radio indication
191 * @param refreshResult Result of sim refresh
192 */
193 oneway simRefresh(RadioIndicationType type, SimRefreshResult refreshResult);
194
195 /*
196 * Ring indication for an incoming call (eg, RING or CRING event).
197 * There must be at least one callRing() at the beginning
198 * of a call and sending multiple is optional. If the system property
199 * ro.telephony.call_ring.multiple is false then the upper layers
200 * must generate the multiple events internally. Otherwise the vendor
201 * code must generate multiple callRing() if
202 * ro.telephony.call_ring.multiple is true or if it is absent.
203 *
204 * The rate of these events is controlled by ro.telephony.call_ring.delay
205 * and has a default value of 3000 (3 seconds) if absent.
206 *
207 * @param type Type of radio indication
208 * @param isGsm true for GSM & false for CDMA
209 * @param record Cdma Signal Information
210 */
211 oneway callRing(RadioIndicationType type, bool isGsm, CdmaSignalInfoRecord record);
212
213 /*
214 * Indicates that SIM state changes.
215 * Callee must invoke getIccCardStatus()
216 *
217 * @param type Type of radio indication
218 */
219 oneway simStatusChanged(RadioIndicationType type);
220
221 /*
222 * Indicates when new CDMA SMS is received
223 * Callee must subsequently confirm the receipt of the SMS with
224 * acknowledgeLastIncomingCdmaSms()
225 * Server must not send cdmaNewSms() messages until
226 * acknowledgeLastIncomingCdmaSms() has been received
227 *
228 * @param type Type of radio indication
229 * @param msg Cdma Sms Message
230 */
231 oneway cdmaNewSms(RadioIndicationType type, CdmaSmsMessage msg);
232
233 /*
234 * Indicates when new Broadcast SMS is received
235 *
236 * @param type Type of radio indication
237 * @param data If received from GSM network, "data" is byte array of 88 bytes
238 * which indicates each page of a CBS Message sent to the MS by the
239 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
240 * If received from UMTS network, "data" is byte array of 90 up to 1252
241 * bytes which contain between 1 and 15 CBS Message pages sent as one
242 * packet to the MS by the BTS as coded in 3GPP 23.041 Section 9.4.2.2
243 */
244 oneway newBroadcastSms(RadioIndicationType type, vec<uint8_t> data);
245
246 /*
247 * Indicates that SMS storage on the RUIM is full. Messages
248 * cannot be saved on the RUIM until space is freed.
249 *
250 * @param type Type of radio indication
251 */
252 oneway cdmaRuimSmsStorageFull(RadioIndicationType type);
253
254 /*
255 * Indicates a restricted state change (eg, for Domain Specific Access Control).
256 * Radio must send this msg after radio off/on cycle no matter it is changed or not.
257 *
258 * @param type Type of radio indication
259 * @param state Bitmask of restricted state as defined by PhoneRestrictedState
260 */
261 oneway restrictedStateChanged(RadioIndicationType type, PhoneRestrictedState state);
262
263 /*
264 * Indicates that the radio system selection module has
265 * autonomously entered emergency callback mode.
266 *
267 * @param type Type of radio indication
268 */
269 oneway enterEmergencyCallbackMode(RadioIndicationType type);
270
271 /*
272 * Indicates when CDMA radio receives a call waiting indication.
273 *
274 * @param type Type of radio indication
275 * @param callWaitingRecord Cdma CallWaiting information
276 */
277 oneway cdmaCallWaiting(RadioIndicationType type, CdmaCallWaiting callWaitingRecord);
278
279 /*
280 * Indicates when CDMA radio receives an update of the progress of an OTASP/OTAPA call.
281 *
282 * @param type Type of radio indication
283 * @param status Cdma OTA provision status
284 */
285 oneway cdmaOtaProvisionStatus(RadioIndicationType type, CdmaOtaProvisionStatus status);
286
287 /*
288 * Indicates when CDMA radio receives one or more info recs.
289 *
290 * @param type Type of radio indication
291 * @param records New Cdma Information
292 */
293 oneway cdmaInfoRec(RadioIndicationType type, CdmaInformationRecords records);
294
295 /*
Sanket Padawea08c29c2016-11-09 14:21:31 -0800296 * Indicates that nework doesn't have in-band information, need to
297 * play out-band tone.
298 *
299 * @param type Type of radio indication
300 * @param start true = start play ringback tone, false = stop playing ringback tone
301 */
302 oneway indicateRingbackTone(RadioIndicationType type, bool start);
303
304 /*
305 * Indicates that framework/application must reset the uplink mute state.
306 *
307 * @param type Type of radio indication
308 */
309 oneway resendIncallMute(RadioIndicationType type);
310
311 /*
312 * Indicates when CDMA subscription source changed.
313 *
314 * @param type Type of radio indication
315 * @param cdmaSource New Cdma SubscriptionSource
316 */
317 oneway cdmaSubscriptionSourceChanged(RadioIndicationType type,
318 CdmaSubscriptionSource cdmaSource);
319
320 /*
321 * Indicates when PRL (preferred roaming list) changes.
322 *
323 * @param type Type of radio indication
324 * @param version PRL version after PRL changes
325 */
326 oneway cdmaPrlChanged(RadioIndicationType type, int32_t version);
327
328 /*
329 * Indicates when Emergency Callback Mode Ends.
330 * Indicates that the radio system selection module has
331 * proactively exited emergency callback mode.
332 *
333 * @param type Type of radio indication
334 */
335 oneway exitEmergencyCallbackMode(RadioIndicationType type);
336
337 /*
Sanket Padawea08c29c2016-11-09 14:21:31 -0800338 * Indicates the ril connects and returns the version
339 *
340 * @param type Type of radio indication
341 */
342 oneway rilConnected(RadioIndicationType type);
343
344 /*
345 * Indicates that voice technology has changed. Responds with new rat.
346 *
347 * @param type Type of radio indication
348 * @param rat Current new voice rat
349 */
350 oneway voiceRadioTechChanged(RadioIndicationType type, RadioTechnology rat);
351
352 /*
353 * Same information as returned by getCellInfoList().
354 *
355 * @param type Type of radio indication
356 * @param records Current cell information known to radio
357 */
358 oneway cellInfoList(RadioIndicationType type, vec<CellInfo> records);
359
360 /*
361 * Indicates when IMS registration state has changed.
362 * To get IMS registration state and IMS SMS format, callee needs to invoke
363 * getImsRegistrationState()
364 *
365 * @param type Type of radio indication
366 */
367 oneway imsNetworkStateChanged(RadioIndicationType type);
368
369 /*
370 * Indicated when there is a change in subscription status.
371 * This event must be sent in the following scenarios
372 * - subscription readiness at modem, which was selected by telephony layer
373 * - when subscription is deactivated by modem due to UICC card removal
374 * - when network invalidates the subscription i.e. attach reject due to authentication reject
375 *
376 * @param type Type of radio indication
377 * @param activate false for subscription deactivated, true for subscription activated
378 */
379 oneway subscriptionStatusChanged(RadioIndicationType type, bool activate);
380
381 /*
382 * Indicates when Single Radio Voice Call Continuity (SRVCC)
383 * progress state has changed
384 *
385 * @param type Type of radio indication
386 * @param state New Srvcc State
387 */
388 oneway srvccStateNotify(RadioIndicationType type, SrvccState state);
389
390 /*
391 * Indicates when the hardware configuration associated with the RILd changes.
392 *
393 * @param type Type of radio indication
394 * @param configs Array of hardware configs
395 */
396 oneway hardwareConfigChanged(RadioIndicationType type, vec<HardwareConfig> configs);
397
398 /*
399 * Sent when setRadioCapability() completes.
400 * Returns the phone radio capability exactly as
401 * getRadioCapability() and must be the
402 * same set as sent by setRadioCapability().
403 *
404 * @param type Type of radio indication
405 * @param rc Current radio capability
406 */
407 oneway radioCapabilityIndication(RadioIndicationType type, RadioCapability rc);
408
409 /*
410 * Indicates when Supplementary service(SS) response is received when DIAL/USSD/SS is changed to
411 * SS by call control.
412 *
413 * @param type Type of radio indication
414 */
415 oneway onSupplementaryServiceIndication(RadioIndicationType type, StkCcUnsolSsResult ss);
416
417 /*
418 * Indicates when there is an ALPHA from UICC during Call Control.
419 *
420 * @param type Type of radio indication
421 * @param alpha ALPHA string from UICC in UTF-8 format
422 */
423 oneway stkCallControlAlphaNotify(RadioIndicationType type, string alpha);
424
425 /*
426 * Indicates when there is an incoming Link Capacity Estimate (LCE) info report.
427 *
428 * @param type Type of radio indication
429 * @param lce LceData information
430 */
431 oneway lceData(RadioIndicationType type, LceDataInfo lce);
432
433 /*
434 * Indicates when there is new Carrier PCO data received for a data call. Ideally
435 * only new data must be forwarded, though this is not required. Multiple
436 * boxes of carrier PCO data for a given call must result in a series of
437 * pcoData() calls.
438 *
439 * @param type Type of radio indication
440 * @param pco New PcoData
441 */
442 oneway pcoData(RadioIndicationType type, PcoDataInfo pco);
443
444 /*
445 * Indicates when there is a modem reset.
446 *
447 * When modem restarts, one of the following radio state transitions must happen
448 * 1) RadioState:ON->RadioState:UNAVAILABLE->RadioState:ON or
449 * 2) RadioState:OFF->RadioState:UNAVAILABLE->RadioState:OFF
450 * This message must be sent either just before the Radio State changes to RadioState:UNAVAILABLE
451 * or just after but must never be sent after the Radio State changes from RadioState:UNAVAILABLE
452 * to RadioState:ON/RadioState:OFF again.
453 * It must NOT be sent after the Radio state changes to RadioState:ON/RadioState:OFF after the
454 * modem restart as that may be interpreted as a second modem reset by the
455 * framework.
456 *
457 * @param type Type of radio indication
458 * @param reason the reason for the reset. It
459 * may be a crash signature if the restart was due to a crash or some
460 * string such as "user-initiated restart" or "AT command initiated
461 * restart" that explains the cause of the modem restart
462 */
463 oneway modemReset(RadioIndicationType type, string reason);
Sanket Padawefcf36542017-01-24 14:41:33 -0800464};