blob: 81ac13a22c5546240046397be6a75826e780e14f [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 /*
296 * This is for OEM specific use.
297 *
298 * @param type Type of radio indication
299 * @param data data passed as raw bytes
300 */
301 oneway oemHookRaw(RadioIndicationType type, vec<uint8_t> data);
302
303 /*
304 * Indicates that nework doesn't have in-band information, need to
305 * play out-band tone.
306 *
307 * @param type Type of radio indication
308 * @param start true = start play ringback tone, false = stop playing ringback tone
309 */
310 oneway indicateRingbackTone(RadioIndicationType type, bool start);
311
312 /*
313 * Indicates that framework/application must reset the uplink mute state.
314 *
315 * @param type Type of radio indication
316 */
317 oneway resendIncallMute(RadioIndicationType type);
318
319 /*
320 * Indicates when CDMA subscription source changed.
321 *
322 * @param type Type of radio indication
323 * @param cdmaSource New Cdma SubscriptionSource
324 */
325 oneway cdmaSubscriptionSourceChanged(RadioIndicationType type,
326 CdmaSubscriptionSource cdmaSource);
327
328 /*
329 * Indicates when PRL (preferred roaming list) changes.
330 *
331 * @param type Type of radio indication
332 * @param version PRL version after PRL changes
333 */
334 oneway cdmaPrlChanged(RadioIndicationType type, int32_t version);
335
336 /*
337 * Indicates when Emergency Callback Mode Ends.
338 * Indicates that the radio system selection module has
339 * proactively exited emergency callback mode.
340 *
341 * @param type Type of radio indication
342 */
343 oneway exitEmergencyCallbackMode(RadioIndicationType type);
344
345 /*
Sanket Padawea08c29c2016-11-09 14:21:31 -0800346 * Indicates the ril connects and returns the version
347 *
348 * @param type Type of radio indication
349 */
350 oneway rilConnected(RadioIndicationType type);
351
352 /*
353 * Indicates that voice technology has changed. Responds with new rat.
354 *
355 * @param type Type of radio indication
356 * @param rat Current new voice rat
357 */
358 oneway voiceRadioTechChanged(RadioIndicationType type, RadioTechnology rat);
359
360 /*
361 * Same information as returned by getCellInfoList().
362 *
363 * @param type Type of radio indication
364 * @param records Current cell information known to radio
365 */
366 oneway cellInfoList(RadioIndicationType type, vec<CellInfo> records);
367
368 /*
369 * Indicates when IMS registration state has changed.
370 * To get IMS registration state and IMS SMS format, callee needs to invoke
371 * getImsRegistrationState()
372 *
373 * @param type Type of radio indication
374 */
375 oneway imsNetworkStateChanged(RadioIndicationType type);
376
377 /*
378 * Indicated when there is a change in subscription status.
379 * This event must be sent in the following scenarios
380 * - subscription readiness at modem, which was selected by telephony layer
381 * - when subscription is deactivated by modem due to UICC card removal
382 * - when network invalidates the subscription i.e. attach reject due to authentication reject
383 *
384 * @param type Type of radio indication
385 * @param activate false for subscription deactivated, true for subscription activated
386 */
387 oneway subscriptionStatusChanged(RadioIndicationType type, bool activate);
388
389 /*
390 * Indicates when Single Radio Voice Call Continuity (SRVCC)
391 * progress state has changed
392 *
393 * @param type Type of radio indication
394 * @param state New Srvcc State
395 */
396 oneway srvccStateNotify(RadioIndicationType type, SrvccState state);
397
398 /*
399 * Indicates when the hardware configuration associated with the RILd changes.
400 *
401 * @param type Type of radio indication
402 * @param configs Array of hardware configs
403 */
404 oneway hardwareConfigChanged(RadioIndicationType type, vec<HardwareConfig> configs);
405
406 /*
407 * Sent when setRadioCapability() completes.
408 * Returns the phone radio capability exactly as
409 * getRadioCapability() and must be the
410 * same set as sent by setRadioCapability().
411 *
412 * @param type Type of radio indication
413 * @param rc Current radio capability
414 */
415 oneway radioCapabilityIndication(RadioIndicationType type, RadioCapability rc);
416
417 /*
418 * Indicates when Supplementary service(SS) response is received when DIAL/USSD/SS is changed to
419 * SS by call control.
420 *
421 * @param type Type of radio indication
422 */
423 oneway onSupplementaryServiceIndication(RadioIndicationType type, StkCcUnsolSsResult ss);
424
425 /*
426 * Indicates when there is an ALPHA from UICC during Call Control.
427 *
428 * @param type Type of radio indication
429 * @param alpha ALPHA string from UICC in UTF-8 format
430 */
431 oneway stkCallControlAlphaNotify(RadioIndicationType type, string alpha);
432
433 /*
434 * Indicates when there is an incoming Link Capacity Estimate (LCE) info report.
435 *
436 * @param type Type of radio indication
437 * @param lce LceData information
438 */
439 oneway lceData(RadioIndicationType type, LceDataInfo lce);
440
441 /*
442 * Indicates when there is new Carrier PCO data received for a data call. Ideally
443 * only new data must be forwarded, though this is not required. Multiple
444 * boxes of carrier PCO data for a given call must result in a series of
445 * pcoData() calls.
446 *
447 * @param type Type of radio indication
448 * @param pco New PcoData
449 */
450 oneway pcoData(RadioIndicationType type, PcoDataInfo pco);
451
452 /*
453 * Indicates when there is a modem reset.
454 *
455 * When modem restarts, one of the following radio state transitions must happen
456 * 1) RadioState:ON->RadioState:UNAVAILABLE->RadioState:ON or
457 * 2) RadioState:OFF->RadioState:UNAVAILABLE->RadioState:OFF
458 * This message must be sent either just before the Radio State changes to RadioState:UNAVAILABLE
459 * or just after but must never be sent after the Radio State changes from RadioState:UNAVAILABLE
460 * to RadioState:ON/RadioState:OFF again.
461 * It must NOT be sent after the Radio state changes to RadioState:ON/RadioState:OFF after the
462 * modem restart as that may be interpreted as a second modem reset by the
463 * framework.
464 *
465 * @param type Type of radio indication
466 * @param reason the reason for the reset. It
467 * may be a crash signature if the restart was due to a crash or some
468 * string such as "user-initiated restart" or "AT command initiated
469 * restart" that explains the cause of the modem restart
470 */
471 oneway modemReset(RadioIndicationType type, string reason);
Sanket Padawefcf36542017-01-24 14:41:33 -0800472};