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