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