1 /*
2  * Copyright (C) 2017 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include <android-base/logging.h>
18 
19 #include <log/log.h>
20 #include <chrono>
21 #include <condition_variable>
22 #include <mutex>
23 
24 #include <android/hardware/radio/1.1/IRadio.h>
25 #include <android/hardware/radio/1.1/IRadioIndication.h>
26 #include <android/hardware/radio/1.1/IRadioResponse.h>
27 #include <android/hardware/radio/1.1/types.h>
28 #include <gtest/gtest.h>
29 
30 #include "vts_test_util.h"
31 
32 using namespace ::android::hardware::radio::V1_0;
33 using namespace ::android::hardware::radio::V1_1;
34 
35 using ::android::hardware::hidl_string;
36 using ::android::hardware::hidl_vec;
37 using ::android::hardware::Return;
38 using ::android::hardware::Void;
39 using ::android::sp;
40 
41 #define TIMEOUT_PERIOD 75
42 #define RADIO_SERVICE_NAME "slot1"
43 #define SKIP_TEST_IF_REQUEST_NOT_SUPPORTED_WITH_HAL_VERSION_AT_LEAST(__ver__) \
44     SKIP_TEST_IF_REQUEST_NOT_SUPPORTED_WITH_HAL(__ver__, radio_v1_1, radioRsp_v1_1)
45 
46 // HAL instance name for SIM slot 1 or single SIM device
47 #define RADIO_SERVICE_SLOT1_NAME "slot1"
48 
49 // HAL instance name for SIM slot 2 on dual SIM device
50 #define RADIO_SERVICE_SLOT2_NAME "slot2"
51 
52 // HAL instance name for SIM slot 3 on triple SIM device
53 #define RADIO_SERVICE_SLOT3_NAME "slot3"
54 
55 class RadioHidlTest_v1_1;
56 extern CardStatus cardStatus;
57 
58 /* Callback class for radio response v1_1*/
59 class RadioResponse_v1_1 : public ::android::hardware::radio::V1_1::IRadioResponse {
60    protected:
61     RadioHidlTest_v1_1& parent_v1_1;
62 
63    public:
64     RadioResponseInfo rspInfo;
65     hidl_string imsi;
66     IccIoResult iccIoResult;
67     int channelId;
68     KeepaliveStatus keepaliveStatus;
69 
70     // Sms
71     SendSmsResult sendSmsResult;
72     hidl_string smscAddress;
73     uint32_t writeSmsToSimIndex;
74     uint32_t writeSmsToRuimIndex;
75 
76     RadioResponse_v1_1(RadioHidlTest_v1_1& parent_v1_1);
77     virtual ~RadioResponse_v1_1() = default;
78 
79     Return<void> getIccCardStatusResponse(const RadioResponseInfo& info,
80                                           const CardStatus& cardStatus);
81 
82     Return<void> supplyIccPinForAppResponse(const RadioResponseInfo& info,
83                                             int32_t remainingRetries);
84 
85     Return<void> supplyIccPukForAppResponse(const RadioResponseInfo& info,
86                                             int32_t remainingRetries);
87 
88     Return<void> supplyIccPin2ForAppResponse(const RadioResponseInfo& info,
89                                              int32_t remainingRetries);
90 
91     Return<void> supplyIccPuk2ForAppResponse(const RadioResponseInfo& info,
92                                              int32_t remainingRetries);
93 
94     Return<void> changeIccPinForAppResponse(const RadioResponseInfo& info,
95                                             int32_t remainingRetries);
96 
97     Return<void> changeIccPin2ForAppResponse(const RadioResponseInfo& info,
98                                              int32_t remainingRetries);
99 
100     Return<void> supplyNetworkDepersonalizationResponse(const RadioResponseInfo& info,
101                                                         int32_t remainingRetries);
102 
103     Return<void> getCurrentCallsResponse(const RadioResponseInfo& info,
104                                          const ::android::hardware::hidl_vec<Call>& calls);
105 
106     Return<void> dialResponse(const RadioResponseInfo& info);
107 
108     Return<void> getIMSIForAppResponse(const RadioResponseInfo& info,
109                                        const ::android::hardware::hidl_string& imsi);
110 
111     Return<void> hangupConnectionResponse(const RadioResponseInfo& info);
112 
113     Return<void> hangupWaitingOrBackgroundResponse(const RadioResponseInfo& info);
114 
115     Return<void> hangupForegroundResumeBackgroundResponse(const RadioResponseInfo& info);
116 
117     Return<void> switchWaitingOrHoldingAndActiveResponse(const RadioResponseInfo& info);
118 
119     Return<void> conferenceResponse(const RadioResponseInfo& info);
120 
121     Return<void> rejectCallResponse(const RadioResponseInfo& info);
122 
123     Return<void> getLastCallFailCauseResponse(const RadioResponseInfo& info,
124                                               const LastCallFailCauseInfo& failCauseInfo);
125 
126     Return<void> getSignalStrengthResponse(const RadioResponseInfo& info,
127                                            const SignalStrength& sigStrength);
128 
129     Return<void> getVoiceRegistrationStateResponse(const RadioResponseInfo& info,
130                                                    const VoiceRegStateResult& voiceRegResponse);
131 
132     Return<void> getDataRegistrationStateResponse(const RadioResponseInfo& info,
133                                                   const DataRegStateResult& dataRegResponse);
134 
135     Return<void> getOperatorResponse(const RadioResponseInfo& info,
136                                      const ::android::hardware::hidl_string& longName,
137                                      const ::android::hardware::hidl_string& shortName,
138                                      const ::android::hardware::hidl_string& numeric);
139 
140     Return<void> setRadioPowerResponse(const RadioResponseInfo& info);
141 
142     Return<void> sendDtmfResponse(const RadioResponseInfo& info);
143 
144     Return<void> sendSmsResponse(const RadioResponseInfo& info, const SendSmsResult& sms);
145 
146     Return<void> sendSMSExpectMoreResponse(const RadioResponseInfo& info, const SendSmsResult& sms);
147 
148     Return<void> setupDataCallResponse(const RadioResponseInfo& info,
149                                        const SetupDataCallResult& dcResponse);
150 
151     Return<void> iccIOForAppResponse(const RadioResponseInfo& info, const IccIoResult& iccIo);
152 
153     Return<void> sendUssdResponse(const RadioResponseInfo& info);
154 
155     Return<void> cancelPendingUssdResponse(const RadioResponseInfo& info);
156 
157     Return<void> getClirResponse(const RadioResponseInfo& info, int32_t n, int32_t m);
158 
159     Return<void> setClirResponse(const RadioResponseInfo& info);
160 
161     Return<void> getCallForwardStatusResponse(
162         const RadioResponseInfo& info,
163         const ::android::hardware::hidl_vec<CallForwardInfo>& call_forwardInfos);
164 
165     Return<void> setCallForwardResponse(const RadioResponseInfo& info);
166 
167     Return<void> getCallWaitingResponse(const RadioResponseInfo& info, bool enable,
168                                         int32_t serviceClass);
169 
170     Return<void> setCallWaitingResponse(const RadioResponseInfo& info);
171 
172     Return<void> acknowledgeLastIncomingGsmSmsResponse(const RadioResponseInfo& info);
173 
174     Return<void> acceptCallResponse(const RadioResponseInfo& info);
175 
176     Return<void> deactivateDataCallResponse(const RadioResponseInfo& info);
177 
178     Return<void> getFacilityLockForAppResponse(const RadioResponseInfo& info, int32_t response);
179 
180     Return<void> setFacilityLockForAppResponse(const RadioResponseInfo& info, int32_t retry);
181 
182     Return<void> setBarringPasswordResponse(const RadioResponseInfo& info);
183 
184     Return<void> getNetworkSelectionModeResponse(const RadioResponseInfo& info, bool manual);
185 
186     Return<void> setNetworkSelectionModeAutomaticResponse(const RadioResponseInfo& info);
187 
188     Return<void> setNetworkSelectionModeManualResponse(const RadioResponseInfo& info);
189 
190     Return<void> getAvailableNetworksResponse(
191         const RadioResponseInfo& info,
192         const ::android::hardware::hidl_vec<OperatorInfo>& networkInfos);
193 
194     Return<void> startDtmfResponse(const RadioResponseInfo& info);
195 
196     Return<void> stopDtmfResponse(const RadioResponseInfo& info);
197 
198     Return<void> getBasebandVersionResponse(const RadioResponseInfo& info,
199                                             const ::android::hardware::hidl_string& version);
200 
201     Return<void> separateConnectionResponse(const RadioResponseInfo& info);
202 
203     Return<void> setMuteResponse(const RadioResponseInfo& info);
204 
205     Return<void> getMuteResponse(const RadioResponseInfo& info, bool enable);
206 
207     Return<void> getClipResponse(const RadioResponseInfo& info, ClipStatus status);
208 
209     Return<void> getDataCallListResponse(
210         const RadioResponseInfo& info,
211         const ::android::hardware::hidl_vec<SetupDataCallResult>& dcResponse);
212 
213     Return<void> sendOemRilRequestRawResponse(const RadioResponseInfo& info,
214                                               const ::android::hardware::hidl_vec<uint8_t>& data);
215 
216     Return<void> sendOemRilRequestStringsResponse(
217         const RadioResponseInfo& info,
218         const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& data);
219 
220     Return<void> setSuppServiceNotificationsResponse(const RadioResponseInfo& info);
221 
222     Return<void> writeSmsToSimResponse(const RadioResponseInfo& info, int32_t index);
223 
224     Return<void> deleteSmsOnSimResponse(const RadioResponseInfo& info);
225 
226     Return<void> setBandModeResponse(const RadioResponseInfo& info);
227 
228     Return<void> getAvailableBandModesResponse(
229         const RadioResponseInfo& info,
230         const ::android::hardware::hidl_vec<RadioBandMode>& bandModes);
231 
232     Return<void> sendEnvelopeResponse(const RadioResponseInfo& info,
233                                       const ::android::hardware::hidl_string& commandResponse);
234 
235     Return<void> sendTerminalResponseToSimResponse(const RadioResponseInfo& info);
236 
237     Return<void> handleStkCallSetupRequestFromSimResponse(const RadioResponseInfo& info);
238 
239     Return<void> explicitCallTransferResponse(const RadioResponseInfo& info);
240 
241     Return<void> setPreferredNetworkTypeResponse(const RadioResponseInfo& info);
242 
243     Return<void> getPreferredNetworkTypeResponse(const RadioResponseInfo& info,
244                                                  PreferredNetworkType nwType);
245 
246     Return<void> getNeighboringCidsResponse(
247         const RadioResponseInfo& info, const ::android::hardware::hidl_vec<NeighboringCell>& cells);
248 
249     Return<void> setLocationUpdatesResponse(const RadioResponseInfo& info);
250 
251     Return<void> setCdmaSubscriptionSourceResponse(const RadioResponseInfo& info);
252 
253     Return<void> setCdmaRoamingPreferenceResponse(const RadioResponseInfo& info);
254 
255     Return<void> getCdmaRoamingPreferenceResponse(const RadioResponseInfo& info,
256                                                   CdmaRoamingType type);
257 
258     Return<void> setTTYModeResponse(const RadioResponseInfo& info);
259 
260     Return<void> getTTYModeResponse(const RadioResponseInfo& info, TtyMode mode);
261 
262     Return<void> setPreferredVoicePrivacyResponse(const RadioResponseInfo& info);
263 
264     Return<void> getPreferredVoicePrivacyResponse(const RadioResponseInfo& info, bool enable);
265 
266     Return<void> sendCDMAFeatureCodeResponse(const RadioResponseInfo& info);
267 
268     Return<void> sendBurstDtmfResponse(const RadioResponseInfo& info);
269 
270     Return<void> sendCdmaSmsResponse(const RadioResponseInfo& info, const SendSmsResult& sms);
271 
272     Return<void> acknowledgeLastIncomingCdmaSmsResponse(const RadioResponseInfo& info);
273 
274     Return<void> getGsmBroadcastConfigResponse(
275         const RadioResponseInfo& info,
276         const ::android::hardware::hidl_vec<GsmBroadcastSmsConfigInfo>& configs);
277 
278     Return<void> setGsmBroadcastConfigResponse(const RadioResponseInfo& info);
279 
280     Return<void> setGsmBroadcastActivationResponse(const RadioResponseInfo& info);
281 
282     Return<void> getCdmaBroadcastConfigResponse(
283         const RadioResponseInfo& info,
284         const ::android::hardware::hidl_vec<CdmaBroadcastSmsConfigInfo>& configs);
285 
286     Return<void> setCdmaBroadcastConfigResponse(const RadioResponseInfo& info);
287 
288     Return<void> setCdmaBroadcastActivationResponse(const RadioResponseInfo& info);
289 
290     Return<void> getCDMASubscriptionResponse(const RadioResponseInfo& info,
291                                              const ::android::hardware::hidl_string& mdn,
292                                              const ::android::hardware::hidl_string& hSid,
293                                              const ::android::hardware::hidl_string& hNid,
294                                              const ::android::hardware::hidl_string& min,
295                                              const ::android::hardware::hidl_string& prl);
296 
297     Return<void> writeSmsToRuimResponse(const RadioResponseInfo& info, uint32_t index);
298 
299     Return<void> deleteSmsOnRuimResponse(const RadioResponseInfo& info);
300 
301     Return<void> getDeviceIdentityResponse(const RadioResponseInfo& info,
302                                            const ::android::hardware::hidl_string& imei,
303                                            const ::android::hardware::hidl_string& imeisv,
304                                            const ::android::hardware::hidl_string& esn,
305                                            const ::android::hardware::hidl_string& meid);
306 
307     Return<void> exitEmergencyCallbackModeResponse(const RadioResponseInfo& info);
308 
309     Return<void> getSmscAddressResponse(const RadioResponseInfo& info,
310                                         const ::android::hardware::hidl_string& smsc);
311 
312     Return<void> setSmscAddressResponse(const RadioResponseInfo& info);
313 
314     Return<void> reportSmsMemoryStatusResponse(const RadioResponseInfo& info);
315 
316     Return<void> reportStkServiceIsRunningResponse(const RadioResponseInfo& info);
317 
318     Return<void> getCdmaSubscriptionSourceResponse(const RadioResponseInfo& info,
319                                                    CdmaSubscriptionSource source);
320 
321     Return<void> requestIsimAuthenticationResponse(
322         const RadioResponseInfo& info, const ::android::hardware::hidl_string& response);
323 
324     Return<void> acknowledgeIncomingGsmSmsWithPduResponse(const RadioResponseInfo& info);
325 
326     Return<void> sendEnvelopeWithStatusResponse(const RadioResponseInfo& info,
327                                                 const IccIoResult& iccIo);
328 
329     Return<void> getVoiceRadioTechnologyResponse(const RadioResponseInfo& info,
330                                                  RadioTechnology rat);
331 
332     Return<void> getCellInfoListResponse(const RadioResponseInfo& info,
333                                          const ::android::hardware::hidl_vec<CellInfo>& cellInfo);
334 
335     Return<void> setCellInfoListRateResponse(const RadioResponseInfo& info);
336 
337     Return<void> setInitialAttachApnResponse(const RadioResponseInfo& info);
338 
339     Return<void> getImsRegistrationStateResponse(const RadioResponseInfo& info, bool isRegistered,
340                                                  RadioTechnologyFamily ratFamily);
341 
342     Return<void> sendImsSmsResponse(const RadioResponseInfo& info, const SendSmsResult& sms);
343 
344     Return<void> iccTransmitApduBasicChannelResponse(const RadioResponseInfo& info,
345                                                      const IccIoResult& result);
346 
347     Return<void> iccOpenLogicalChannelResponse(
348         const RadioResponseInfo& info, int32_t channelId,
349         const ::android::hardware::hidl_vec<int8_t>& selectResponse);
350 
351     Return<void> iccCloseLogicalChannelResponse(const RadioResponseInfo& info);
352 
353     Return<void> iccTransmitApduLogicalChannelResponse(const RadioResponseInfo& info,
354                                                        const IccIoResult& result);
355 
356     Return<void> nvReadItemResponse(const RadioResponseInfo& info,
357                                     const ::android::hardware::hidl_string& result);
358 
359     Return<void> nvWriteItemResponse(const RadioResponseInfo& info);
360 
361     Return<void> nvWriteCdmaPrlResponse(const RadioResponseInfo& info);
362 
363     Return<void> nvResetConfigResponse(const RadioResponseInfo& info);
364 
365     Return<void> setUiccSubscriptionResponse(const RadioResponseInfo& info);
366 
367     Return<void> setDataAllowedResponse(const RadioResponseInfo& info);
368 
369     Return<void> getHardwareConfigResponse(
370         const RadioResponseInfo& info, const ::android::hardware::hidl_vec<HardwareConfig>& config);
371 
372     Return<void> requestIccSimAuthenticationResponse(const RadioResponseInfo& info,
373                                                      const IccIoResult& result);
374 
375     Return<void> setDataProfileResponse(const RadioResponseInfo& info);
376 
377     Return<void> requestShutdownResponse(const RadioResponseInfo& info);
378 
379     Return<void> getRadioCapabilityResponse(const RadioResponseInfo& info,
380                                             const RadioCapability& rc);
381 
382     Return<void> setRadioCapabilityResponse(const RadioResponseInfo& info,
383                                             const RadioCapability& rc);
384 
385     Return<void> startLceServiceResponse(const RadioResponseInfo& info,
386                                          const LceStatusInfo& statusInfo);
387 
388     Return<void> stopLceServiceResponse(const RadioResponseInfo& info,
389                                         const LceStatusInfo& statusInfo);
390 
391     Return<void> pullLceDataResponse(const RadioResponseInfo& info, const LceDataInfo& lceInfo);
392 
393     Return<void> getModemActivityInfoResponse(const RadioResponseInfo& info,
394                                               const ActivityStatsInfo& activityInfo);
395 
396     Return<void> setAllowedCarriersResponse(const RadioResponseInfo& info, int32_t numAllowed);
397 
398     Return<void> getAllowedCarriersResponse(const RadioResponseInfo& info, bool allAllowed,
399                                             const CarrierRestrictions& carriers);
400 
401     Return<void> sendDeviceStateResponse(const RadioResponseInfo& info);
402 
403     Return<void> setIndicationFilterResponse(const RadioResponseInfo& info);
404 
405     Return<void> setSimCardPowerResponse(const RadioResponseInfo& info);
406 
407     Return<void> acknowledgeRequest(int32_t serial);
408 
409     /* 1.1 Api */
410     Return<void> setCarrierInfoForImsiEncryptionResponse(const RadioResponseInfo& info);
411 
412     Return<void> setSimCardPowerResponse_1_1(const RadioResponseInfo& info);
413 
414     Return<void> startNetworkScanResponse(const RadioResponseInfo& info);
415 
416     Return<void> stopNetworkScanResponse(const RadioResponseInfo& info);
417 
418     Return<void> startKeepaliveResponse(const RadioResponseInfo& info,
419                                         const KeepaliveStatus& status);
420 
421     Return<void> stopKeepaliveResponse(const RadioResponseInfo& info);
422 };
423 
424 /* Callback class for radio indication */
425 class RadioIndication_v1_1 : public ::android::hardware::radio::V1_1::IRadioIndication {
426    protected:
427     RadioHidlTest_v1_1& parent_v1_1;
428 
429    public:
430     RadioIndication_v1_1(RadioHidlTest_v1_1& parent_v1_1);
431     virtual ~RadioIndication_v1_1() = default;
432 
433     /* 1.1 Api */
434     Return<void> carrierInfoForImsiEncryption(RadioIndicationType info);
435 
436     Return<void> networkScanResult(RadioIndicationType type, const NetworkScanResult& result);
437 
438     Return<void> keepaliveStatus(RadioIndicationType type, const KeepaliveStatus& status);
439 
440     /* 1.0 Api */
441     Return<void> radioStateChanged(RadioIndicationType type, RadioState radioState);
442 
443     Return<void> callStateChanged(RadioIndicationType type);
444 
445     Return<void> networkStateChanged(RadioIndicationType type);
446 
447     Return<void> newSms(RadioIndicationType type,
448                         const ::android::hardware::hidl_vec<uint8_t>& pdu);
449 
450     Return<void> newSmsStatusReport(RadioIndicationType type,
451                                     const ::android::hardware::hidl_vec<uint8_t>& pdu);
452 
453     Return<void> newSmsOnSim(RadioIndicationType type, int32_t recordNumber);
454 
455     Return<void> onUssd(RadioIndicationType type, UssdModeType modeType,
456                         const ::android::hardware::hidl_string& msg);
457 
458     Return<void> nitzTimeReceived(RadioIndicationType type,
459                                   const ::android::hardware::hidl_string& nitzTime,
460                                   uint64_t receivedTime);
461 
462     Return<void> currentSignalStrength(RadioIndicationType type,
463                                        const SignalStrength& signalStrength);
464 
465     Return<void> dataCallListChanged(
466         RadioIndicationType type, const ::android::hardware::hidl_vec<SetupDataCallResult>& dcList);
467 
468     Return<void> suppSvcNotify(RadioIndicationType type, const SuppSvcNotification& suppSvc);
469 
470     Return<void> stkSessionEnd(RadioIndicationType type);
471 
472     Return<void> stkProactiveCommand(RadioIndicationType type,
473                                      const ::android::hardware::hidl_string& cmd);
474 
475     Return<void> stkEventNotify(RadioIndicationType type,
476                                 const ::android::hardware::hidl_string& cmd);
477 
478     Return<void> stkCallSetup(RadioIndicationType type, int64_t timeout);
479 
480     Return<void> simSmsStorageFull(RadioIndicationType type);
481 
482     Return<void> simRefresh(RadioIndicationType type, const SimRefreshResult& refreshResult);
483 
484     Return<void> callRing(RadioIndicationType type, bool isGsm, const CdmaSignalInfoRecord& record);
485 
486     Return<void> simStatusChanged(RadioIndicationType type);
487 
488     Return<void> cdmaNewSms(RadioIndicationType type, const CdmaSmsMessage& msg);
489 
490     Return<void> newBroadcastSms(RadioIndicationType type,
491                                  const ::android::hardware::hidl_vec<uint8_t>& data);
492 
493     Return<void> cdmaRuimSmsStorageFull(RadioIndicationType type);
494 
495     Return<void> restrictedStateChanged(RadioIndicationType type, PhoneRestrictedState state);
496 
497     Return<void> enterEmergencyCallbackMode(RadioIndicationType type);
498 
499     Return<void> cdmaCallWaiting(RadioIndicationType type,
500                                  const CdmaCallWaiting& callWaitingRecord);
501 
502     Return<void> cdmaOtaProvisionStatus(RadioIndicationType type, CdmaOtaProvisionStatus status);
503 
504     Return<void> cdmaInfoRec(RadioIndicationType type, const CdmaInformationRecords& records);
505 
506     Return<void> indicateRingbackTone(RadioIndicationType type, bool start);
507 
508     Return<void> resendIncallMute(RadioIndicationType type);
509 
510     Return<void> cdmaSubscriptionSourceChanged(RadioIndicationType type,
511                                                CdmaSubscriptionSource cdmaSource);
512 
513     Return<void> cdmaPrlChanged(RadioIndicationType type, int32_t version);
514 
515     Return<void> exitEmergencyCallbackMode(RadioIndicationType type);
516 
517     Return<void> rilConnected(RadioIndicationType type);
518 
519     Return<void> voiceRadioTechChanged(RadioIndicationType type, RadioTechnology rat);
520 
521     Return<void> cellInfoList(RadioIndicationType type,
522                               const ::android::hardware::hidl_vec<CellInfo>& records);
523 
524     Return<void> imsNetworkStateChanged(RadioIndicationType type);
525 
526     Return<void> subscriptionStatusChanged(RadioIndicationType type, bool activate);
527 
528     Return<void> srvccStateNotify(RadioIndicationType type, SrvccState state);
529 
530     Return<void> hardwareConfigChanged(
531         RadioIndicationType type, const ::android::hardware::hidl_vec<HardwareConfig>& configs);
532 
533     Return<void> radioCapabilityIndication(RadioIndicationType type, const RadioCapability& rc);
534 
535     Return<void> onSupplementaryServiceIndication(RadioIndicationType type,
536                                                   const StkCcUnsolSsResult& ss);
537 
538     Return<void> stkCallControlAlphaNotify(RadioIndicationType type,
539                                            const ::android::hardware::hidl_string& alpha);
540 
541     Return<void> lceData(RadioIndicationType type, const LceDataInfo& lce);
542 
543     Return<void> pcoData(RadioIndicationType type, const PcoDataInfo& pco);
544 
545     Return<void> modemReset(RadioIndicationType type,
546                             const ::android::hardware::hidl_string& reason);
547 };
548 
549 // The main test class for Radio HIDL.
550 class RadioHidlTest_v1_1 : public ::testing::TestWithParam<std::string> {
551   protected:
552     std::mutex mtx;
553     std::condition_variable cv;
554     int count;
555 
556     /* Serial number for radio request */
557     int serial;
558 
559     /* Update Sim Card Status */
560     void updateSimCardStatus();
561 
562    public:
563     virtual void SetUp() override;
564 
565     /* Used as a mechanism to inform the test about data/event callback */
566     void notify(int receivedSerial);
567 
568     /* Test code calls this function to wait for response */
569     std::cv_status wait(int sec = TIMEOUT_PERIOD);
570 
571     sp<::android::hardware::radio::V1_1::IRadio> radio_v1_1;
572     sp<RadioResponse_v1_1> radioRsp_v1_1;
573     sp<RadioIndication_v1_1> radioInd_v1_1;
574 };
575