blob: f4e7e46839c6028e24566ab9f7f9221f5b70f2eb [file] [log] [blame]
Willi Yedaf0b732019-10-22 22:48:05 +02001/*
2 * Copyright (C) 2019, The LineageOS Project
3 *
4 * Licensed under the Apache License, Version 2.1 (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.1
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
17#include "Radio.h"
18
19namespace android {
20namespace hardware {
21namespace radio {
22namespace V1_3 {
23namespace implementation {
24
25Radio::Radio(const std::string& interfaceName) : interfaceName(interfaceName) {}
26
27sp<::vendor::samsung::hardware::radio::V1_2::IRadio> Radio::getSecIRadio() {
28 std::lock_guard<std::mutex> lock(secIRadioMutex);
29 if (!secIRadio) {
30 secIRadio = ::vendor::samsung::hardware::radio::V1_2::IRadio::getService(interfaceName);
31 }
32 return secIRadio;
33}
34
35// Methods from ::android::hardware::radio::V1_0::IRadio follow.
36Return<void> Radio::setResponseFunctions(
37 const sp<::android::hardware::radio::V1_0::IRadioResponse>& radioResponse,
38 const sp<::android::hardware::radio::V1_0::IRadioIndication>& radioIndication) {
39 sp<::vendor::samsung::hardware::radio::V1_2::IRadioResponse> secRadioResponse =
40 new SecRadioResponse(
41 interfaceName == RIL1_SERVICE_NAME ? 1 : 2,
42 ::android::hardware::radio::V1_2::IRadioResponse::castFrom(radioResponse)
43 .withDefault(nullptr));
44 sp<::vendor::samsung::hardware::radio::V1_2::IRadioIndication> secRadioIndication =
45 new SecRadioIndication(
46 ::android::hardware::radio::V1_2::IRadioIndication::castFrom(radioIndication)
47 .withDefault(nullptr));
48 getSecIRadio()->setResponseFunctions(secRadioResponse, secRadioIndication);
49 return Void();
50}
51
52Return<void> Radio::getIccCardStatus(int32_t serial) {
53 getSecIRadio()->getIccCardStatus(serial);
54 return Void();
55}
56
57Return<void> Radio::supplyIccPinForApp(int32_t serial, const hidl_string& pin,
58 const hidl_string& aid) {
59 getSecIRadio()->supplyIccPinForApp(serial, pin, aid);
60 return Void();
61}
62
63Return<void> Radio::supplyIccPukForApp(int32_t serial, const hidl_string& puk,
64 const hidl_string& pin, const hidl_string& aid) {
65 getSecIRadio()->supplyIccPukForApp(serial, puk, pin, aid);
66 return Void();
67}
68
69Return<void> Radio::supplyIccPin2ForApp(int32_t serial, const hidl_string& pin2,
70 const hidl_string& aid) {
71 getSecIRadio()->supplyIccPin2ForApp(serial, pin2, aid);
72 return Void();
73}
74
75Return<void> Radio::supplyIccPuk2ForApp(int32_t serial, const hidl_string& puk2,
76 const hidl_string& pin2, const hidl_string& aid) {
77 getSecIRadio()->supplyIccPuk2ForApp(serial, puk2, pin2, aid);
78 return Void();
79}
80
81Return<void> Radio::changeIccPinForApp(int32_t serial, const hidl_string& oldPin,
82 const hidl_string& newPin, const hidl_string& aid) {
83 getSecIRadio()->changeIccPinForApp(serial, oldPin, newPin, aid);
84 return Void();
85}
86
87Return<void> Radio::changeIccPin2ForApp(int32_t serial, const hidl_string& oldPin2,
88 const hidl_string& newPin2, const hidl_string& aid) {
89 getSecIRadio()->changeIccPin2ForApp(serial, oldPin2, newPin2, aid);
90 return Void();
91}
92
93Return<void> Radio::supplyNetworkDepersonalization(int32_t serial, const hidl_string& netPin) {
94 getSecIRadio()->supplyNetworkDepersonalization(serial, netPin);
95 return Void();
96}
97
98Return<void> Radio::getCurrentCalls(int32_t serial) {
99 getSecIRadio()->getCurrentCalls(serial);
100 return Void();
101}
102
103Return<void> Radio::dial(int32_t serial, const ::android::hardware::radio::V1_0::Dial& dialInfo) {
104 getSecIRadio()->dial(serial, dialInfo);
105 return Void();
106}
107
108Return<void> Radio::getImsiForApp(int32_t serial, const hidl_string& aid) {
109 getSecIRadio()->getImsiForApp(serial, aid);
110 return Void();
111}
112
113Return<void> Radio::hangup(int32_t serial, int32_t gsmIndex) {
114 getSecIRadio()->hangup(serial, gsmIndex);
115 return Void();
116}
117
118Return<void> Radio::hangupWaitingOrBackground(int32_t serial) {
119 getSecIRadio()->hangupWaitingOrBackground(serial);
120 return Void();
121}
122
123Return<void> Radio::hangupForegroundResumeBackground(int32_t serial) {
124 getSecIRadio()->hangupForegroundResumeBackground(serial);
125 return Void();
126}
127
128Return<void> Radio::switchWaitingOrHoldingAndActive(int32_t serial) {
129 getSecIRadio()->switchWaitingOrHoldingAndActive(serial);
130 return Void();
131}
132
133Return<void> Radio::conference(int32_t serial) {
134 getSecIRadio()->conference(serial);
135 return Void();
136}
137
138Return<void> Radio::rejectCall(int32_t serial) {
139 getSecIRadio()->rejectCall(serial);
140 return Void();
141}
142
143Return<void> Radio::getLastCallFailCause(int32_t serial) {
144 getSecIRadio()->getLastCallFailCause(serial);
145 return Void();
146}
147
148Return<void> Radio::getSignalStrength(int32_t serial) {
149 getSecIRadio()->getSignalStrength(serial);
150 return Void();
151}
152
153Return<void> Radio::getVoiceRegistrationState(int32_t serial) {
154 getSecIRadio()->getVoiceRegistrationState(serial);
155 return Void();
156}
157
158Return<void> Radio::getDataRegistrationState(int32_t serial) {
159 getSecIRadio()->getDataRegistrationState(serial);
160 return Void();
161}
162
163Return<void> Radio::getOperator(int32_t serial) {
164 getSecIRadio()->getOperator(serial);
165 return Void();
166}
167
168Return<void> Radio::setRadioPower(int32_t serial, bool on) {
169 getSecIRadio()->setRadioPower(serial, on);
170 return Void();
171}
172
173Return<void> Radio::sendDtmf(int32_t serial, const hidl_string& s) {
174 getSecIRadio()->sendDtmf(serial, s);
175 return Void();
176}
177
178Return<void> Radio::sendSms(int32_t serial,
179 const ::android::hardware::radio::V1_0::GsmSmsMessage& message) {
180 getSecIRadio()->sendSms(serial, message);
181 return Void();
182}
183
184Return<void> Radio::sendSMSExpectMore(
185 int32_t serial, const ::android::hardware::radio::V1_0::GsmSmsMessage& message) {
186 getSecIRadio()->sendSMSExpectMore(serial, message);
187 return Void();
188}
189
190Return<void> Radio::setupDataCall(
191 int32_t serial, ::android::hardware::radio::V1_0::RadioTechnology radioTechnology,
192 const ::android::hardware::radio::V1_0::DataProfileInfo& dataProfileInfo, bool modemCognitive,
193 bool roamingAllowed, bool isRoaming) {
194 getSecIRadio()->setupDataCall(serial, radioTechnology, dataProfileInfo, modemCognitive,
195 roamingAllowed, isRoaming);
196 return Void();
197}
198
199Return<void> Radio::iccIOForApp(int32_t serial,
200 const ::android::hardware::radio::V1_0::IccIo& iccIo) {
201 getSecIRadio()->iccIOForApp(serial, iccIo);
202 return Void();
203}
204
205Return<void> Radio::sendUssd(int32_t serial, const hidl_string& ussd) {
206 getSecIRadio()->sendUssd(serial, ussd);
207 return Void();
208}
209
210Return<void> Radio::cancelPendingUssd(int32_t serial) {
211 getSecIRadio()->cancelPendingUssd(serial);
212 return Void();
213}
214
215Return<void> Radio::getClir(int32_t serial) {
216 getSecIRadio()->getClir(serial);
217 return Void();
218}
219
220Return<void> Radio::setClir(int32_t serial, int32_t status) {
221 getSecIRadio()->setClir(serial, status);
222 return Void();
223}
224
225Return<void> Radio::getCallForwardStatus(
226 int32_t serial, const ::android::hardware::radio::V1_0::CallForwardInfo& callInfo) {
227 getSecIRadio()->getCallForwardStatus(serial, callInfo);
228 return Void();
229}
230
231Return<void> Radio::setCallForward(
232 int32_t serial, const ::android::hardware::radio::V1_0::CallForwardInfo& callInfo) {
233 getSecIRadio()->setCallForward(serial, callInfo);
234 return Void();
235}
236
237Return<void> Radio::getCallWaiting(int32_t serial, int32_t serviceClass) {
238 getSecIRadio()->getCallWaiting(serial, serviceClass);
239 return Void();
240}
241
242Return<void> Radio::setCallWaiting(int32_t serial, bool enable, int32_t serviceClass) {
243 getSecIRadio()->setCallWaiting(serial, enable, serviceClass);
244 return Void();
245}
246
247Return<void> Radio::acknowledgeLastIncomingGsmSms(
248 int32_t serial, bool success, ::android::hardware::radio::V1_0::SmsAcknowledgeFailCause cause) {
249 getSecIRadio()->acknowledgeLastIncomingGsmSms(serial, success, cause);
250 return Void();
251}
252
253Return<void> Radio::acceptCall(int32_t serial) {
254 getSecIRadio()->acceptCall(serial);
255 return Void();
256}
257
258Return<void> Radio::deactivateDataCall(int32_t serial, int32_t cid, bool reasonRadioShutDown) {
259 getSecIRadio()->deactivateDataCall(serial, cid, reasonRadioShutDown);
260 return Void();
261}
262
263Return<void> Radio::getFacilityLockForApp(int32_t serial, const hidl_string& facility,
264 const hidl_string& password, int32_t serviceClass,
265 const hidl_string& appId) {
266 getSecIRadio()->getFacilityLockForApp(serial, facility, password, serviceClass, appId);
267 return Void();
268}
269
270Return<void> Radio::setFacilityLockForApp(int32_t serial, const hidl_string& facility,
271 bool lockState, const hidl_string& password,
272 int32_t serviceClass, const hidl_string& appId) {
273 getSecIRadio()->setFacilityLockForApp(serial, facility, lockState, password, serviceClass,
274 appId);
275 return Void();
276}
277
278Return<void> Radio::setBarringPassword(int32_t serial, const hidl_string& facility,
279 const hidl_string& oldPassword,
280 const hidl_string& newPassword) {
281 getSecIRadio()->setBarringPassword(serial, facility, oldPassword, newPassword);
282 return Void();
283}
284
285Return<void> Radio::getNetworkSelectionMode(int32_t serial) {
286 getSecIRadio()->getNetworkSelectionMode(serial);
287 return Void();
288}
289
290Return<void> Radio::setNetworkSelectionModeAutomatic(int32_t serial) {
291 getSecIRadio()->setNetworkSelectionModeAutomatic(serial);
292 return Void();
293}
294
295Return<void> Radio::setNetworkSelectionModeManual(int32_t serial,
296 const hidl_string& operatorNumeric) {
297 getSecIRadio()->setNetworkSelectionModeManual(serial, operatorNumeric);
298 return Void();
299}
300
301Return<void> Radio::getAvailableNetworks(int32_t serial) {
302 getSecIRadio()->getAvailableNetworks(serial);
303 return Void();
304}
305
306Return<void> Radio::startDtmf(int32_t serial, const hidl_string& s) {
307 getSecIRadio()->startDtmf(serial, s);
308 return Void();
309}
310
311Return<void> Radio::stopDtmf(int32_t serial) {
312 getSecIRadio()->stopDtmf(serial);
313 return Void();
314}
315
316Return<void> Radio::getBasebandVersion(int32_t serial) {
317 getSecIRadio()->getBasebandVersion(serial);
318 return Void();
319}
320
321Return<void> Radio::separateConnection(int32_t serial, int32_t gsmIndex) {
322 getSecIRadio()->separateConnection(serial, gsmIndex);
323 return Void();
324}
325
326Return<void> Radio::setMute(int32_t serial, bool enable) {
327 getSecIRadio()->setMute(serial, enable);
328 return Void();
329}
330
331Return<void> Radio::getMute(int32_t serial) {
332 getSecIRadio()->getMute(serial);
333 return Void();
334}
335
336Return<void> Radio::getClip(int32_t serial) {
337 getSecIRadio()->getClip(serial);
338 return Void();
339}
340
341Return<void> Radio::getDataCallList(int32_t serial) {
342 getSecIRadio()->getDataCallList(serial);
343 return Void();
344}
345
346Return<void> Radio::setSuppServiceNotifications(int32_t serial, bool enable) {
347 getSecIRadio()->setSuppServiceNotifications(serial, enable);
348 return Void();
349}
350
351Return<void> Radio::writeSmsToSim(
352 int32_t serial, const ::android::hardware::radio::V1_0::SmsWriteArgs& smsWriteArgs) {
353 getSecIRadio()->writeSmsToSim(serial, smsWriteArgs);
354 return Void();
355}
356
357Return<void> Radio::deleteSmsOnSim(int32_t serial, int32_t index) {
358 getSecIRadio()->deleteSmsOnSim(serial, index);
359 return Void();
360}
361
362Return<void> Radio::setBandMode(int32_t serial,
363 ::android::hardware::radio::V1_0::RadioBandMode mode) {
364 getSecIRadio()->setBandMode(serial, mode);
365 return Void();
366}
367
368Return<void> Radio::getAvailableBandModes(int32_t serial) {
369 getSecIRadio()->getAvailableBandModes(serial);
370 return Void();
371}
372
373Return<void> Radio::sendEnvelope(int32_t serial, const hidl_string& command) {
374 getSecIRadio()->sendEnvelope(serial, command);
375 return Void();
376}
377
378Return<void> Radio::sendTerminalResponseToSim(int32_t serial, const hidl_string& commandResponse) {
379 getSecIRadio()->sendTerminalResponseToSim(serial, commandResponse);
380 return Void();
381}
382
383Return<void> Radio::handleStkCallSetupRequestFromSim(int32_t serial, bool accept) {
384 getSecIRadio()->handleStkCallSetupRequestFromSim(serial, accept);
385 return Void();
386}
387
388Return<void> Radio::explicitCallTransfer(int32_t serial) {
389 getSecIRadio()->explicitCallTransfer(serial);
390 return Void();
391}
392
393Return<void> Radio::setPreferredNetworkType(
394 int32_t serial, ::android::hardware::radio::V1_0::PreferredNetworkType nwType) {
395 getSecIRadio()->setPreferredNetworkType(serial, nwType);
396 return Void();
397}
398
399Return<void> Radio::getPreferredNetworkType(int32_t serial) {
400 getSecIRadio()->getPreferredNetworkType(serial);
401 return Void();
402}
403
404Return<void> Radio::getNeighboringCids(int32_t serial) {
405 getSecIRadio()->getNeighboringCids(serial);
406 return Void();
407}
408
409Return<void> Radio::setLocationUpdates(int32_t serial, bool enable) {
410 getSecIRadio()->setLocationUpdates(serial, enable);
411 return Void();
412}
413
414Return<void> Radio::setCdmaSubscriptionSource(
415 int32_t serial, ::android::hardware::radio::V1_0::CdmaSubscriptionSource cdmaSub) {
416 getSecIRadio()->setCdmaSubscriptionSource(serial, cdmaSub);
417 return Void();
418}
419
420Return<void> Radio::setCdmaRoamingPreference(int32_t serial,
421 ::android::hardware::radio::V1_0::CdmaRoamingType type) {
422 getSecIRadio()->setCdmaRoamingPreference(serial, type);
423 return Void();
424}
425
426Return<void> Radio::getCdmaRoamingPreference(int32_t serial) {
427 getSecIRadio()->getCdmaRoamingPreference(serial);
428 return Void();
429}
430
431Return<void> Radio::setTTYMode(int32_t serial, ::android::hardware::radio::V1_0::TtyMode mode) {
432 getSecIRadio()->setTTYMode(serial, mode);
433 return Void();
434}
435
436Return<void> Radio::getTTYMode(int32_t serial) {
437 getSecIRadio()->getTTYMode(serial);
438 return Void();
439}
440
441Return<void> Radio::setPreferredVoicePrivacy(int32_t serial, bool enable) {
442 getSecIRadio()->setPreferredVoicePrivacy(serial, enable);
443 return Void();
444}
445
446Return<void> Radio::getPreferredVoicePrivacy(int32_t serial) {
447 getSecIRadio()->getPreferredVoicePrivacy(serial);
448 return Void();
449}
450
451Return<void> Radio::sendCDMAFeatureCode(int32_t serial, const hidl_string& featureCode) {
452 getSecIRadio()->sendCDMAFeatureCode(serial, featureCode);
453 return Void();
454}
455
456Return<void> Radio::sendBurstDtmf(int32_t serial, const hidl_string& dtmf, int32_t on, int32_t off) {
457 getSecIRadio()->sendBurstDtmf(serial, dtmf, on, off);
458 return Void();
459}
460
461Return<void> Radio::sendCdmaSms(int32_t serial,
462 const ::android::hardware::radio::V1_0::CdmaSmsMessage& sms) {
463 getSecIRadio()->sendCdmaSms(serial, sms);
464 return Void();
465}
466
467Return<void> Radio::acknowledgeLastIncomingCdmaSms(
468 int32_t serial, const ::android::hardware::radio::V1_0::CdmaSmsAck& smsAck) {
469 getSecIRadio()->acknowledgeLastIncomingCdmaSms(serial, smsAck);
470 return Void();
471}
472
473Return<void> Radio::getGsmBroadcastConfig(int32_t serial) {
474 getSecIRadio()->getGsmBroadcastConfig(serial);
475 return Void();
476}
477
478Return<void> Radio::setGsmBroadcastConfig(
479 int32_t serial,
480 const hidl_vec<::android::hardware::radio::V1_0::GsmBroadcastSmsConfigInfo>& configInfo) {
481 getSecIRadio()->setGsmBroadcastConfig(serial, configInfo);
482 return Void();
483}
484
485Return<void> Radio::setGsmBroadcastActivation(int32_t serial, bool activate) {
486 getSecIRadio()->setGsmBroadcastActivation(serial, activate);
487 return Void();
488}
489
490Return<void> Radio::getCdmaBroadcastConfig(int32_t serial) {
491 getSecIRadio()->getCdmaBroadcastConfig(serial);
492 return Void();
493}
494
495Return<void> Radio::setCdmaBroadcastConfig(
496 int32_t serial,
497 const hidl_vec<::android::hardware::radio::V1_0::CdmaBroadcastSmsConfigInfo>& configInfo) {
498 getSecIRadio()->setCdmaBroadcastConfig(serial, configInfo);
499 return Void();
500}
501
502Return<void> Radio::setCdmaBroadcastActivation(int32_t serial, bool activate) {
503 getSecIRadio()->setCdmaBroadcastActivation(serial, activate);
504 return Void();
505}
506
507Return<void> Radio::getCDMASubscription(int32_t serial) {
508 getSecIRadio()->getCDMASubscription(serial);
509 return Void();
510}
511
512Return<void> Radio::writeSmsToRuim(
513 int32_t serial, const ::android::hardware::radio::V1_0::CdmaSmsWriteArgs& cdmaSms) {
514 getSecIRadio()->writeSmsToRuim(serial, cdmaSms);
515 return Void();
516}
517
518Return<void> Radio::deleteSmsOnRuim(int32_t serial, int32_t index) {
519 getSecIRadio()->deleteSmsOnRuim(serial, index);
520 return Void();
521}
522
523Return<void> Radio::getDeviceIdentity(int32_t serial) {
524 getSecIRadio()->getDeviceIdentity(serial);
525 return Void();
526}
527
528Return<void> Radio::exitEmergencyCallbackMode(int32_t serial) {
529 getSecIRadio()->exitEmergencyCallbackMode(serial);
530 return Void();
531}
532
533Return<void> Radio::getSmscAddress(int32_t serial) {
534 getSecIRadio()->getSmscAddress(serial);
535 return Void();
536}
537
538Return<void> Radio::setSmscAddress(int32_t serial, const hidl_string& smsc) {
539 getSecIRadio()->setSmscAddress(serial, smsc);
540 return Void();
541}
542
543Return<void> Radio::reportSmsMemoryStatus(int32_t serial, bool available) {
544 getSecIRadio()->reportSmsMemoryStatus(serial, available);
545 return Void();
546}
547
548Return<void> Radio::reportStkServiceIsRunning(int32_t serial) {
549 getSecIRadio()->reportStkServiceIsRunning(serial);
550 return Void();
551}
552
553Return<void> Radio::getCdmaSubscriptionSource(int32_t serial) {
554 getSecIRadio()->getCdmaSubscriptionSource(serial);
555 return Void();
556}
557
558Return<void> Radio::requestIsimAuthentication(int32_t serial, const hidl_string& challenge) {
559 getSecIRadio()->requestIsimAuthentication(serial, challenge);
560 return Void();
561}
562
563Return<void> Radio::acknowledgeIncomingGsmSmsWithPdu(int32_t serial, bool success,
564 const hidl_string& ackPdu) {
565 getSecIRadio()->acknowledgeIncomingGsmSmsWithPdu(serial, success, ackPdu);
566 return Void();
567}
568
569Return<void> Radio::sendEnvelopeWithStatus(int32_t serial, const hidl_string& contents) {
570 getSecIRadio()->sendEnvelopeWithStatus(serial, contents);
571 return Void();
572}
573
574Return<void> Radio::getVoiceRadioTechnology(int32_t serial) {
575 getSecIRadio()->getVoiceRadioTechnology(serial);
576 return Void();
577}
578
579Return<void> Radio::getCellInfoList(int32_t serial) {
580 getSecIRadio()->getCellInfoList(serial);
581 return Void();
582}
583
584Return<void> Radio::setCellInfoListRate(int32_t serial, int32_t rate) {
585 getSecIRadio()->setCellInfoListRate(serial, rate);
586 return Void();
587}
588
589Return<void> Radio::setInitialAttachApn(
590 int32_t serial, const ::android::hardware::radio::V1_0::DataProfileInfo& dataProfileInfo,
591 bool modemCognitive, bool isRoaming) {
592 getSecIRadio()->setInitialAttachApn(serial, dataProfileInfo, modemCognitive, isRoaming);
593 return Void();
594}
595
596Return<void> Radio::getImsRegistrationState(int32_t serial) {
597 getSecIRadio()->getImsRegistrationState(serial);
598 return Void();
599}
600
601Return<void> Radio::sendImsSms(int32_t serial,
602 const ::android::hardware::radio::V1_0::ImsSmsMessage& message) {
603 getSecIRadio()->sendImsSms(serial, message);
604 return Void();
605}
606
607Return<void> Radio::iccTransmitApduBasicChannel(
608 int32_t serial, const ::android::hardware::radio::V1_0::SimApdu& message) {
609 getSecIRadio()->iccTransmitApduBasicChannel(serial, message);
610 return Void();
611}
612
613Return<void> Radio::iccOpenLogicalChannel(int32_t serial, const hidl_string& aid, int32_t p2) {
614 getSecIRadio()->iccOpenLogicalChannel(serial, aid, p2);
615 return Void();
616}
617
618Return<void> Radio::iccCloseLogicalChannel(int32_t serial, int32_t channelId) {
619 getSecIRadio()->iccCloseLogicalChannel(serial, channelId);
620 return Void();
621}
622
623Return<void> Radio::iccTransmitApduLogicalChannel(
624 int32_t serial, const ::android::hardware::radio::V1_0::SimApdu& message) {
625 getSecIRadio()->iccTransmitApduLogicalChannel(serial, message);
626 return Void();
627}
628
629Return<void> Radio::nvReadItem(int32_t serial, ::android::hardware::radio::V1_0::NvItem itemId) {
630 getSecIRadio()->nvReadItem(serial, itemId);
631 return Void();
632}
633
634Return<void> Radio::nvWriteItem(int32_t serial,
635 const ::android::hardware::radio::V1_0::NvWriteItem& item) {
636 getSecIRadio()->nvWriteItem(serial, item);
637 return Void();
638}
639
640Return<void> Radio::nvWriteCdmaPrl(int32_t serial, const hidl_vec<uint8_t>& prl) {
641 getSecIRadio()->nvWriteCdmaPrl(serial, prl);
642 return Void();
643}
644
645Return<void> Radio::nvResetConfig(int32_t serial,
646 ::android::hardware::radio::V1_0::ResetNvType resetType) {
647 getSecIRadio()->nvResetConfig(serial, resetType);
648 return Void();
649}
650
651Return<void> Radio::setUiccSubscription(
652 int32_t serial, const ::android::hardware::radio::V1_0::SelectUiccSub& uiccSub) {
653 getSecIRadio()->setUiccSubscription(serial, uiccSub);
654 return Void();
655}
656
657Return<void> Radio::setDataAllowed(int32_t serial, bool allow) {
658 getSecIRadio()->setDataAllowed(serial, allow);
659 return Void();
660}
661
662Return<void> Radio::getHardwareConfig(int32_t serial) {
663 getSecIRadio()->getHardwareConfig(serial);
664 return Void();
665}
666
667Return<void> Radio::requestIccSimAuthentication(int32_t serial, int32_t authContext,
668 const hidl_string& authData,
669 const hidl_string& aid) {
670 getSecIRadio()->requestIccSimAuthentication(serial, authContext, authData, aid);
671 return Void();
672}
673
674Return<void> Radio::setDataProfile(
675 int32_t serial, const hidl_vec<::android::hardware::radio::V1_0::DataProfileInfo>& profiles,
676 bool isRoaming) {
677 getSecIRadio()->setDataProfile(serial, profiles, isRoaming);
678 return Void();
679}
680
681Return<void> Radio::requestShutdown(int32_t serial) {
682 getSecIRadio()->requestShutdown(serial);
683 return Void();
684}
685
686Return<void> Radio::getRadioCapability(int32_t serial) {
687 getSecIRadio()->getRadioCapability(serial);
688 return Void();
689}
690
691Return<void> Radio::setRadioCapability(int32_t serial,
692 const ::android::hardware::radio::V1_0::RadioCapability& rc) {
693 getSecIRadio()->setRadioCapability(serial, rc);
694 return Void();
695}
696
697Return<void> Radio::startLceService(int32_t serial, int32_t reportInterval, bool pullMode) {
698 getSecIRadio()->startLceService(serial, reportInterval, pullMode);
699 return Void();
700}
701
702Return<void> Radio::stopLceService(int32_t serial) {
703 getSecIRadio()->stopLceService(serial);
704 return Void();
705}
706
707Return<void> Radio::pullLceData(int32_t serial) {
708 getSecIRadio()->pullLceData(serial);
709 return Void();
710}
711
712Return<void> Radio::getModemActivityInfo(int32_t serial) {
713 getSecIRadio()->getModemActivityInfo(serial);
714 return Void();
715}
716
717Return<void> Radio::setAllowedCarriers(
718 int32_t serial, bool allAllowed,
719 const ::android::hardware::radio::V1_0::CarrierRestrictions& carriers) {
720 getSecIRadio()->setAllowedCarriers(serial, allAllowed, carriers);
721 return Void();
722}
723
724Return<void> Radio::getAllowedCarriers(int32_t serial) {
725 getSecIRadio()->getAllowedCarriers(serial);
726 return Void();
727}
728
729Return<void> Radio::sendDeviceState(
730 int32_t serial, ::android::hardware::radio::V1_0::DeviceStateType deviceStateType, bool state) {
731 getSecIRadio()->sendDeviceState(serial, deviceStateType, state);
732 return Void();
733}
734
735Return<void> Radio::setIndicationFilter(
736 int32_t serial,
737 hidl_bitfield<::android::hardware::radio::V1_2::IndicationFilter> indicationFilter) {
738 getSecIRadio()->setIndicationFilter(serial, indicationFilter);
739 return Void();
740}
741
742Return<void> Radio::setSimCardPower(int32_t serial, bool powerUp) {
743 getSecIRadio()->setSimCardPower(serial, powerUp);
744 return Void();
745}
746
747Return<void> Radio::responseAcknowledgement() {
748 getSecIRadio()->responseAcknowledgement();
749 return Void();
750}
751
752// Methods from ::android::hardware::radio::V1_1::IRadio follow.
753Return<void> Radio::setCarrierInfoForImsiEncryption(
754 int32_t serial, const ::android::hardware::radio::V1_1::ImsiEncryptionInfo& imsiEncryptionInfo) {
755 getSecIRadio()->setCarrierInfoForImsiEncryption(serial, imsiEncryptionInfo);
756 return Void();
757}
758
759Return<void> Radio::setSimCardPower_1_1(int32_t serial,
760 ::android::hardware::radio::V1_1::CardPowerState powerUp) {
761 getSecIRadio()->setSimCardPower_1_1(serial, powerUp);
762 return Void();
763}
764
765Return<void> Radio::startNetworkScan(
766 int32_t serial, const ::android::hardware::radio::V1_1::NetworkScanRequest& request) {
767 getSecIRadio()->startNetworkScan(serial, request);
768 return Void();
769}
770
771Return<void> Radio::stopNetworkScan(int32_t serial) {
772 getSecIRadio()->stopNetworkScan(serial);
773 return Void();
774}
775
776Return<void> Radio::startKeepalive(
777 int32_t serial, const ::android::hardware::radio::V1_1::KeepaliveRequest& keepalive) {
778 getSecIRadio()->startKeepalive(serial, keepalive);
779 return Void();
780}
781
782Return<void> Radio::stopKeepalive(int32_t serial, int32_t sessionHandle) {
783 getSecIRadio()->stopKeepalive(serial, sessionHandle);
784 return Void();
785}
786
787// Methods from ::android::hardware::radio::V1_2::IRadio follow.
788Return<void> Radio::startNetworkScan_1_2(
789 int32_t serial, const ::android::hardware::radio::V1_2::NetworkScanRequest& request) {
790 getSecIRadio()->startNetworkScan_1_2(serial, request);
791 return Void();
792}
793
794Return<void> Radio::setIndicationFilter_1_2(
795 int32_t serial,
796 hidl_bitfield<::android::hardware::radio::V1_2::IndicationFilter> indicationFilter) {
797 getSecIRadio()->setIndicationFilter_1_2(serial, indicationFilter);
798 return Void();
799}
800
801Return<void> Radio::setSignalStrengthReportingCriteria(
802 int32_t serial, int32_t hysteresisMs, int32_t hysteresisDb,
803 const hidl_vec<int32_t>& thresholdsDbm,
804 ::android::hardware::radio::V1_2::AccessNetwork accessNetwork) {
805 getSecIRadio()->setSignalStrengthReportingCriteria(serial, hysteresisMs, hysteresisDb,
806 thresholdsDbm, accessNetwork);
807 return Void();
808}
809
810Return<void> Radio::setLinkCapacityReportingCriteria(
811 int32_t serial, int32_t hysteresisMs, int32_t hysteresisDlKbps, int32_t hysteresisUlKbps,
812 const hidl_vec<int32_t>& thresholdsDownlinkKbps, const hidl_vec<int32_t>& thresholdsUplinkKbps,
813 ::android::hardware::radio::V1_2::AccessNetwork accessNetwork) {
814 getSecIRadio()->setLinkCapacityReportingCriteria(serial, hysteresisMs, hysteresisDlKbps,
815 hysteresisUlKbps, thresholdsDownlinkKbps,
816 thresholdsUplinkKbps, accessNetwork);
817 return Void();
818}
819
820Return<void> Radio::setupDataCall_1_2(
821 int32_t serial, ::android::hardware::radio::V1_2::AccessNetwork accessNetwork,
822 const ::android::hardware::radio::V1_0::DataProfileInfo& dataProfileInfo, bool modemCognitive,
823 bool roamingAllowed, bool isRoaming, ::android::hardware::radio::V1_2::DataRequestReason reason,
824 const hidl_vec<hidl_string>& addresses, const hidl_vec<hidl_string>& dnses) {
825 getSecIRadio()->setupDataCall_1_2(serial, accessNetwork, dataProfileInfo, modemCognitive,
826 roamingAllowed, isRoaming, reason, addresses, dnses);
827 return Void();
828}
829
830Return<void> Radio::deactivateDataCall_1_2(
831 int32_t serial, int32_t cid, ::android::hardware::radio::V1_2::DataRequestReason reason) {
832 getSecIRadio()->deactivateDataCall_1_2(serial, cid, reason);
833 return Void();
834}
835
836// Methods from ::android::hardware::radio::V1_3::IRadio follow.
837Return<void> Radio::setSystemSelectionChannels(
838 int32_t, bool, const hidl_vec<::android::hardware::radio::V1_1::RadioAccessSpecifier>&) {
839 return Void();
840}
841
842Return<void> Radio::enableModem(int32_t, bool) {
843 return Void();
844}
845
846Return<void> Radio::getModemStackStatus(int32_t) {
847 return Void();
848}
849
850} // namespace implementation
851} // namespace V1_3
852} // namespace radio
853} // namespace hardware
854} // namespace android