1 /*
2  * Copyright (C) 2020 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 #pragma once
18 
19 #include <android-base/logging.h>
20 
21 #include "radio_config_hidl_hal_utils.h"
22 
23 #include <chrono>
24 #include <condition_variable>
25 #include <mutex>
26 
27 #include <android/hardware/radio/1.6/IRadio.h>
28 #include <android/hardware/radio/1.6/IRadioIndication.h>
29 #include <android/hardware/radio/1.6/IRadioResponse.h>
30 #include <android/hardware/radio/1.6/types.h>
31 
32 #include "vts_test_util_v1_6.h"
33 
34 using namespace ::android::hardware::radio::V1_6;
35 using namespace ::android::hardware::radio::V1_5;
36 using namespace ::android::hardware::radio::V1_4;
37 using namespace ::android::hardware::radio::V1_3;
38 using namespace ::android::hardware::radio::V1_2;
39 using namespace ::android::hardware::radio::V1_1;
40 using namespace ::android::hardware::radio::V1_0;
41 
42 using ::android::sp;
43 using ::android::hardware::hidl_string;
44 using ::android::hardware::hidl_vec;
45 using ::android::hardware::Return;
46 using ::android::hardware::Void;
47 
48 #define MODEM_EMERGENCY_CALL_ESTABLISH_TIME 3
49 #define MODEM_EMERGENCY_CALL_DISCONNECT_TIME 3
50 #define MODEM_SET_SIM_POWER_DELAY_IN_SECONDS 2
51 
52 #define RADIO_SERVICE_SLOT1_NAME "slot1"  // HAL instance name for SIM slot 1 or single SIM device
53 #define RADIO_SERVICE_SLOT2_NAME "slot2"  // HAL instance name for SIM slot 2 on dual SIM device
54 #define RADIO_SERVICE_SLOT3_NAME "slot3"  // HAL instance name for SIM slot 3 on triple SIM device
55 
56 class RadioHidlTest_v1_6;
57 extern ::android::hardware::radio::V1_5::CardStatus cardStatus;
58 
59 /* Callback class for radio response v1_6 */
60 class RadioResponse_v1_6 : public ::android::hardware::radio::V1_6::IRadioResponse {
61   protected:
62     RadioResponseWaiter& parent_v1_6;
63 
64   public:
65     hidl_vec<RadioBandMode> radioBandModes;
66     hidl_vec<OperatorInfo> networkInfos;
67 
68     ::android::hardware::radio::V1_0::RadioResponseInfo rspInfo_v1_0;
69     ::android::hardware::radio::V1_6::RadioResponseInfo rspInfo;
70 
71     // Call
72     hidl_vec<::android::hardware::radio::V1_6::Call> currentCalls;
73     ::android::hardware::radio::V1_2::VoiceRegStateResult voiceRegResp;
74 
75     // Sms
76     SendSmsResult sendSmsResult;
77 
78     // Modem
79     bool isModemEnabled;
80     bool enableModemResponseToggle;
81     bool isNRDualConnectivityEnabled;
82 
83     // Pdu Session Id and Handover
84     int32_t allocatedPduSessionId;
85 
86     ::android::hardware::hidl_bitfield<::android::hardware::radio::V1_4::RadioAccessFamily>
87             networkTypeBitmapResponse;
88 
89     // Data
90     ::android::hardware::radio::V1_4::DataRegStateResult dataRegResp;
91     ::android::hardware::radio::V1_6::SetupDataCallResult setupDataCallResult;
92 
93     // SimLock status
94     ::android::hardware::radio::V1_4::CarrierRestrictionsWithPriority carrierRestrictionsResp;
95     ::android::hardware::radio::V1_4::SimLockMultiSimPolicy multiSimPolicyResp;
96 
97     // Whether toggling uicc applications operation is supported.
98     bool canToggleUiccApplicationsEnablement;
99 
100     // Whether Uicc applications are enabled or not.
101     bool areUiccApplicationsEnabled;
102 
103     // Barring Info Response
104     ::android::hardware::radio::V1_5::CellIdentity barringCellIdentity;
105     ::android::hardware::hidl_vec<::android::hardware::radio::V1_5::BarringInfo> barringInfos;
106 
107     RadioResponse_v1_6(RadioResponseWaiter& parent_v1_6);
108 
109     // Phone Book
110     ::android::hardware::radio::V1_6::PhonebookCapacity capacity;
111     int32_t updatedRecordIndex;
112 
113     virtual ~RadioResponse_v1_6() = default;
114 
115     Return<void> getIccCardStatusResponse(
116             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
117             const ::android::hardware::radio::V1_0::CardStatus& cardStatus);
118 
119     Return<void> supplyIccPinForAppResponse(
120             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
121             int32_t remainingRetries);
122 
123     Return<void> supplyIccPukForAppResponse(
124             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
125             int32_t remainingRetries);
126 
127     Return<void> supplyIccPin2ForAppResponse(
128             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
129             int32_t remainingRetries);
130 
131     Return<void> supplyIccPuk2ForAppResponse(
132             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
133             int32_t remainingRetries);
134 
135     Return<void> changeIccPinForAppResponse(
136             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
137             int32_t remainingRetries);
138 
139     Return<void> changeIccPin2ForAppResponse(
140             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
141             int32_t remainingRetries);
142 
143     Return<void> supplyNetworkDepersonalizationResponse(
144             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
145             int32_t remainingRetries);
146 
147     Return<void> getCurrentCallsResponse(
148             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
149             const ::android::hardware::hidl_vec<::android::hardware::radio::V1_0::Call>& calls);
150 
151     Return<void> dialResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
152 
153     Return<void> getIMSIForAppResponse(
154             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
155             const ::android::hardware::hidl_string& imsi);
156 
157     Return<void> hangupConnectionResponse(
158             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
159 
160     Return<void> hangupWaitingOrBackgroundResponse(
161             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
162 
163     Return<void> hangupForegroundResumeBackgroundResponse(
164             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
165 
166     Return<void> switchWaitingOrHoldingAndActiveResponse(
167             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
168 
169     Return<void> conferenceResponse(
170             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
171 
172     Return<void> rejectCallResponse(
173             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
174 
175     Return<void> getLastCallFailCauseResponse(
176             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
177             const LastCallFailCauseInfo& failCauseInfo);
178 
179     Return<void> getSignalStrengthResponse(
180             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
181             const ::android::hardware::radio::V1_0::SignalStrength& sigStrength);
182 
183     Return<void> getVoiceRegistrationStateResponse(
184             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
185             const ::android::hardware::radio::V1_0::VoiceRegStateResult& voiceRegResponse);
186 
187     Return<void> getDataRegistrationStateResponse(
188             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
189             const ::android::hardware::radio::V1_0::DataRegStateResult& dataRegResponse);
190 
191     Return<void> getOperatorResponse(
192             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
193             const ::android::hardware::hidl_string& longName,
194             const ::android::hardware::hidl_string& shortName,
195             const ::android::hardware::hidl_string& numeric);
196 
197     Return<void> setRadioPowerResponse(
198             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
199 
200     Return<void> sendDtmfResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
201 
202     Return<void> sendSmsResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
203                                  const SendSmsResult& sms);
204 
205     Return<void> sendSMSExpectMoreResponse(
206             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
207             const SendSmsResult& sms);
208 
209     Return<void> setupDataCallResponse(
210             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
211             const android::hardware::radio::V1_0::SetupDataCallResult& dcResponse);
212 
213     Return<void> iccIOForAppResponse(
214             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
215             const IccIoResult& iccIo);
216 
217     Return<void> sendUssdResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
218 
219     Return<void> cancelPendingUssdResponse(
220             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
221 
222     Return<void> getClirResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
223                                  int32_t n, int32_t m);
224 
225     Return<void> setClirResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
226 
227     Return<void> getCallForwardStatusResponse(
228             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
229             const ::android::hardware::hidl_vec<CallForwardInfo>& call_forwardInfos);
230 
231     Return<void> setCallForwardResponse(
232             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
233 
234     Return<void> getCallWaitingResponse(
235             const ::android::hardware::radio::V1_0::RadioResponseInfo& info, bool enable,
236             int32_t serviceClass);
237 
238     Return<void> setCallWaitingResponse(
239             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
240 
241     Return<void> acknowledgeLastIncomingGsmSmsResponse(
242             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
243 
244     Return<void> acceptCallResponse(
245             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
246 
247     Return<void> deactivateDataCallResponse(
248             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
249 
250     Return<void> getFacilityLockForAppResponse(
251             const ::android::hardware::radio::V1_0::RadioResponseInfo& info, int32_t response);
252 
253     Return<void> setFacilityLockForAppResponse(
254             const ::android::hardware::radio::V1_0::RadioResponseInfo& info, int32_t retry);
255 
256     Return<void> setBarringPasswordResponse(
257             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
258 
259     Return<void> getNetworkSelectionModeResponse(
260             const ::android::hardware::radio::V1_0::RadioResponseInfo& info, bool manual);
261 
262     Return<void> setNetworkSelectionModeAutomaticResponse(
263             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
264 
265     Return<void> setNetworkSelectionModeManualResponse(
266             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
267 
268     Return<void> getAvailableNetworksResponse(
269             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
270             const ::android::hardware::hidl_vec<OperatorInfo>& networkInfos);
271 
272     Return<void> startDtmfResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
273 
274     Return<void> stopDtmfResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
275 
276     Return<void> getBasebandVersionResponse(
277             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
278             const ::android::hardware::hidl_string& version);
279 
280     Return<void> separateConnectionResponse(
281             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
282 
283     Return<void> setMuteResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
284 
285     Return<void> getMuteResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
286                                  bool enable);
287 
288     Return<void> getClipResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
289                                  ClipStatus status);
290 
291     Return<void> getDataCallListResponse(
292             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
293             const ::android::hardware::hidl_vec<
294                     android::hardware::radio::V1_0::SetupDataCallResult>& dcResponse);
295 
296     Return<void> sendOemRilRequestRawResponse(
297             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
298             const ::android::hardware::hidl_vec<uint8_t>& data);
299 
300     Return<void> sendOemRilRequestStringsResponse(
301             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
302             const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& data);
303 
304     Return<void> setSuppServiceNotificationsResponse(
305             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
306 
307     Return<void> writeSmsToSimResponse(
308             const ::android::hardware::radio::V1_0::RadioResponseInfo& info, int32_t index);
309 
310     Return<void> deleteSmsOnSimResponse(
311             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
312 
313     Return<void> setBandModeResponse(
314             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
315 
316     Return<void> getAvailableBandModesResponse(
317             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
318             const ::android::hardware::hidl_vec<RadioBandMode>& bandModes);
319 
320     Return<void> sendEnvelopeResponse(
321             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
322             const ::android::hardware::hidl_string& commandResponse);
323 
324     Return<void> sendTerminalResponseToSimResponse(
325             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
326 
327     Return<void> handleStkCallSetupRequestFromSimResponse(
328             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
329 
330     Return<void> explicitCallTransferResponse(
331             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
332 
333     Return<void> setPreferredNetworkTypeResponse(
334             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
335 
336     Return<void> getPreferredNetworkTypeResponse(
337             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
338             PreferredNetworkType nwType);
339 
340     Return<void> getNeighboringCidsResponse(
341             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
342             const ::android::hardware::hidl_vec<NeighboringCell>& cells);
343 
344     Return<void> setLocationUpdatesResponse(
345             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
346 
347     Return<void> setCdmaSubscriptionSourceResponse(
348             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
349 
350     Return<void> setCdmaRoamingPreferenceResponse(
351             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
352 
353     Return<void> getCdmaRoamingPreferenceResponse(
354             const ::android::hardware::radio::V1_0::RadioResponseInfo& info, CdmaRoamingType type);
355 
356     Return<void> setTTYModeResponse(
357             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
358 
359     Return<void> getTTYModeResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
360                                     TtyMode mode);
361 
362     Return<void> setPreferredVoicePrivacyResponse(
363             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
364 
365     Return<void> getPreferredVoicePrivacyResponse(
366             const ::android::hardware::radio::V1_0::RadioResponseInfo& info, bool enable);
367 
368     Return<void> sendCDMAFeatureCodeResponse(
369             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
370 
371     Return<void> sendBurstDtmfResponse(
372             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
373 
374     Return<void> sendCdmaSmsResponse(
375             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
376             const SendSmsResult& sms);
377 
378     Return<void> acknowledgeLastIncomingCdmaSmsResponse(
379             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
380 
381     Return<void> getGsmBroadcastConfigResponse(
382             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
383             const ::android::hardware::hidl_vec<GsmBroadcastSmsConfigInfo>& configs);
384 
385     Return<void> setGsmBroadcastConfigResponse(
386             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
387 
388     Return<void> setGsmBroadcastActivationResponse(
389             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
390 
391     Return<void> getCdmaBroadcastConfigResponse(
392             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
393             const ::android::hardware::hidl_vec<CdmaBroadcastSmsConfigInfo>& configs);
394 
395     Return<void> setCdmaBroadcastConfigResponse(
396             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
397 
398     Return<void> setCdmaBroadcastActivationResponse(
399             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
400 
401     Return<void> getCDMASubscriptionResponse(
402             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
403             const ::android::hardware::hidl_string& mdn,
404             const ::android::hardware::hidl_string& hSid,
405             const ::android::hardware::hidl_string& hNid,
406             const ::android::hardware::hidl_string& min,
407             const ::android::hardware::hidl_string& prl);
408 
409     Return<void> writeSmsToRuimResponse(
410             const ::android::hardware::radio::V1_0::RadioResponseInfo& info, uint32_t index);
411 
412     Return<void> deleteSmsOnRuimResponse(
413             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
414 
415     Return<void> getDeviceIdentityResponse(
416             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
417             const ::android::hardware::hidl_string& imei,
418             const ::android::hardware::hidl_string& imeisv,
419             const ::android::hardware::hidl_string& esn,
420             const ::android::hardware::hidl_string& meid);
421 
422     Return<void> exitEmergencyCallbackModeResponse(
423             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
424 
425     Return<void> getSmscAddressResponse(
426             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
427             const ::android::hardware::hidl_string& smsc);
428 
429     Return<void> setSmscAddressResponse(
430             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
431 
432     Return<void> reportSmsMemoryStatusResponse(
433             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
434 
435     Return<void> reportStkServiceIsRunningResponse(
436             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
437 
438     Return<void> getCdmaSubscriptionSourceResponse(
439             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
440             CdmaSubscriptionSource source);
441 
442     Return<void> requestIsimAuthenticationResponse(
443             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
444             const ::android::hardware::hidl_string& response);
445 
446     Return<void> acknowledgeIncomingGsmSmsWithPduResponse(
447             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
448 
449     Return<void> sendEnvelopeWithStatusResponse(
450             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
451             const IccIoResult& iccIo);
452 
453     Return<void> getVoiceRadioTechnologyResponse(
454             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
455             ::android::hardware::radio::V1_0::RadioTechnology rat);
456 
457     Return<void> getCellInfoListResponse(
458             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
459             const ::android::hardware::hidl_vec<::android::hardware::radio::V1_0::CellInfo>&
460                     cellInfo);
461 
462     Return<void> setCellInfoListRateResponse(
463             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
464 
465     Return<void> setInitialAttachApnResponse(
466             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
467 
468     Return<void> getImsRegistrationStateResponse(
469             const ::android::hardware::radio::V1_0::RadioResponseInfo& info, bool isRegistered,
470             RadioTechnologyFamily ratFamily);
471 
472     Return<void> sendImsSmsResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
473                                     const SendSmsResult& sms);
474 
475     Return<void> iccTransmitApduBasicChannelResponse(
476             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
477             const IccIoResult& result);
478 
479     Return<void> iccOpenLogicalChannelResponse(
480             const ::android::hardware::radio::V1_0::RadioResponseInfo& info, int32_t channelId,
481             const ::android::hardware::hidl_vec<int8_t>& selectResponse);
482 
483     Return<void> iccCloseLogicalChannelResponse(
484             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
485 
486     Return<void> iccTransmitApduLogicalChannelResponse(
487             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
488             const IccIoResult& result);
489 
490     Return<void> nvReadItemResponse(const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
491                                     const ::android::hardware::hidl_string& result);
492 
493     Return<void> nvWriteItemResponse(
494             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
495 
496     Return<void> nvWriteCdmaPrlResponse(
497             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
498 
499     Return<void> nvResetConfigResponse(
500             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
501 
502     Return<void> setUiccSubscriptionResponse(
503             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
504 
505     Return<void> setDataAllowedResponse(
506             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
507 
508     Return<void> getHardwareConfigResponse(
509             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
510             const ::android::hardware::hidl_vec<HardwareConfig>& config);
511 
512     Return<void> requestIccSimAuthenticationResponse(
513             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
514             const IccIoResult& result);
515 
516     Return<void> setDataProfileResponse(
517             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
518 
519     Return<void> requestShutdownResponse(
520             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
521 
522     Return<void> getRadioCapabilityResponse(
523             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
524             const android::hardware::radio::V1_0::RadioCapability& rc);
525 
526     Return<void> setRadioCapabilityResponse(
527             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
528             const android::hardware::radio::V1_0::RadioCapability& rc);
529 
530     Return<void> startLceServiceResponse(
531             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
532             const LceStatusInfo& statusInfo);
533 
534     Return<void> stopLceServiceResponse(
535             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
536             const LceStatusInfo& statusInfo);
537 
538     Return<void> pullLceDataResponse(
539             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
540             const LceDataInfo& lceInfo);
541 
542     Return<void> getModemActivityInfoResponse(
543             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
544             const ActivityStatsInfo& activityInfo);
545 
546     Return<void> setAllowedCarriersResponse(
547             const ::android::hardware::radio::V1_0::RadioResponseInfo& info, int32_t numAllowed);
548 
549     Return<void> getAllowedCarriersResponse(
550             const ::android::hardware::radio::V1_0::RadioResponseInfo& info, bool allAllowed,
551             const CarrierRestrictions& carriers);
552 
553     Return<void> sendDeviceStateResponse(
554             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
555 
556     Return<void> setIndicationFilterResponse(
557             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
558 
559     Return<void> setSimCardPowerResponse(
560             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
561 
562     Return<void> acknowledgeRequest(int32_t serial);
563 
564     /* 1.1 Api */
565     Return<void> setCarrierInfoForImsiEncryptionResponse(
566             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
567 
568     Return<void> setSimCardPowerResponse_1_1(
569             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
570 
571     Return<void> startNetworkScanResponse(
572             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
573 
574     Return<void> stopNetworkScanResponse(
575             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
576 
577     Return<void> startKeepaliveResponse(
578             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
579             const KeepaliveStatus& status);
580 
581     Return<void> stopKeepaliveResponse(
582             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
583 
584     /* 1.2 Api */
585     Return<void> setSignalStrengthReportingCriteriaResponse(
586             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
587 
588     Return<void> setLinkCapacityReportingCriteriaResponse(
589             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
590 
591     Return<void> getIccCardStatusResponse_1_2(
592             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
593             const ::android::hardware::radio::V1_2::CardStatus& card_status);
594 
595     Return<void> getCurrentCallsResponse_1_2(
596             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
597             const ::android::hardware::hidl_vec<::android::hardware::radio::V1_2::Call>& calls);
598 
599     Return<void> getSignalStrengthResponse_1_2(
600             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
601             const ::android::hardware::radio::V1_2::SignalStrength& sig_strength);
602 
603     Return<void> getSignalStrengthResponse_1_4(
604             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
605             const ::android::hardware::radio::V1_4::SignalStrength& sig_strength);
606 
607     Return<void> getCellInfoListResponse_1_2(
608             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
609             const ::android::hardware::hidl_vec<::android::hardware::radio::V1_2::CellInfo>&
610                     cellInfo);
611 
612     Return<void> getVoiceRegistrationStateResponse_1_2(
613             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
614             const ::android::hardware::radio::V1_2::VoiceRegStateResult& voiceRegResponse);
615 
616     Return<void> getDataRegistrationStateResponse_1_2(
617             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
618             const ::android::hardware::radio::V1_2::DataRegStateResult& dataRegResponse);
619 
620     /* 1.3 Api */
621     Return<void> setSystemSelectionChannelsResponse(
622             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
623 
624     Return<void> enableModemResponse(
625             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
626 
627     Return<void> getModemStackStatusResponse(
628             const ::android::hardware::radio::V1_0::RadioResponseInfo& info, const bool enabled);
629 
630     /* 1.4 Api */
631     Return<void> emergencyDialResponse(
632             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
633 
634     Return<void> startNetworkScanResponse_1_4(
635             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
636 
637     Return<void> getCellInfoListResponse_1_4(
638             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
639             const ::android::hardware::hidl_vec<::android::hardware::radio::V1_4::CellInfo>&
640                     cellInfo);
641 
642     Return<void> getDataRegistrationStateResponse_1_4(
643             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
644             const ::android::hardware::radio::V1_4::DataRegStateResult& dataRegResponse);
645 
646     Return<void> getIccCardStatusResponse_1_4(
647             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
648             const ::android::hardware::radio::V1_4::CardStatus& card_status);
649 
650     Return<void> getPreferredNetworkTypeBitmapResponse(
651             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
652             const ::android::hardware::hidl_bitfield<
653                     ::android::hardware::radio::V1_4::RadioAccessFamily>
654                     networkTypeBitmap);
655 
656     Return<void> setPreferredNetworkTypeBitmapResponse(
657             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
658 
659     Return<void> getDataCallListResponse_1_4(
660             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
661             const ::android::hardware::hidl_vec<
662                     ::android::hardware::radio::V1_4::SetupDataCallResult>& dcResponse);
663 
664     Return<void> setupDataCallResponse_1_4(
665             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
666             const android::hardware::radio::V1_4::SetupDataCallResult& dcResponse);
667 
668     Return<void> setAllowedCarriersResponse_1_4(
669             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
670 
671     Return<void> getAllowedCarriersResponse_1_4(
672             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
673             const CarrierRestrictionsWithPriority& carriers, SimLockMultiSimPolicy multiSimPolicy);
674 
675     /* 1.5 Api */
676     Return<void> setSignalStrengthReportingCriteriaResponse_1_5(
677             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
678 
679     Return<void> setLinkCapacityReportingCriteriaResponse_1_5(
680             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
681 
682     Return<void> enableUiccApplicationsResponse(
683             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
684 
685     Return<void> areUiccApplicationsEnabledResponse(
686             const ::android::hardware::radio::V1_0::RadioResponseInfo& info, bool enabled);
687 
688     Return<void> canToggleUiccApplicationsEnablementResponse(
689             const ::android::hardware::radio::V1_0::RadioResponseInfo& info, bool canToggle);
690 
691     Return<void> setSystemSelectionChannelsResponse_1_5(
692             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
693 
694     Return<void> startNetworkScanResponse_1_5(
695             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
696 
697     Return<void> setupDataCallResponse_1_5(
698             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
699             const android::hardware::radio::V1_5::SetupDataCallResult& dcResponse);
700 
701     Return<void> getDataCallListResponse_1_5(
702             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
703             const hidl_vec<::android::hardware::radio::V1_5::SetupDataCallResult>& dcResponse);
704 
705     Return<void> setInitialAttachApnResponse_1_5(
706             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
707 
708     Return<void> setDataProfileResponse_1_5(
709             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
710 
711     Return<void> setRadioPowerResponse_1_5(
712             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
713 
714     Return<void> setIndicationFilterResponse_1_5(
715             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
716 
717     Return<void> getBarringInfoResponse(
718             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
719             const ::android::hardware::radio::V1_5::CellIdentity& cellIdentity,
720             const ::android::hardware::hidl_vec<::android::hardware::radio::V1_5::BarringInfo>&
721                     barringInfos);
722 
723     Return<void> getVoiceRegistrationStateResponse_1_5(
724             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
725             const ::android::hardware::radio::V1_5::RegStateResult& regResponse);
726 
727     Return<void> getDataRegistrationStateResponse_1_5(
728             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
729             const ::android::hardware::radio::V1_5::RegStateResult& regResponse);
730 
731     Return<void> getCellInfoListResponse_1_5(
732             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
733             const ::android::hardware::hidl_vec<::android::hardware::radio::V1_5::CellInfo>&
734                     cellInfo);
735 
736     Return<void> setNetworkSelectionModeManualResponse_1_5(
737             const ::android::hardware::radio::V1_0::RadioResponseInfo& info);
738 
739     Return<void> sendCdmaSmsExpectMoreResponse(
740             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
741             const SendSmsResult& sms);
742 
743     Return<void> supplySimDepersonalizationResponse(
744             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
745             ::android::hardware::radio::V1_5::PersoSubstate persoType, int32_t remainingRetries);
746 
747     Return<void> getIccCardStatusResponse_1_5(
748             const ::android::hardware::radio::V1_0::RadioResponseInfo& info,
749             const ::android::hardware::radio::V1_5::CardStatus& card_status);
750 
751     /* 1.6 Api */
752     Return<void> setRadioPowerResponse_1_6(
753             const ::android::hardware::radio::V1_6::RadioResponseInfo& info);
754 
755     Return<void> setupDataCallResponse_1_6(
756             const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
757             const android::hardware::radio::V1_6::SetupDataCallResult& dcResponse);
758 
759     Return<void> getDataCallListResponse_1_6(
760             const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
761             const hidl_vec<::android::hardware::radio::V1_6::SetupDataCallResult>& dcResponse);
762 
763     Return<void> sendSmsResponse_1_6(
764             const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
765             const SendSmsResult& sms);
766 
767     Return<void> sendSmsExpectMoreResponse_1_6(
768             const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
769             const SendSmsResult& sms);
770 
771     Return<void> sendCdmaSmsResponse_1_6(
772             const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
773             const SendSmsResult& sms);
774 
775     Return<void> setSimCardPowerResponse_1_6(
776             const ::android::hardware::radio::V1_6::RadioResponseInfo& info);
777 
778     Return<void> sendCdmaSmsExpectMoreResponse_1_6(
779             const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
780             const SendSmsResult& sms);
781 
782     Return<void> setNrDualConnectivityStateResponse(
783             const ::android::hardware::radio::V1_6::RadioResponseInfo& info);
784     Return<void> isNrDualConnectivityEnabledResponse(
785             const ::android::hardware::radio::V1_6::RadioResponseInfo& info, bool isEnabled);
786 
787     Return<void> allocatePduSessionIdResponse(
788             const ::android::hardware::radio::V1_6::RadioResponseInfo& info, int32_t id);
789 
790     Return<void> releasePduSessionIdResponse(
791             const ::android::hardware::radio::V1_6::RadioResponseInfo& info);
792 
793     Return<void> startHandoverResponse(
794             const ::android::hardware::radio::V1_6::RadioResponseInfo& info);
795 
796     Return<void> cancelHandoverResponse(
797             const ::android::hardware::radio::V1_6::RadioResponseInfo& info);
798 
799     Return<void> setAllowedNetworkTypesBitmapResponse(
800             const ::android::hardware::radio::V1_6::RadioResponseInfo& info);
801 
802     Return<void> getAllowedNetworkTypesBitmapResponse(
803             const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
804             const ::android::hardware::hidl_bitfield<
805                     ::android::hardware::radio::V1_4::RadioAccessFamily>
806                     networkTypeBitmap);
807 
808     Return<void> setDataThrottlingResponse(
809             const ::android::hardware::radio::V1_6::RadioResponseInfo& info);
810 
811     Return<void> getSystemSelectionChannelsResponse(
812             const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
813             const hidl_vec<::android::hardware::radio::V1_5::RadioAccessSpecifier>& specifier);
814 
815     Return<void> getSignalStrengthResponse_1_6(
816             const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
817             const ::android::hardware::radio::V1_6::SignalStrength& sig_strength);
818 
819     Return<void> getCellInfoListResponse_1_6(
820             const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
821             const ::android::hardware::hidl_vec<::android::hardware::radio::V1_6::CellInfo>&
822                     cellInfo);
823 
824     Return<void> getVoiceRegistrationStateResponse_1_6(
825             const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
826             const ::android::hardware::radio::V1_6::RegStateResult& regResponse);
827 
828     Return<void> getDataRegistrationStateResponse_1_6(
829             const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
830             const ::android::hardware::radio::V1_6::RegStateResult& regResponse);
831 
832     Return<void> getCurrentCallsResponse_1_6(
833             const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
834             const ::android::hardware::hidl_vec<::android::hardware::radio::V1_6::Call>& calls);
835 
836     Return<void> getSlicingConfigResponse(
837             const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
838             const ::android::hardware::radio::V1_6::SlicingConfig& slicingConfig);
839 
840     Return<void> getSimPhonebookRecordsResponse(
841             const ::android::hardware::radio::V1_6::RadioResponseInfo& info);
842 
843     Return<void> getSimPhonebookCapacityResponse(
844             const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
845             const ::android::hardware::radio::V1_6::PhonebookCapacity& capacity);
846 
847     Return<void> updateSimPhonebookRecordsResponse(
848             const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
849             int32_t updatedRecordIndex);
850 };
851 
852 /* Callback class for radio indication */
853 class RadioIndication_v1_6 : public ::android::hardware::radio::V1_6::IRadioIndication {
854   protected:
855     RadioHidlTest_v1_6& parent_v1_6;
856 
857   public:
858     RadioIndication_v1_6(RadioHidlTest_v1_6& parent_v1_6);
859     virtual ~RadioIndication_v1_6() = default;
860 
861     /* 1.6 Api */
862     Return<void> dataCallListChanged_1_6(
863             RadioIndicationType type,
864             const hidl_vec<::android::hardware::radio::V1_6::SetupDataCallResult>& dcList);
865 
866     Return<void> unthrottleApn(RadioIndicationType type,
867                                const ::android::hardware::hidl_string& apn);
868 
869     Return<void> currentSignalStrength_1_6(
870             RadioIndicationType type,
871             const ::android::hardware::radio::V1_6::SignalStrength& signalStrength);
872 
873     Return<void> networkScanResult_1_6(
874             RadioIndicationType type,
875             const ::android::hardware::radio::V1_6::NetworkScanResult& result);
876 
877     Return<void> cellInfoList_1_6(
878             RadioIndicationType type,
879             const ::android::hardware::hidl_vec<::android::hardware::radio::V1_6::CellInfo>&
880                     records);
881 
882     Return<void> currentPhysicalChannelConfigs_1_6(
883             RadioIndicationType type,
884             const ::android::hardware::hidl_vec<
885                     ::android::hardware::radio::V1_6::PhysicalChannelConfig>& configs);
886 
887     /* 1.5 Api */
888     Return<void> uiccApplicationsEnablementChanged(RadioIndicationType type, bool enabled);
889 
890     Return<void> networkScanResult_1_5(
891             RadioIndicationType type,
892             const ::android::hardware::radio::V1_5::NetworkScanResult& result);
893 
894     Return<void> cellInfoList_1_5(
895             RadioIndicationType type,
896             const ::android::hardware::hidl_vec<::android::hardware::radio::V1_5::CellInfo>&
897                     records);
898 
899     Return<void> dataCallListChanged_1_5(
900             RadioIndicationType type,
901             const hidl_vec<::android::hardware::radio::V1_5::SetupDataCallResult>& dcList);
902 
903     /* 1.4 Api */
904     Return<void> currentEmergencyNumberList(
905             RadioIndicationType type,
906             const ::android::hardware::hidl_vec<EmergencyNumber>& emergencyNumberList);
907 
908     Return<void> cellInfoList_1_4(
909             RadioIndicationType type,
910             const ::android::hardware::hidl_vec<::android::hardware::radio::V1_4::CellInfo>&
911                     records);
912 
913     Return<void> networkScanResult_1_4(
914             RadioIndicationType type,
915             const ::android::hardware::radio::V1_4::NetworkScanResult& result);
916 
917     Return<void> currentPhysicalChannelConfigs_1_4(
918             RadioIndicationType type,
919             const ::android::hardware::hidl_vec<
920                     ::android::hardware::radio::V1_4::PhysicalChannelConfig>& configs);
921 
922     Return<void> dataCallListChanged_1_4(
923             RadioIndicationType type,
924             const ::android::hardware::hidl_vec<
925                     android::hardware::radio::V1_4::SetupDataCallResult>& dcList);
926 
927     /* 1.2 Api */
928     Return<void> networkScanResult_1_2(
929             RadioIndicationType type,
930             const ::android::hardware::radio::V1_2::NetworkScanResult& result);
931 
932     Return<void> cellInfoList_1_2(
933             RadioIndicationType type,
934             const ::android::hardware::hidl_vec<::android::hardware::radio::V1_2::CellInfo>&
935                     records);
936 
937     Return<void> currentLinkCapacityEstimate(
938             RadioIndicationType type,
939             const ::android::hardware::radio::V1_2::LinkCapacityEstimate& lce);
940 
941     Return<void> currentLinkCapacityEstimate_1_6(
942             RadioIndicationType type,
943             const ::android::hardware::radio::V1_6::LinkCapacityEstimate& lce);
944 
945     Return<void> currentPhysicalChannelConfigs(
946             RadioIndicationType type,
947             const ::android::hardware::hidl_vec<
948                     ::android::hardware::radio::V1_2::PhysicalChannelConfig>& configs);
949 
950     Return<void> currentSignalStrength_1_2(
951             RadioIndicationType type,
952             const ::android::hardware::radio::V1_2::SignalStrength& signalStrength);
953 
954     Return<void> currentSignalStrength_1_4(
955             RadioIndicationType type,
956             const ::android::hardware::radio::V1_4::SignalStrength& signalStrength);
957 
958     /* 1.1 Api */
959     Return<void> carrierInfoForImsiEncryption(RadioIndicationType info);
960 
961     Return<void> networkScanResult(
962             RadioIndicationType type,
963             const ::android::hardware::radio::V1_1::NetworkScanResult& result);
964 
965     Return<void> keepaliveStatus(RadioIndicationType type, const KeepaliveStatus& status);
966 
967     /* 1.0 Api */
968     Return<void> radioStateChanged(RadioIndicationType type, RadioState radioState);
969 
970     Return<void> callStateChanged(RadioIndicationType type);
971 
972     Return<void> networkStateChanged(RadioIndicationType type);
973 
974     Return<void> newSms(RadioIndicationType type,
975                         const ::android::hardware::hidl_vec<uint8_t>& pdu);
976 
977     Return<void> newSmsStatusReport(RadioIndicationType type,
978                                     const ::android::hardware::hidl_vec<uint8_t>& pdu);
979 
980     Return<void> newSmsOnSim(RadioIndicationType type, int32_t recordNumber);
981 
982     Return<void> onUssd(RadioIndicationType type, UssdModeType modeType,
983                         const ::android::hardware::hidl_string& msg);
984 
985     Return<void> nitzTimeReceived(RadioIndicationType type,
986                                   const ::android::hardware::hidl_string& nitzTime,
987                                   uint64_t receivedTime);
988 
989     Return<void> currentSignalStrength(
990             RadioIndicationType type,
991             const ::android::hardware::radio::V1_0::SignalStrength& signalStrength);
992 
993     Return<void> dataCallListChanged(
994             RadioIndicationType type,
995             const ::android::hardware::hidl_vec<
996                     android::hardware::radio::V1_0::SetupDataCallResult>& dcList);
997 
998     Return<void> suppSvcNotify(RadioIndicationType type, const SuppSvcNotification& suppSvc);
999 
1000     Return<void> stkSessionEnd(RadioIndicationType type);
1001 
1002     Return<void> stkProactiveCommand(RadioIndicationType type,
1003                                      const ::android::hardware::hidl_string& cmd);
1004 
1005     Return<void> stkEventNotify(RadioIndicationType type,
1006                                 const ::android::hardware::hidl_string& cmd);
1007 
1008     Return<void> stkCallSetup(RadioIndicationType type, int64_t timeout);
1009 
1010     Return<void> simSmsStorageFull(RadioIndicationType type);
1011 
1012     Return<void> simRefresh(RadioIndicationType type, const SimRefreshResult& refreshResult);
1013 
1014     Return<void> callRing(RadioIndicationType type, bool isGsm, const CdmaSignalInfoRecord& record);
1015 
1016     Return<void> simStatusChanged(RadioIndicationType type);
1017 
1018     Return<void> cdmaNewSms(RadioIndicationType type, const CdmaSmsMessage& msg);
1019 
1020     Return<void> newBroadcastSms(RadioIndicationType type,
1021                                  const ::android::hardware::hidl_vec<uint8_t>& data);
1022 
1023     Return<void> cdmaRuimSmsStorageFull(RadioIndicationType type);
1024 
1025     Return<void> restrictedStateChanged(RadioIndicationType type, PhoneRestrictedState state);
1026 
1027     Return<void> enterEmergencyCallbackMode(RadioIndicationType type);
1028 
1029     Return<void> cdmaCallWaiting(RadioIndicationType type,
1030                                  const CdmaCallWaiting& callWaitingRecord);
1031 
1032     Return<void> cdmaOtaProvisionStatus(RadioIndicationType type, CdmaOtaProvisionStatus status);
1033 
1034     Return<void> cdmaInfoRec(RadioIndicationType type, const CdmaInformationRecords& records);
1035 
1036     Return<void> indicateRingbackTone(RadioIndicationType type, bool start);
1037 
1038     Return<void> resendIncallMute(RadioIndicationType type);
1039 
1040     Return<void> cdmaSubscriptionSourceChanged(RadioIndicationType type,
1041                                                CdmaSubscriptionSource cdmaSource);
1042 
1043     Return<void> cdmaPrlChanged(RadioIndicationType type, int32_t version);
1044 
1045     Return<void> exitEmergencyCallbackMode(RadioIndicationType type);
1046 
1047     Return<void> rilConnected(RadioIndicationType type);
1048 
1049     Return<void> voiceRadioTechChanged(RadioIndicationType type,
1050                                        ::android::hardware::radio::V1_0::RadioTechnology rat);
1051 
1052     Return<void> cellInfoList(
1053             RadioIndicationType type,
1054             const ::android::hardware::hidl_vec<::android::hardware::radio::V1_0::CellInfo>&
1055                     records);
1056 
1057     Return<void> imsNetworkStateChanged(RadioIndicationType type);
1058 
1059     Return<void> subscriptionStatusChanged(RadioIndicationType type, bool activate);
1060 
1061     Return<void> srvccStateNotify(RadioIndicationType type, SrvccState state);
1062 
1063     Return<void> hardwareConfigChanged(
1064             RadioIndicationType type, const ::android::hardware::hidl_vec<HardwareConfig>& configs);
1065 
1066     Return<void> radioCapabilityIndication(
1067             RadioIndicationType type, const android::hardware::radio::V1_0::RadioCapability& rc);
1068 
1069     Return<void> onSupplementaryServiceIndication(RadioIndicationType type,
1070                                                   const StkCcUnsolSsResult& ss);
1071 
1072     Return<void> stkCallControlAlphaNotify(RadioIndicationType type,
1073                                            const ::android::hardware::hidl_string& alpha);
1074 
1075     Return<void> lceData(RadioIndicationType type, const LceDataInfo& lce);
1076 
1077     Return<void> pcoData(RadioIndicationType type, const PcoDataInfo& pco);
1078 
1079     Return<void> modemReset(RadioIndicationType type,
1080                             const ::android::hardware::hidl_string& reason);
1081 
1082     Return<void> registrationFailed(
1083             RadioIndicationType type,
1084             const ::android::hardware::radio::V1_5::CellIdentity& cellIdentity,
1085             const ::android::hardware::hidl_string& chosenPlmn,
1086             ::android::hardware::hidl_bitfield<::android::hardware::radio::V1_5::Domain> domain,
1087             int32_t causeCode, int32_t additionalCauseCode);
1088 
1089     Return<void> barringInfoChanged(
1090             RadioIndicationType /*type*/,
1091             const ::android::hardware::radio::V1_5::CellIdentity& /*cellIdentity*/,
1092             const ::android::hardware::hidl_vec<::android::hardware::radio::V1_5::BarringInfo>&
1093             /*barringInfos*/);
1094 
1095     Return<void> simPhonebookChanged(RadioIndicationType type);
1096 
1097     Return<void> simPhonebookRecordsReceived(
1098             RadioIndicationType type,
1099             ::android::hardware::radio::V1_6::PbReceivedStatus status,
1100             const ::android::hardware::hidl_vec<::android::hardware::radio::V1_6::PhonebookRecordInfo>&
1101                     records);
1102 };
1103 
1104 // The main test class for Radio HIDL.
1105 class RadioHidlTest_v1_6 : public ::testing::TestWithParam<std::string>,
1106                            public RadioResponseWaiter {
1107   protected:
1108     /* Clear Potential Established Calls */
1109     void clearPotentialEstablishedCalls();
1110 
1111     /* Update Sim Card Status */
1112     void updateSimCardStatus();
1113 
1114     /* Get current data call list */
1115     void getDataCallList();
1116 
1117   public:
1118     virtual void SetUp() override;
1119 
1120     bool getRadioHalCapabilities();
1121 
1122     /* radio service handle */
1123     sp<::android::hardware::radio::V1_6::IRadio> radio_v1_6;
1124 
1125     /* radio response handle */
1126     sp<RadioResponse_v1_6> radioRsp_v1_6;
1127 
1128     /* radio indication handle */
1129     sp<RadioIndication_v1_6> radioInd_v1_6;
1130 };
1131