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