1 /*
2 * Copyright (C) 2022-2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 #include "ril_callback_test.h"
17
18 #include "telephony_log_wrapper.h"
19
20 namespace OHOS {
21 namespace Telephony {
22 using namespace OHOS::HDI::Ril::V1_4;
NotifyAll()23 void RilCallbackTest::NotifyAll()
24 {
25 std::unique_lock<std::mutex> callbackLock(callbackMutex_);
26 if (resultInfo_.serial != currentSerialId_) {
27 hdiId_ = HdiId::HREQ_NONE;
28 TELEPHONY_LOGI("NotifyAll currentSerialId_ : %{public}d, serial: %{public}d not equal", currentSerialId_,
29 resultInfo_.serial);
30 return;
31 }
32 cv_.notify_all();
33 }
34
WaitFor(int32_t timeoutSecond)35 void RilCallbackTest::WaitFor(int32_t timeoutSecond)
36 {
37 Clean();
38 std::unique_lock<std::mutex> callbackLock(callbackMutex_);
39 cv_.wait_for(callbackLock, std::chrono::seconds(timeoutSecond));
40 }
41
Clean()42 void RilCallbackTest::Clean()
43 {
44 hdiId_ = HdiId::HREQ_NONE;
45 }
46
GetBoolResult(HdiId hdiId)47 bool RilCallbackTest::GetBoolResult(HdiId hdiId)
48 {
49 TELEPHONY_LOGI("GetBoolResult hdiId: %{public}d, error: %{public}d", hdiId, (int32_t)resultInfo_.error);
50 bool ret = false;
51 if (hdiId_ == HdiId::HREQ_NONE) {
52 TELEPHONY_LOGE(
53 "response timeout, not implemented hdiId: %{public}d, current hdiId_: %{public}d", (int32_t)hdiId, hdiId_);
54 ret = true;
55 Clean();
56 return ret;
57 }
58 if (hdiId_ != hdiId) {
59 ret = false;
60 TELEPHONY_LOGE(
61 "GetBoolResult hdiId does not match. hdiId: %{public}d, current hdiId: %{public}d", (int32_t)hdiId, hdiId_);
62 Clean();
63 return ret;
64 }
65 ret = true;
66 Clean();
67 return ret;
68 }
69
70 // SIM
SimStateUpdated(const RilRadioResponseInfo & responseInfo)71 int32_t RilCallbackTest::SimStateUpdated(const RilRadioResponseInfo &responseInfo)
72 {
73 TELEPHONY_LOGI("SimStateUpdated notice : slotId = %{public}d", responseInfo.slotId);
74 auto g_rilInterface = OHOS::HDI::Ril::V1_2::IRil::Get();
75 if (g_rilInterface != nullptr) {
76 g_rilInterface->GetSimStatus(GetSerialId(), responseInfo.slotId);
77 }
78 return 0;
79 }
80
SimStkSessionEndNotify(const RilRadioResponseInfo & responseInfo)81 int32_t RilCallbackTest::SimStkSessionEndNotify(const RilRadioResponseInfo &responseInfo)
82 {
83 TELEPHONY_LOGI("SimStkSessionEndNotify notice : slotId = %{public}d", responseInfo.slotId);
84 return 0;
85 }
86
SimStkProactiveNotify(const RilRadioResponseInfo & responseInfo,const std::string & response)87 int32_t RilCallbackTest::SimStkProactiveNotify(const RilRadioResponseInfo &responseInfo, const std::string &response)
88 {
89 TELEPHONY_LOGI("SimStkProactiveNotify notice : slotId = %{public}d, response = %{public}s", responseInfo.slotId,
90 response.c_str());
91 return 0;
92 }
93
SimStkAlphaNotify(const RilRadioResponseInfo & responseInfo,const std::string & response)94 int32_t RilCallbackTest::SimStkAlphaNotify(const RilRadioResponseInfo &responseInfo, const std::string &response)
95 {
96 TELEPHONY_LOGI(
97 "SimStkAlphaNotify notice : slotId = %{public}d, response = %{public}s", responseInfo.slotId, response.c_str());
98 return 0;
99 }
100
SimStkEventNotify(const RilRadioResponseInfo & responseInfo,const std::string & response)101 int32_t RilCallbackTest::SimStkEventNotify(const RilRadioResponseInfo &responseInfo, const std::string &response)
102 {
103 TELEPHONY_LOGI(
104 "SimStkEventNotify notice : slotId = %{public}d, response = %{public}s", responseInfo.slotId, response.c_str());
105 return 0;
106 }
107
SimStkCallSetupNotify(const RilRadioResponseInfo & responseInfo)108 int32_t RilCallbackTest::SimStkCallSetupNotify(const RilRadioResponseInfo &responseInfo)
109 {
110 TELEPHONY_LOGI("SimStkCallSetupNotify notice : slotId = %{public}d", responseInfo.slotId);
111 return 0;
112 }
113
SimRefreshNotify(const RilRadioResponseInfo & responseInfo)114 int32_t RilCallbackTest::SimRefreshNotify(const RilRadioResponseInfo &responseInfo)
115 {
116 TELEPHONY_LOGI("SimRefreshNotify notice : slotId = %{public}d", responseInfo.slotId);
117 return 0;
118 }
119
GetSimStatusResponse(const HDI::Ril::V1_1::RilRadioResponseInfo & responseInfo,const HDI::Ril::V1_1::CardStatusInfo & result)120 int32_t RilCallbackTest::GetSimStatusResponse(
121 const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo, const HDI::Ril::V1_1::CardStatusInfo &result)
122 {
123 TELEPHONY_LOGI(
124 "GetBoolResult GetSimStatus result : slotId = %{public}d, simType = %{public}d, simState = %{public}d",
125 responseInfo.slotId, result.simType, result.simState);
126 simState_[responseInfo.slotId] = result.simState;
127 TELEPHONY_LOGI("IsReady %{public}d %{public}d", responseInfo.slotId, simState_[responseInfo.slotId]);
128 hdiId_ = HdiId::HREQ_SIM_GET_SIM_STATUS;
129 resultInfo_ = responseInfo;
130 NotifyAll();
131 return 0;
132 }
133
GetSimCardStatusResponse(const HDI::Ril::V1_1::RilRadioResponseInfo & responseInfo,const HDI::Ril::V1_3::SimCardStatusInfo & result)134 int32_t RilCallbackTest::GetSimCardStatusResponse(const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo,
135 const HDI::Ril::V1_3::SimCardStatusInfo &result)
136 {
137 TELEPHONY_LOGI("GetBoolResult GetSimCardStatus result : slotId = %{public}d, simType = %{public}d,"
138 "simState = %{public}d", responseInfo.slotId, result.simType, result.simState);
139 simState_[responseInfo.slotId] = result.simState;
140 TELEPHONY_LOGI("IsReady %{public}d %{public}d", responseInfo.slotId, simState_[responseInfo.slotId]);
141 hdiId_ = HdiId::HREQ_SIM_GET_SIM_STATUS;
142 resultInfo_ = responseInfo;
143 NotifyAll();
144 return 0;
145 }
146
GetSimIOResponse(const RilRadioResponseInfo & responseInfo,const IccIoResultInfo & result)147 int32_t RilCallbackTest::GetSimIOResponse(const RilRadioResponseInfo &responseInfo, const IccIoResultInfo &result)
148 {
149 TELEPHONY_LOGI("GetBoolResult GetSimIO result : sw1 = %{public}d, sw2 = %{public}d, response = %{public}s",
150 result.sw1, result.sw2, result.response.c_str());
151 hdiId_ = HdiId::HREQ_SIM_GET_SIM_IO;
152 resultInfo_ = responseInfo;
153 NotifyAll();
154 return 0;
155 }
156
GetImsiResponse(const RilRadioResponseInfo & responseInfo,const std::string & response)157 int32_t RilCallbackTest::GetImsiResponse(const RilRadioResponseInfo &responseInfo, const std::string &response)
158 {
159 TELEPHONY_LOGI("GetBoolResult GetImsi result : response = %{public}s", response.c_str());
160 hdiId_ = HdiId::HREQ_SIM_GET_IMSI;
161 resultInfo_ = responseInfo;
162 NotifyAll();
163 return 0;
164 }
165
GetSimLockStatusResponse(const RilRadioResponseInfo & responseInfo,int32_t simLockStatus)166 int32_t RilCallbackTest::GetSimLockStatusResponse(const RilRadioResponseInfo &responseInfo, int32_t simLockStatus)
167 {
168 TELEPHONY_LOGI("GetBoolResult GetSimLockStatus result : simLockStatus = %{public}d", simLockStatus);
169 hdiId_ = HdiId::HREQ_SIM_GET_SIM_LOCK_STATUS;
170 resultInfo_ = responseInfo;
171 NotifyAll();
172 return 0;
173 }
174
SetSimLockResponse(const RilRadioResponseInfo & responseInfo,const LockStatusResp & lockStatus)175 int32_t RilCallbackTest::SetSimLockResponse(const RilRadioResponseInfo &responseInfo, const LockStatusResp &lockStatus)
176 {
177 TELEPHONY_LOGI("GetBoolResult SetSimLock result : result = %{public}d, remain = %{public}d", lockStatus.result,
178 lockStatus.remain);
179 hdiId_ = HdiId::HREQ_SIM_SET_SIM_LOCK;
180 resultInfo_ = responseInfo;
181 NotifyAll();
182 return 0;
183 }
184
ChangeSimPasswordResponse(const RilRadioResponseInfo & responseInfo,const LockStatusResp & lockStatus)185 int32_t RilCallbackTest::ChangeSimPasswordResponse(
186 const RilRadioResponseInfo &responseInfo, const LockStatusResp &lockStatus)
187 {
188 TELEPHONY_LOGI("GetBoolResult ChangeSimPassword result : result = %{public}d, remain = %{public}d",
189 lockStatus.result, lockStatus.remain);
190 hdiId_ = HdiId::HREQ_SIM_CHANGE_SIM_PASSWORD;
191 resultInfo_ = responseInfo;
192 NotifyAll();
193 return 0;
194 }
195
UnlockPinResponse(const RilRadioResponseInfo & responseInfo,const LockStatusResp & lockStatus)196 int32_t RilCallbackTest::UnlockPinResponse(const RilRadioResponseInfo &responseInfo, const LockStatusResp &lockStatus)
197 {
198 TELEPHONY_LOGI("GetBoolResult UnlockPin result : result = %{public}d, remain = %{public}d", lockStatus.result,
199 lockStatus.remain);
200 hdiId_ = HdiId::HREQ_SIM_UNLOCK_PIN;
201 resultInfo_ = responseInfo;
202 NotifyAll();
203 return 0;
204 }
205
UnlockPukResponse(const RilRadioResponseInfo & responseInfo,const LockStatusResp & lockStatus)206 int32_t RilCallbackTest::UnlockPukResponse(const RilRadioResponseInfo &responseInfo, const LockStatusResp &lockStatus)
207 {
208 TELEPHONY_LOGI("GetBoolResult UnlockPuk result : result = %{public}d, remain = %{public}d", lockStatus.result,
209 lockStatus.remain);
210 hdiId_ = HdiId::HREQ_SIM_UNLOCK_PUK;
211 resultInfo_ = responseInfo;
212 NotifyAll();
213 return 0;
214 }
215
UnlockPin2Response(const RilRadioResponseInfo & responseInfo,const LockStatusResp & lockStatus)216 int32_t RilCallbackTest::UnlockPin2Response(const RilRadioResponseInfo &responseInfo, const LockStatusResp &lockStatus)
217 {
218 TELEPHONY_LOGI("GetBoolResult UnlockPin2 result : result = %{public}d, remain = %{public}d", lockStatus.result,
219 lockStatus.remain);
220 hdiId_ = HdiId::HREQ_SIM_UNLOCK_PIN2;
221 resultInfo_ = responseInfo;
222 NotifyAll();
223 return 0;
224 }
225
UnlockPuk2Response(const RilRadioResponseInfo & responseInfo,const LockStatusResp & lockStatus)226 int32_t RilCallbackTest::UnlockPuk2Response(const RilRadioResponseInfo &responseInfo, const LockStatusResp &lockStatus)
227 {
228 TELEPHONY_LOGI("GetBoolResult UnlockPuk2 result : result = %{public}d, remain = %{public}d", lockStatus.result,
229 lockStatus.remain);
230 hdiId_ = HdiId::HREQ_SIM_UNLOCK_PUK2;
231 resultInfo_ = responseInfo;
232 NotifyAll();
233 return 0;
234 }
235
SetActiveSimResponse(const RilRadioResponseInfo & responseInfo)236 int32_t RilCallbackTest::SetActiveSimResponse(const RilRadioResponseInfo &responseInfo)
237 {
238 TELEPHONY_LOGI("GetBoolResult SetActiveSim result");
239 hdiId_ = HdiId::HREQ_SIM_SET_ACTIVE_SIM;
240 resultInfo_ = responseInfo;
241 NotifyAll();
242 return 0;
243 }
244
SimStkSendTerminalResponseResponse(const RilRadioResponseInfo & responseInfo)245 int32_t RilCallbackTest::SimStkSendTerminalResponseResponse(const RilRadioResponseInfo &responseInfo)
246 {
247 TELEPHONY_LOGI("GetBoolResult SimStkSendTerminalResponse result");
248 hdiId_ = HdiId::HREQ_SIM_STK_SEND_TERMINAL_RESPONSE;
249 resultInfo_ = responseInfo;
250 NotifyAll();
251 return 0;
252 }
253
SimStkSendEnvelopeResponse(const RilRadioResponseInfo & responseInfo)254 int32_t RilCallbackTest::SimStkSendEnvelopeResponse(const RilRadioResponseInfo &responseInfo)
255 {
256 TELEPHONY_LOGI("GetBoolResult SimStkSendEnvelope result");
257 hdiId_ = HdiId::HREQ_SIM_STK_SEND_ENVELOPE;
258 resultInfo_ = responseInfo;
259 NotifyAll();
260 return 0;
261 }
262
SimStkSendCallSetupRequestResultResponse(const RilRadioResponseInfo & responseInfo)263 int32_t RilCallbackTest::SimStkSendCallSetupRequestResultResponse(const RilRadioResponseInfo &responseInfo)
264 {
265 TELEPHONY_LOGI("GetBoolResult SimStkSendCallSetupRequestResult result");
266 hdiId_ = HdiId::HREQ_SIM_STK_SEND_CALL_SETUP_REQUEST_RESULT;
267 resultInfo_ = responseInfo;
268 NotifyAll();
269 return 0;
270 }
271
SimStkIsReadyResponse(const RilRadioResponseInfo & responseInfo)272 int32_t RilCallbackTest::SimStkIsReadyResponse(const RilRadioResponseInfo &responseInfo)
273 {
274 TELEPHONY_LOGI("GetBoolResult SimStkIsReady result");
275 hdiId_ = HdiId::HREQ_SIM_STK_IS_READY;
276 resultInfo_ = responseInfo;
277 NotifyAll();
278 return 0;
279 }
280
SetRadioProtocolResponse(const RilRadioResponseInfo & responseInfo,const RadioProtocol & radioProtocol)281 int32_t RilCallbackTest::SetRadioProtocolResponse(
282 const RilRadioResponseInfo &responseInfo, const RadioProtocol &radioProtocol)
283 {
284 TELEPHONY_LOGI("GetBoolResult SetRadioProtocol result : phase = %{public}d, slotId = %{public}d",
285 radioProtocol.phase, radioProtocol.slotId);
286 hdiId_ = HdiId::HREQ_SIM_RADIO_PROTOCOL;
287 resultInfo_ = responseInfo;
288 NotifyAll();
289 return 0;
290 }
291
SimOpenLogicalChannelResponse(const RilRadioResponseInfo & responseInfo,const OpenLogicalChannelResponse & pOpenLogicalChannelResponse)292 int32_t RilCallbackTest::SimOpenLogicalChannelResponse(
293 const RilRadioResponseInfo &responseInfo, const OpenLogicalChannelResponse &pOpenLogicalChannelResponse)
294 {
295 TELEPHONY_LOGI(
296 "GetBoolResult SimOpenLogicalChannel result : sw1 = %{public}d, sw2 = %{public}d, channelId = %{public}d, "
297 "response = %{public}s",
298 pOpenLogicalChannelResponse.sw1, pOpenLogicalChannelResponse.sw2, pOpenLogicalChannelResponse.channelId,
299 pOpenLogicalChannelResponse.response.c_str());
300 currentChannelId_ = pOpenLogicalChannelResponse.channelId;
301 hdiId_ = HdiId::HREQ_SIM_OPEN_LOGICAL_CHANNEL;
302 resultInfo_ = responseInfo;
303 NotifyAll();
304 return 0;
305 }
306
SimCloseLogicalChannelResponse(const RilRadioResponseInfo & responseInfo)307 int32_t RilCallbackTest::SimCloseLogicalChannelResponse(const RilRadioResponseInfo &responseInfo)
308 {
309 TELEPHONY_LOGI("GetBoolResult SimCloseLogicalChannel result");
310 hdiId_ = HdiId::HREQ_SIM_CLOSE_LOGICAL_CHANNEL;
311 resultInfo_ = responseInfo;
312 NotifyAll();
313 return 0;
314 }
315
SimTransmitApduLogicalChannelResponse(const RilRadioResponseInfo & responseInfo,const IccIoResultInfo & result)316 int32_t RilCallbackTest::SimTransmitApduLogicalChannelResponse(
317 const RilRadioResponseInfo &responseInfo, const IccIoResultInfo &result)
318 {
319 TELEPHONY_LOGI(
320 "GetBoolResult SimTransmitApduLogicalChannel result : sw1 = %{public}d, sw2 = %{public}d, response = "
321 "%{public}s",
322 result.sw1, result.sw2, result.response.c_str());
323 hdiId_ = HdiId::HREQ_SIM_TRANSMIT_APDU_LOGICAL_CHANNEL;
324 resultInfo_ = responseInfo;
325 NotifyAll();
326 return 0;
327 }
328
SimTransmitApduBasicChannelResponse(const RilRadioResponseInfo & responseInfo,const IccIoResultInfo & result)329 int32_t RilCallbackTest::SimTransmitApduBasicChannelResponse(
330 const RilRadioResponseInfo &responseInfo, const IccIoResultInfo &result)
331 {
332 TELEPHONY_LOGI(
333 "GetBoolResult SimTransmitApduBasicChannel result : sw1 = %{public}d, sw2 = %{public}d, response = %{public}s",
334 result.sw1, result.sw2, result.response.c_str());
335 hdiId_ = HdiId::HREQ_SIM_TRANSMIT_APDU_BASIC_CHANNEL;
336 resultInfo_ = responseInfo;
337 NotifyAll();
338 return 0;
339 }
340
SimAuthenticationResponse(const RilRadioResponseInfo & responseInfo,const IccIoResultInfo & result)341 int32_t RilCallbackTest::SimAuthenticationResponse(
342 const RilRadioResponseInfo &responseInfo, const IccIoResultInfo &result)
343 {
344 TELEPHONY_LOGI("GetBoolResult SimAuthentication result : sw1 = %{public}d, sw2 = %{public}d, response = %{public}s",
345 result.sw1, result.sw2, result.response.c_str());
346 hdiId_ = HdiId::HREQ_SIM_AUTHENTICATION;
347 resultInfo_ = responseInfo;
348 NotifyAll();
349 return 0;
350 }
351
UnlockSimLockResponse(const RilRadioResponseInfo & responseInfo,const LockStatusResp & lockStatus)352 int32_t RilCallbackTest::UnlockSimLockResponse(
353 const RilRadioResponseInfo &responseInfo, const LockStatusResp &lockStatus)
354 {
355 TELEPHONY_LOGI("GetBoolResult UnlockSimLock result : result = %{public}d, remain = %{public}d", lockStatus.result,
356 lockStatus.remain);
357 hdiId_ = HdiId::HREQ_SIM_UNLOCK_SIM_LOCK;
358 resultInfo_ = responseInfo;
359 NotifyAll();
360 return 0;
361 }
362
SendSimMatchedOperatorInfoResponse(const HDI::Ril::V1_1::RilRadioResponseInfo & responseInfo)363 int32_t RilCallbackTest::SendSimMatchedOperatorInfoResponse(const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo)
364 {
365 TELEPHONY_LOGI("GetBoolResult SendSimMatchedOperatorInfo result");
366 hdiId_ = HdiId::HREQ_SIM_SEND_NCFG_OPER_INFO;
367 resultInfo_ = responseInfo;
368 NotifyAll();
369 return 0;
370 }
371
372 // Network
NetworkCsRegStatusUpdated(const RilRadioResponseInfo & responseInfo,const CsRegStatusInfo & csRegStatusInfo)373 int32_t RilCallbackTest::NetworkCsRegStatusUpdated(
374 const RilRadioResponseInfo &responseInfo, const CsRegStatusInfo &csRegStatusInfo)
375 {
376 TELEPHONY_LOGI("RilCallbackTest::NetworkCsRegStatusUpdated notifyType:%{public}d, regStatus:%{public}d, "
377 "lacCode:%{public}d, cellId:%{public}d, radioTechnology:%{public}d",
378 csRegStatusInfo.notifyType, csRegStatusInfo.regStatus, csRegStatusInfo.lacCode, csRegStatusInfo.cellId,
379 csRegStatusInfo.radioTechnology);
380 return 0;
381 }
382
NetworkPsRegStatusUpdated(const RilRadioResponseInfo & responseInfo,const PsRegStatusInfo & psRegStatusInfo)383 int32_t RilCallbackTest::NetworkPsRegStatusUpdated(
384 const RilRadioResponseInfo &responseInfo, const PsRegStatusInfo &psRegStatusInfo)
385 {
386 TELEPHONY_LOGI(
387 "RilCallbackTest::NetworkPsRegStatusUpdated notifyType:%{public}d, regStatus:%{public}d, lacCode:%{public}d, "
388 "cellId:%{public}d, tech:%{public}d, nrRestricted:%{public}d, nrAvailable:%{public}d, enDcAvailable:%{public}d",
389 psRegStatusInfo.notifyType, psRegStatusInfo.regStatus, psRegStatusInfo.lacCode, psRegStatusInfo.cellId,
390 psRegStatusInfo.radioTechnology, psRegStatusInfo.isDcNrRestricted, psRegStatusInfo.isNrAvailable,
391 psRegStatusInfo.isEnDcAvailable);
392 return 0;
393 }
394
SignalStrengthUpdated(const RilRadioResponseInfo & responseInfo,const Rssi & rssi)395 int32_t RilCallbackTest::SignalStrengthUpdated(const RilRadioResponseInfo &responseInfo, const Rssi &rssi)
396 {
397 TELEPHONY_LOGI(
398 "RilCallbackTest::SignalStrengthUpdated rxlev:%{public}d rsrp:%{public}d", rssi.lte.rxlev, rssi.lte.rsrp);
399 return 0;
400 }
401
NetworkTimeZoneUpdated(const RilRadioResponseInfo & responseInfo,const std::string & timeZoneStr)402 int32_t RilCallbackTest::NetworkTimeZoneUpdated(
403 const RilRadioResponseInfo &responseInfo, const std::string &timeZoneStr)
404 {
405 TELEPHONY_LOGI("RilCallbackTest::NetworkTimeZoneUpdated timeZone:%{public}s", timeZoneStr.c_str());
406 return 0;
407 }
408
NetworkTimeUpdated(const RilRadioResponseInfo & responseInfo,const std::string & timeStr)409 int32_t RilCallbackTest::NetworkTimeUpdated(const RilRadioResponseInfo &responseInfo, const std::string &timeStr)
410 {
411 TELEPHONY_LOGI("RilCallbackTest::NetworkTimeZoneUpdated time:%{public}s", timeStr.c_str());
412 return 0;
413 }
414
NetworkPhyChnlCfgUpdated(const RilRadioResponseInfo & responseInfo,const ChannelConfigInfoList & channelConfigInfoList)415 int32_t RilCallbackTest::NetworkPhyChnlCfgUpdated(
416 const RilRadioResponseInfo &responseInfo, const ChannelConfigInfoList &channelConfigInfoList)
417 {
418 TELEPHONY_LOGI("RilCallbackTest::NetworkPhyChnlCfgUpdated itemNum:%{public}d", channelConfigInfoList.itemNum);
419 for (PhysicalChannelConfig phyChnlCfg : channelConfigInfoList.channelConfigInfos) {
420 TELEPHONY_LOGI(
421 "RilCallbackTest::NetworkPhyChnlCfgUpdated cellConnStatus:%{public}d, "
422 "cellBandwidthDownlinkKhz:%{public}d, cellBandwidthUplinkKhz:%{public}d, physicalCellId:%{public}d, "
423 "ratType:%{public}d, freqRange:%{public}d, downlinkChannelNum:%{public}d, "
424 "uplinkChannelNum:%{public}d, contextIdNum:%{public}d",
425 phyChnlCfg.cellConnStatus, phyChnlCfg.cellBandwidthDownlinkKhz, phyChnlCfg.cellBandwidthUplinkKhz,
426 phyChnlCfg.ratType, phyChnlCfg.freqRange, phyChnlCfg.downlinkChannelNum, phyChnlCfg.uplinkChannelNum,
427 phyChnlCfg.physicalCellId, phyChnlCfg.contextIdNum);
428 for (int32_t j = 0; j < phyChnlCfg.contextIdNum; j++) {
429 TELEPHONY_LOGI("contextIds[%{public}d]:%{public}d", j, phyChnlCfg.contextIds[j]);
430 }
431 }
432 return 0;
433 }
434
NetworkCurrentCellUpdated(const RilRadioResponseInfo & responseInfo,const CellListCurrentInfo & cellListCurrentInfo)435 int32_t RilCallbackTest::NetworkCurrentCellUpdated(
436 const RilRadioResponseInfo &responseInfo, const CellListCurrentInfo &cellListCurrentInfo)
437 {
438 TELEPHONY_LOGI("itemNum:%{public}d", cellListCurrentInfo.itemNum);
439 for (auto info : cellListCurrentInfo.cellCurrentInfo) {
440 TELEPHONY_LOGI("ratType:%{public}d, mcc:%{public}d, mnc:%{public}d", info.ratType, info.mcc, info.mnc);
441 switch (static_cast<RatType>(info.ratType)) {
442 case RatType::NETWORK_TYPE_LTE:
443 TELEPHONY_LOGI("cellId:%{public}d", info.serviceCells.lte.cellId);
444 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.lte.arfcn);
445 TELEPHONY_LOGI("pci:%{public}d", info.serviceCells.lte.pci);
446 TELEPHONY_LOGI("rsrp:%{public}d", info.serviceCells.lte.rsrp);
447 TELEPHONY_LOGI("rsrq:%{public}d", info.serviceCells.lte.rsrq);
448 TELEPHONY_LOGI("rxlev:%{public}d", info.serviceCells.lte.rssi);
449 break;
450 case RatType::NETWORK_TYPE_GSM:
451 TELEPHONY_LOGI("band:%{public}d", info.serviceCells.gsm.band);
452 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.gsm.arfcn);
453 TELEPHONY_LOGI("bsic:%{public}d", info.serviceCells.gsm.bsic);
454 TELEPHONY_LOGI("cellId:%{public}d", info.serviceCells.gsm.cellId);
455 TELEPHONY_LOGI("rxlev:%{public}d", info.serviceCells.gsm.rxlev);
456 TELEPHONY_LOGI("lac:%{public}d", info.serviceCells.gsm.lac);
457 break;
458 case RatType::NETWORK_TYPE_WCDMA:
459 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.wcdma.arfcn);
460 TELEPHONY_LOGI("psc:%{public}d", info.serviceCells.wcdma.psc);
461 TELEPHONY_LOGI("rscp:%{public}d", info.serviceCells.wcdma.rscp);
462 TELEPHONY_LOGI("ecno:%{public}d", info.serviceCells.wcdma.ecno);
463 break;
464 case RatType::NETWORK_TYPE_NR:
465 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.nr.nrArfcn);
466 TELEPHONY_LOGI("psc:%{public}d", info.serviceCells.nr.pci);
467 TELEPHONY_LOGI("rscp:%{public}d", info.serviceCells.nr.tac);
468 TELEPHONY_LOGI("ecno:%{public}d", info.serviceCells.nr.nci);
469 break;
470 default:
471 TELEPHONY_LOGE("invalid ratType");
472 break;
473 }
474 }
475 return 0;
476 }
477
NetworkCurrentCellUpdated_1_1(const RilRadioResponseInfo & responseInfo,const CellListCurrentInfo_1_1 & cellListCurrentInfo)478 int32_t RilCallbackTest::NetworkCurrentCellUpdated_1_1(
479 const RilRadioResponseInfo &responseInfo, const CellListCurrentInfo_1_1 &cellListCurrentInfo)
480 {
481 TELEPHONY_LOGI("itemNum:%{public}d", cellListCurrentInfo.itemNum);
482 for (auto info : cellListCurrentInfo.cellCurrentInfo) {
483 TELEPHONY_LOGI("ratType:%{public}d, mcc:%{public}d, mnc:%{public}d", info.ratType, info.mcc, info.mnc);
484 switch (static_cast<RatType>(info.ratType)) {
485 case RatType::NETWORK_TYPE_LTE:
486 TELEPHONY_LOGI("cellId:%{public}d", info.serviceCells.lte.cellId);
487 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.lte.arfcn);
488 TELEPHONY_LOGI("pci:%{public}d", info.serviceCells.lte.pci);
489 TELEPHONY_LOGI("rsrp:%{public}d", info.serviceCells.lte.rsrp);
490 TELEPHONY_LOGI("rsrq:%{public}d", info.serviceCells.lte.rsrq);
491 TELEPHONY_LOGI("rxlev:%{public}d", info.serviceCells.lte.rssi);
492 break;
493 case RatType::NETWORK_TYPE_GSM:
494 TELEPHONY_LOGI("band:%{public}d", info.serviceCells.gsm.band);
495 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.gsm.arfcn);
496 TELEPHONY_LOGI("bsic:%{public}d", info.serviceCells.gsm.bsic);
497 TELEPHONY_LOGI("cellId:%{public}d", info.serviceCells.gsm.cellId);
498 TELEPHONY_LOGI("rxlev:%{public}d", info.serviceCells.gsm.rxlev);
499 TELEPHONY_LOGI("lac:%{public}d", info.serviceCells.gsm.lac);
500 break;
501 case RatType::NETWORK_TYPE_WCDMA:
502 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.wcdma.arfcn);
503 TELEPHONY_LOGI("psc:%{public}d", info.serviceCells.wcdma.psc);
504 TELEPHONY_LOGI("rscp:%{public}d", info.serviceCells.wcdma.rscp);
505 TELEPHONY_LOGI("ecno:%{public}d", info.serviceCells.wcdma.ecno);
506 break;
507 case RatType::NETWORK_TYPE_NR:
508 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.nr.nrArfcn);
509 TELEPHONY_LOGI("psc:%{public}d", info.serviceCells.nr.pci);
510 TELEPHONY_LOGI("rscp:%{public}d", info.serviceCells.nr.tac);
511 TELEPHONY_LOGI("ecno:%{public}d", info.serviceCells.nr.nci);
512 break;
513 default:
514 TELEPHONY_LOGE("invalid ratType");
515 break;
516 }
517 }
518 return 0;
519 }
520
NetworkCurrentCellUpdated_1_2(const RilRadioResponseInfo & responseInfo,const CellListCurrentInfo_1_2 & cellListCurrentInfo)521 int32_t RilCallbackTest::NetworkCurrentCellUpdated_1_2(
522 const RilRadioResponseInfo &responseInfo, const CellListCurrentInfo_1_2 &cellListCurrentInfo)
523 {
524 TELEPHONY_LOGI("itemNum:%{public}d", cellListCurrentInfo.itemNum);
525 for (auto info : cellListCurrentInfo.cellCurrentInfo) {
526 TELEPHONY_LOGI("ratType:%{public}d, mcc:%{public}d, mnc:%{public}d", info.ratType, info.mcc, info.mnc);
527 switch (static_cast<RatType>(info.ratType)) {
528 case RatType::NETWORK_TYPE_LTE:
529 TELEPHONY_LOGI("cellId:%{public}d", info.serviceCells.lte.cellId);
530 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.lte.arfcn);
531 TELEPHONY_LOGI("pci:%{public}d", info.serviceCells.lte.pci);
532 TELEPHONY_LOGI("rsrp:%{public}d", info.serviceCells.lte.rsrp);
533 TELEPHONY_LOGI("rsrq:%{public}d", info.serviceCells.lte.rsrq);
534 TELEPHONY_LOGI("rxlev:%{public}d", info.serviceCells.lte.rssi);
535 break;
536 case RatType::NETWORK_TYPE_GSM:
537 TELEPHONY_LOGI("band:%{public}d", info.serviceCells.gsm.band);
538 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.gsm.arfcn);
539 TELEPHONY_LOGI("bsic:%{public}d", info.serviceCells.gsm.bsic);
540 TELEPHONY_LOGI("cellId:%{public}d", info.serviceCells.gsm.cellId);
541 TELEPHONY_LOGI("rxlev:%{public}d", info.serviceCells.gsm.rxlev);
542 TELEPHONY_LOGI("lac:%{public}d", info.serviceCells.gsm.lac);
543 break;
544 case RatType::NETWORK_TYPE_WCDMA:
545 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.wcdma.arfcn);
546 TELEPHONY_LOGI("psc:%{public}d", info.serviceCells.wcdma.psc);
547 TELEPHONY_LOGI("rscp:%{public}d", info.serviceCells.wcdma.rscp);
548 TELEPHONY_LOGI("ecno:%{public}d", info.serviceCells.wcdma.ecno);
549 break;
550 case RatType::NETWORK_TYPE_NR:
551 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.nr.nrArfcn);
552 TELEPHONY_LOGI("psc:%{public}d", info.serviceCells.nr.pci);
553 TELEPHONY_LOGI("rscp:%{public}d", info.serviceCells.nr.tac);
554 break;
555 default:
556 TELEPHONY_LOGE("invalid ratType");
557 break;
558 }
559 }
560 return 0;
561 }
562
ResidentNetworkUpdated(const RilRadioResponseInfo & responseInfo,const std::string & plmn)563 int32_t RilCallbackTest::ResidentNetworkUpdated(const RilRadioResponseInfo &responseInfo, const std::string &plmn)
564 {
565 TELEPHONY_LOGI("RilCallbackTest::ResidentNetworkUpdated plmn:%{public}s", plmn.c_str());
566 return 0;
567 }
568
GetSignalStrengthResponse(const RilRadioResponseInfo & responseInfo,const Rssi & rssi)569 int32_t RilCallbackTest::GetSignalStrengthResponse(const RilRadioResponseInfo &responseInfo, const Rssi &rssi)
570 {
571 TELEPHONY_LOGI(
572 "RilCallbackTest::GetSignalStrengthResponse rxlev:%{public}d rsrp:%{public}d", rssi.lte.rxlev, rssi.lte.rsrp);
573 hdiId_ = HdiId::HREQ_NETWORK_GET_SIGNAL_STRENGTH;
574 resultInfo_ = responseInfo;
575 NotifyAll();
576 return 0;
577 }
578
GetCsRegStatusResponse(const RilRadioResponseInfo & responseInfo,const CsRegStatusInfo & csRegStatusInfo)579 int32_t RilCallbackTest::GetCsRegStatusResponse(
580 const RilRadioResponseInfo &responseInfo, const CsRegStatusInfo &csRegStatusInfo)
581 {
582 TELEPHONY_LOGI("RilCallbackTest::GetCsRegStatusResponse notifyType:%{public}d, regStatus:%{public}d, "
583 "lacCode:%{public}d, cellId:%{public}d, radioTechnology:%{public}d",
584 csRegStatusInfo.notifyType, csRegStatusInfo.regStatus, csRegStatusInfo.lacCode, csRegStatusInfo.cellId,
585 csRegStatusInfo.radioTechnology);
586 hdiId_ = HdiId::HREQ_NETWORK_GET_CS_REG_STATUS;
587 resultInfo_ = responseInfo;
588 NotifyAll();
589 return 0;
590 }
591
GetPsRegStatusResponse(const RilRadioResponseInfo & responseInfo,const PsRegStatusInfo & psRegStatusInfo)592 int32_t RilCallbackTest::GetPsRegStatusResponse(
593 const RilRadioResponseInfo &responseInfo, const PsRegStatusInfo &psRegStatusInfo)
594 {
595 TELEPHONY_LOGI(
596 "RilCallbackTest::GetPsRegStatusResponse notifyType:%{public}d, regStatus:%{public}d, lacCode:%{public}d, "
597 "cellId:%{public}d, tech:%{public}d, nrRestricted:%{public}d, nrAvailable:%{public}d, enDcAvailable:%{public}d",
598 psRegStatusInfo.notifyType, psRegStatusInfo.regStatus, psRegStatusInfo.lacCode, psRegStatusInfo.cellId,
599 psRegStatusInfo.radioTechnology, psRegStatusInfo.isDcNrRestricted, psRegStatusInfo.isNrAvailable,
600 psRegStatusInfo.isEnDcAvailable);
601 hdiId_ = HdiId::HREQ_NETWORK_GET_PS_REG_STATUS;
602 resultInfo_ = responseInfo;
603 NotifyAll();
604 return 0;
605 }
606
GetOperatorInfoResponse(const RilRadioResponseInfo & responseInfo,const OperatorInfo & operatorInfo)607 int32_t RilCallbackTest::GetOperatorInfoResponse(
608 const RilRadioResponseInfo &responseInfo, const OperatorInfo &operatorInfo)
609 {
610 TELEPHONY_LOGI(
611 "RilCallbackTest::GetOperatorInfoResponse longName:%{public}s, shortName:%{public}s, numeric:%{public}s",
612 operatorInfo.longName.c_str(), operatorInfo.shortName.c_str(), operatorInfo.numeric.c_str());
613 hdiId_ = HdiId::HREQ_NETWORK_GET_OPERATOR_INFO;
614 resultInfo_ = responseInfo;
615 NotifyAll();
616 return 0;
617 }
618
GetNetworkSearchInformationResponse(const RilRadioResponseInfo & responseInfo,const AvailableNetworkList & availableNetworkList)619 int32_t RilCallbackTest::GetNetworkSearchInformationResponse(
620 const RilRadioResponseInfo &responseInfo, const AvailableNetworkList &availableNetworkList)
621 {
622 TELEPHONY_LOGI(
623 "RilCallbackTest::GetNetworkSearchInformationResponse itemNum:%{public}d", availableNetworkList.itemNum);
624 for (auto availableInfo : availableNetworkList.availableNetworkInfo) {
625 TELEPHONY_LOGI("status:%{public}d", availableInfo.status);
626 TELEPHONY_LOGI("numeric:%{public}s", availableInfo.numeric.c_str());
627 TELEPHONY_LOGI("shortName:%{public}s", availableInfo.shortName.c_str());
628 TELEPHONY_LOGI("longName:%{public}s", availableInfo.longName.c_str());
629 TELEPHONY_LOGI("rat:%{public}d", availableInfo.rat);
630 }
631 hdiId_ = HdiId::HREQ_NETWORK_GET_NETWORK_SEARCH_INFORMATION;
632 resultInfo_ = responseInfo;
633 NotifyAll();
634 return 0;
635 }
636
GetNetworkSelectionModeResponse(const RilRadioResponseInfo & responseInfo,const SetNetworkModeInfo & setNetworkModeInfo)637 int32_t RilCallbackTest::GetNetworkSelectionModeResponse(
638 const RilRadioResponseInfo &responseInfo, const SetNetworkModeInfo &setNetworkModeInfo)
639 {
640 TELEPHONY_LOGI(
641 "RilCallbackTest::GetNetworkSelectionModeResponse selectMode:%{public}d", setNetworkModeInfo.selectMode);
642 hdiId_ = HdiId::HREQ_NETWORK_GET_NETWORK_SELECTION_MODE;
643 resultInfo_ = responseInfo;
644 NotifyAll();
645 return 0;
646 }
647
SetNetworkSelectionModeResponse(const RilRadioResponseInfo & responseInfo)648 int32_t RilCallbackTest::SetNetworkSelectionModeResponse(const RilRadioResponseInfo &responseInfo)
649 {
650 TELEPHONY_LOGI("RilCallbackTest::SetNetworkSelectionModeResponse error:%{public}d", responseInfo.error);
651 hdiId_ = HdiId::HREQ_NETWORK_SET_NETWORK_SELECTION_MODE;
652 resultInfo_ = responseInfo;
653 NotifyAll();
654 return 0;
655 }
656
GetNeighboringCellInfoListResponse(const RilRadioResponseInfo & responseInfo,const CellListNearbyInfo & cellInfoList)657 int32_t RilCallbackTest::GetNeighboringCellInfoListResponse(
658 const RilRadioResponseInfo &responseInfo, const CellListNearbyInfo &cellInfoList)
659 {
660 TELEPHONY_LOGI("RilCallbackTest::GetNeighboringCellInfoListResponse itemNum:%{public}d", cellInfoList.itemNum);
661 for (auto info : cellInfoList.cellNearbyInfo) {
662 TELEPHONY_LOGI("RilCallbackTest::GetNeighboringCellInfoListResponse ratType:%{public}d", info.ratType);
663 switch (static_cast<RatType>(info.ratType)) {
664 case RatType::NETWORK_TYPE_LTE:
665 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.lte.arfcn);
666 TELEPHONY_LOGI("pci:%{public}d", info.serviceCells.lte.pci);
667 TELEPHONY_LOGI("rsrp:%{public}d", info.serviceCells.lte.rsrp);
668 TELEPHONY_LOGI("rsrq:%{public}d", info.serviceCells.lte.rsrq);
669 TELEPHONY_LOGI("rxlev:%{public}d", info.serviceCells.lte.rxlev);
670 break;
671 case RatType::NETWORK_TYPE_GSM:
672 TELEPHONY_LOGI("band:%{public}d", info.serviceCells.gsm.band);
673 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.gsm.arfcn);
674 TELEPHONY_LOGI("bsic:%{public}d", info.serviceCells.gsm.bsic);
675 TELEPHONY_LOGI("cellId:%{public}d", info.serviceCells.gsm.cellId);
676 TELEPHONY_LOGI("rxlev:%{public}d", info.serviceCells.gsm.rxlev);
677 TELEPHONY_LOGI("lac:%{public}d", info.serviceCells.gsm.lac);
678 break;
679 case RatType::NETWORK_TYPE_WCDMA:
680 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.wcdma.arfcn);
681 TELEPHONY_LOGI("psc:%{public}d", info.serviceCells.wcdma.psc);
682 TELEPHONY_LOGI("rscp:%{public}d", info.serviceCells.wcdma.rscp);
683 TELEPHONY_LOGI("ecno:%{public}d", info.serviceCells.wcdma.ecno);
684 break;
685 case RatType::NETWORK_TYPE_NR:
686 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.nr.nrArfcn);
687 TELEPHONY_LOGI("psc:%{public}d", info.serviceCells.nr.pci);
688 TELEPHONY_LOGI("rscp:%{public}d", info.serviceCells.nr.tac);
689 TELEPHONY_LOGI("ecno:%{public}d", info.serviceCells.nr.nci);
690 break;
691 default:
692 TELEPHONY_LOGE("invalid ratType");
693 break;
694 }
695 }
696 hdiId_ = HdiId::HREQ_NETWORK_GET_NEIGHBORING_CELLINFO_LIST;
697 resultInfo_ = responseInfo;
698 NotifyAll();
699 return 0;
700 }
701
GetNeighboringCellInfoListResponse_1_2(const RilRadioResponseInfo & responseInfo,const CellListNearbyInfo_1_2 & cellInfoList)702 int32_t RilCallbackTest::GetNeighboringCellInfoListResponse_1_2(
703 const RilRadioResponseInfo &responseInfo, const CellListNearbyInfo_1_2 &cellInfoList)
704 {
705 TELEPHONY_LOGI("itemNum:%{public}d", cellInfoList.itemNum);
706 for (auto info : cellInfoList.cellNearbyInfo) {
707 TELEPHONY_LOGI("ratType:%{public}d", info.ratType);
708 switch (static_cast<RatType>(info.ratType)) {
709 case RatType::NETWORK_TYPE_LTE:
710 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.lte.arfcn);
711 TELEPHONY_LOGI("pci:%{public}d", info.serviceCells.lte.pci);
712 TELEPHONY_LOGI("rsrp:%{public}d", info.serviceCells.lte.rsrp);
713 TELEPHONY_LOGI("rsrq:%{public}d", info.serviceCells.lte.rsrq);
714 TELEPHONY_LOGI("rxlev:%{public}d", info.serviceCells.lte.rxlev);
715 break;
716 case RatType::NETWORK_TYPE_GSM:
717 TELEPHONY_LOGI("band:%{public}d", info.serviceCells.gsm.band);
718 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.gsm.arfcn);
719 TELEPHONY_LOGI("bsic:%{public}d", info.serviceCells.gsm.bsic);
720 TELEPHONY_LOGI("cellId:%{public}d", info.serviceCells.gsm.cellId);
721 TELEPHONY_LOGI("rxlev:%{public}d", info.serviceCells.gsm.rxlev);
722 TELEPHONY_LOGI("lac:%{public}d", info.serviceCells.gsm.lac);
723 break;
724 case RatType::NETWORK_TYPE_WCDMA:
725 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.wcdma.arfcn);
726 TELEPHONY_LOGI("psc:%{public}d", info.serviceCells.wcdma.psc);
727 TELEPHONY_LOGI("rscp:%{public}d", info.serviceCells.wcdma.rscp);
728 TELEPHONY_LOGI("ecno:%{public}d", info.serviceCells.wcdma.ecno);
729 break;
730 case RatType::NETWORK_TYPE_NR:
731 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.nr.nrArfcn);
732 TELEPHONY_LOGI("psc:%{public}d", info.serviceCells.nr.pci);
733 TELEPHONY_LOGI("rscp:%{public}d", info.serviceCells.nr.tac);
734 break;
735 default:
736 TELEPHONY_LOGE("invalid ratType");
737 break;
738 }
739 }
740 hdiId_ = HdiId::HREQ_NETWORK_GET_NEIGHBORING_CELLINFO_LIST;
741 resultInfo_ = responseInfo;
742 NotifyAll();
743 return 0;
744 }
745
GetCurrentCellInfoResponse(const RilRadioResponseInfo & responseInfo,const CellListCurrentInfo & cellInfoList)746 int32_t RilCallbackTest::GetCurrentCellInfoResponse(
747 const RilRadioResponseInfo &responseInfo, const CellListCurrentInfo &cellInfoList)
748 {
749 TELEPHONY_LOGI("RilCallbackTest::GetCurrentCellInfoResponse itemNum:%{public}d", cellInfoList.itemNum);
750 for (auto info : cellInfoList.cellCurrentInfo) {
751 TELEPHONY_LOGI("RilCallbackTest::GetCurrentCellInfoResponse ratType:%{public}d, mcc:%{public}d, mnc:%{public}d",
752 info.ratType, info.mcc, info.mnc);
753 switch (static_cast<RatType>(info.ratType)) {
754 case RatType::NETWORK_TYPE_LTE:
755 TELEPHONY_LOGI("cellId:%{public}d", info.serviceCells.lte.cellId);
756 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.lte.arfcn);
757 TELEPHONY_LOGI("pci:%{public}d", info.serviceCells.lte.pci);
758 TELEPHONY_LOGI("rsrp:%{public}d", info.serviceCells.lte.rsrp);
759 TELEPHONY_LOGI("rsrq:%{public}d", info.serviceCells.lte.rsrq);
760 TELEPHONY_LOGI("rxlev:%{public}d", info.serviceCells.lte.rssi);
761 break;
762 case RatType::NETWORK_TYPE_GSM:
763 TELEPHONY_LOGI("band:%{public}d", info.serviceCells.gsm.band);
764 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.gsm.arfcn);
765 TELEPHONY_LOGI("bsic:%{public}d", info.serviceCells.gsm.bsic);
766 TELEPHONY_LOGI("cellId:%{public}d", info.serviceCells.gsm.cellId);
767 TELEPHONY_LOGI("rxlev:%{public}d", info.serviceCells.gsm.rxlev);
768 TELEPHONY_LOGI("lac:%{public}d", info.serviceCells.gsm.lac);
769 break;
770 case RatType::NETWORK_TYPE_WCDMA:
771 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.wcdma.arfcn);
772 TELEPHONY_LOGI("psc:%{public}d", info.serviceCells.wcdma.psc);
773 TELEPHONY_LOGI("rscp:%{public}d", info.serviceCells.wcdma.rscp);
774 TELEPHONY_LOGI("ecno:%{public}d", info.serviceCells.wcdma.ecno);
775 break;
776 case RatType::NETWORK_TYPE_NR:
777 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.nr.nrArfcn);
778 TELEPHONY_LOGI("psc:%{public}d", info.serviceCells.nr.pci);
779 TELEPHONY_LOGI("rscp:%{public}d", info.serviceCells.nr.tac);
780 TELEPHONY_LOGI("ecno:%{public}d", info.serviceCells.nr.nci);
781 break;
782 default:
783 TELEPHONY_LOGE("invalid ratType");
784 break;
785 }
786 }
787 hdiId_ = HdiId::HREQ_NETWORK_GET_CURRENT_CELL_INFO;
788 resultInfo_ = responseInfo;
789 NotifyAll();
790 return 0;
791 }
792
GetCurrentCellInfoResponse_1_1(const RilRadioResponseInfo & responseInfo,const CellListCurrentInfo_1_1 & cellListCurrentInfo)793 int32_t RilCallbackTest::GetCurrentCellInfoResponse_1_1(
794 const RilRadioResponseInfo &responseInfo, const CellListCurrentInfo_1_1 &cellListCurrentInfo)
795 {
796 TELEPHONY_LOGI("itemNum:%{public}d", cellListCurrentInfo.itemNum);
797 for (auto info : cellListCurrentInfo.cellCurrentInfo) {
798 TELEPHONY_LOGI("ratType:%{public}d, mcc:%{public}d, mnc:%{public}d", info.ratType, info.mcc, info.mnc);
799 switch (static_cast<RatType>(info.ratType)) {
800 case RatType::NETWORK_TYPE_LTE:
801 TELEPHONY_LOGI("cellId:%{public}d", info.serviceCells.lte.cellId);
802 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.lte.arfcn);
803 TELEPHONY_LOGI("pci:%{public}d", info.serviceCells.lte.pci);
804 TELEPHONY_LOGI("rsrp:%{public}d", info.serviceCells.lte.rsrp);
805 TELEPHONY_LOGI("rsrq:%{public}d", info.serviceCells.lte.rsrq);
806 TELEPHONY_LOGI("rxlev:%{public}d", info.serviceCells.lte.rssi);
807 break;
808 case RatType::NETWORK_TYPE_GSM:
809 TELEPHONY_LOGI("band:%{public}d", info.serviceCells.gsm.band);
810 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.gsm.arfcn);
811 TELEPHONY_LOGI("bsic:%{public}d", info.serviceCells.gsm.bsic);
812 TELEPHONY_LOGI("cellId:%{public}d", info.serviceCells.gsm.cellId);
813 TELEPHONY_LOGI("rxlev:%{public}d", info.serviceCells.gsm.rxlev);
814 TELEPHONY_LOGI("lac:%{public}d", info.serviceCells.gsm.lac);
815 break;
816 case RatType::NETWORK_TYPE_WCDMA:
817 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.wcdma.arfcn);
818 TELEPHONY_LOGI("psc:%{public}d", info.serviceCells.wcdma.psc);
819 TELEPHONY_LOGI("rscp:%{public}d", info.serviceCells.wcdma.rscp);
820 TELEPHONY_LOGI("ecno:%{public}d", info.serviceCells.wcdma.ecno);
821 break;
822 case RatType::NETWORK_TYPE_NR:
823 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.nr.nrArfcn);
824 TELEPHONY_LOGI("psc:%{public}d", info.serviceCells.nr.pci);
825 TELEPHONY_LOGI("rscp:%{public}d", info.serviceCells.nr.tac);
826 TELEPHONY_LOGI("ecno:%{public}d", info.serviceCells.nr.nci);
827 break;
828 default:
829 TELEPHONY_LOGE("invalid ratType");
830 break;
831 }
832 }
833 hdiId_ = HdiId::HREQ_NETWORK_GET_CURRENT_CELL_INFO;
834 resultInfo_ = responseInfo;
835 NotifyAll();
836 return 0;
837 }
838
GetCurrentCellInfoResponse_1_2(const RilRadioResponseInfo & responseInfo,const CellListCurrentInfo_1_2 & cellListCurrentInfo)839 int32_t RilCallbackTest::GetCurrentCellInfoResponse_1_2(
840 const RilRadioResponseInfo &responseInfo, const CellListCurrentInfo_1_2 &cellListCurrentInfo)
841 {
842 TELEPHONY_LOGI("itemNum:%{public}d", cellListCurrentInfo.itemNum);
843 for (auto info : cellListCurrentInfo.cellCurrentInfo) {
844 TELEPHONY_LOGI("ratType:%{public}d, mcc:%{public}d, mnc:%{public}d", info.ratType, info.mcc, info.mnc);
845 switch (static_cast<RatType>(info.ratType)) {
846 case RatType::NETWORK_TYPE_LTE:
847 TELEPHONY_LOGI("cellId:%{public}d", info.serviceCells.lte.cellId);
848 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.lte.arfcn);
849 TELEPHONY_LOGI("pci:%{public}d", info.serviceCells.lte.pci);
850 TELEPHONY_LOGI("rsrp:%{public}d", info.serviceCells.lte.rsrp);
851 TELEPHONY_LOGI("rsrq:%{public}d", info.serviceCells.lte.rsrq);
852 TELEPHONY_LOGI("rxlev:%{public}d", info.serviceCells.lte.rssi);
853 break;
854 case RatType::NETWORK_TYPE_GSM:
855 TELEPHONY_LOGI("band:%{public}d", info.serviceCells.gsm.band);
856 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.gsm.arfcn);
857 TELEPHONY_LOGI("bsic:%{public}d", info.serviceCells.gsm.bsic);
858 TELEPHONY_LOGI("cellId:%{public}d", info.serviceCells.gsm.cellId);
859 TELEPHONY_LOGI("rxlev:%{public}d", info.serviceCells.gsm.rxlev);
860 TELEPHONY_LOGI("lac:%{public}d", info.serviceCells.gsm.lac);
861 break;
862 case RatType::NETWORK_TYPE_WCDMA:
863 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.wcdma.arfcn);
864 TELEPHONY_LOGI("psc:%{public}d", info.serviceCells.wcdma.psc);
865 TELEPHONY_LOGI("rscp:%{public}d", info.serviceCells.wcdma.rscp);
866 TELEPHONY_LOGI("ecno:%{public}d", info.serviceCells.wcdma.ecno);
867 break;
868 case RatType::NETWORK_TYPE_NR:
869 TELEPHONY_LOGI("arfcn:%{public}d", info.serviceCells.nr.nrArfcn);
870 TELEPHONY_LOGI("psc:%{public}d", info.serviceCells.nr.pci);
871 TELEPHONY_LOGI("rscp:%{public}d", info.serviceCells.nr.tac);
872 break;
873 default:
874 TELEPHONY_LOGE("invalid ratType");
875 break;
876 }
877 }
878 hdiId_ = HdiId::HREQ_NETWORK_GET_CURRENT_CELL_INFO;
879 resultInfo_ = responseInfo;
880 NotifyAll();
881 return 0;
882 }
883
SetPreferredNetworkResponse(const RilRadioResponseInfo & responseInfo)884 int32_t RilCallbackTest::SetPreferredNetworkResponse(const RilRadioResponseInfo &responseInfo)
885 {
886 TELEPHONY_LOGI("RilCallbackTest::SetPreferredNetworkResponse error:%{public}d", responseInfo.error);
887 hdiId_ = HdiId::HREQ_NETWORK_SET_PREFERRED_NETWORK;
888 resultInfo_ = responseInfo;
889 NotifyAll();
890 return 0;
891 }
892
GetPreferredNetworkResponse(const RilRadioResponseInfo & responseInfo,const PreferredNetworkTypeInfo & preferredNetworkTypeInfo)893 int32_t RilCallbackTest::GetPreferredNetworkResponse(
894 const RilRadioResponseInfo &responseInfo, const PreferredNetworkTypeInfo &preferredNetworkTypeInfo)
895 {
896 TELEPHONY_LOGI(
897 "RilCallbackTest::GetPreferredNetworkResponse type:%{public}d", preferredNetworkTypeInfo.preferredNetworkType);
898 hdiId_ = HdiId::HREQ_NETWORK_GET_PREFERRED_NETWORK;
899 resultInfo_ = responseInfo;
900 NotifyAll();
901 return 0;
902 }
903
GetPhysicalChannelConfigResponse(const RilRadioResponseInfo & responseInfo,const ChannelConfigInfoList & channelConfigInfoList)904 int32_t RilCallbackTest::GetPhysicalChannelConfigResponse(
905 const RilRadioResponseInfo &responseInfo, const ChannelConfigInfoList &channelConfigInfoList)
906 {
907 TELEPHONY_LOGI(
908 "RilCallbackTest::GetPhysicalChannelConfigResponse itemNum:%{public}d", channelConfigInfoList.itemNum);
909 for (PhysicalChannelConfig phyChnlCfg : channelConfigInfoList.channelConfigInfos) {
910 TELEPHONY_LOGI(
911 "RilCallbackTest::GetPhysicalChannelConfigResponse cellConnStatus:%{public}d, "
912 "cellBandwidthDownlinkKhz:%{public}d, cellBandwidthUplinkKhz:%{public}d, physicalCellId:%{public}d, "
913 "ratType:%{public}d, freqRange:%{public}d, downlinkChannelNum:%{public}d, "
914 "uplinkChannelNum:%{public}d, contextIdNum:%{public}d",
915 phyChnlCfg.cellConnStatus, phyChnlCfg.cellBandwidthDownlinkKhz, phyChnlCfg.cellBandwidthUplinkKhz,
916 phyChnlCfg.ratType, phyChnlCfg.freqRange, phyChnlCfg.downlinkChannelNum, phyChnlCfg.uplinkChannelNum,
917 phyChnlCfg.physicalCellId, phyChnlCfg.contextIdNum);
918 for (int32_t j = 0; j < phyChnlCfg.contextIdNum; j++) {
919 TELEPHONY_LOGI("contextIds[%{public}d]:%{public}d", j, phyChnlCfg.contextIds[j]);
920 }
921 }
922 hdiId_ = HdiId::HREQ_NETWORK_GET_PHYSICAL_CHANNEL_CONFIG;
923 resultInfo_ = responseInfo;
924 NotifyAll();
925 return 0;
926 }
927
SetLocateUpdatesResponse(const RilRadioResponseInfo & responseInfo)928 int32_t RilCallbackTest::SetLocateUpdatesResponse(const RilRadioResponseInfo &responseInfo)
929 {
930 TELEPHONY_LOGI("RilCallbackTest::SetLocateUpdatesResponse error:%{public}d", responseInfo.error);
931 hdiId_ = HdiId::HREQ_NETWORK_SET_LOCATE_UPDATES;
932 resultInfo_ = responseInfo;
933 NotifyAll();
934 return 0;
935 }
936
SetNotificationFilterResponse(const RilRadioResponseInfo & responseInfo)937 int32_t RilCallbackTest::SetNotificationFilterResponse(const RilRadioResponseInfo &responseInfo)
938 {
939 TELEPHONY_LOGI("RilCallbackTest::SetNotificationFilterResponse error:%{public}d", responseInfo.error);
940 hdiId_ = HdiId::HREQ_NETWORK_SET_NOTIFICATION_FILTER;
941 resultInfo_ = responseInfo;
942 NotifyAll();
943 return 0;
944 }
945
SetDeviceStateResponse(const RilRadioResponseInfo & responseInfo)946 int32_t RilCallbackTest::SetDeviceStateResponse(const RilRadioResponseInfo &responseInfo)
947 {
948 TELEPHONY_LOGI("RilCallbackTest::SetDeviceStateResponse error:%{public}d", responseInfo.error);
949 hdiId_ = HdiId::HREQ_NETWORK_SET_DEVICE_STATE;
950 resultInfo_ = responseInfo;
951 NotifyAll();
952 return 0;
953 }
954
SetNrOptionModeResponse(const RilRadioResponseInfo & responseInfo)955 int32_t RilCallbackTest::SetNrOptionModeResponse(const RilRadioResponseInfo &responseInfo)
956 {
957 TELEPHONY_LOGI("RilCallbackTest::SetNrOptionModeResponse error:%{public}d", responseInfo.error);
958 hdiId_ = HdiId::HREQ_NETWORK_SET_NR_OPTION_MODE;
959 resultInfo_ = responseInfo;
960 NotifyAll();
961 return 0;
962 }
963
GetNrOptionModeResponse(const RilRadioResponseInfo & responseInfo,const int32_t mode)964 int32_t RilCallbackTest::GetNrOptionModeResponse(const RilRadioResponseInfo &responseInfo, const int32_t mode)
965 {
966 TELEPHONY_LOGI("RilCallbackTest::GetNrOptionModeResponse mode:%{public}d", mode);
967 hdiId_ = HdiId::HREQ_NETWORK_GET_NR_OPTION_MODE;
968 resultInfo_ = responseInfo;
969 NotifyAll();
970 return 0;
971 }
972
GetRrcConnectionStateResponse(const RilRadioResponseInfo & responseInfo,int32_t rrcConnectionState)973 int32_t RilCallbackTest::GetRrcConnectionStateResponse(
974 const RilRadioResponseInfo &responseInfo, int32_t rrcConnectionState)
975 {
976 TELEPHONY_LOGI("RilCallbackTest::GetRrcConnectionStateResponse rrcConnectionState:%{public}d", rrcConnectionState);
977 hdiId_ = HdiId::HREQ_NETWORK_GET_RRC_CONNECTION_STATE;
978 resultInfo_ = responseInfo;
979 NotifyAll();
980 return 0;
981 }
982
GetNrSsbIdResponse(const HDI::Ril::V1_1::RilRadioResponseInfo & responseInfo,const HDI::Ril::V1_2::NrCellSsbIds & nrCellSsbIds)983 int32_t RilCallbackTest::GetNrSsbIdResponse(const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo,
984 const HDI::Ril::V1_2::NrCellSsbIds &nrCellSsbIds)
985 {
986 TELEPHONY_LOGI("GetNrSsbIdResponse rsrp:%{public}d", nrCellSsbIds.rsrp);
987 TELEPHONY_LOGI("GetNrSsbIdResponse sinr:%{public}d", nrCellSsbIds.sinr);
988 TELEPHONY_LOGI("GetNrSsbIdResponse nbCellCount:%{public}d", nrCellSsbIds.nbCellCount);
989 hdiId_ = HdiId::HREQ_NETWORK_GET_NR_SSBID_INFO;
990 resultInfo_ = responseInfo;
991 NotifyAll();
992 return 0;
993 }
994
995 // Call
CallEmergencyNotice(const RilRadioResponseInfo & responseInfo,const EmergencyInfoList & emergencyInfoList)996 int32_t RilCallbackTest::CallEmergencyNotice(
997 const RilRadioResponseInfo &responseInfo, const EmergencyInfoList &emergencyInfoList)
998 {
999 TELEPHONY_LOGI("GetBoolResult CallEmergencyNotice callSize : %{public}d", emergencyInfoList.callSize);
1000 return 0;
1001 }
1002
CallStateUpdated(const RilRadioResponseInfo & responseInfo)1003 int32_t RilCallbackTest::CallStateUpdated(const RilRadioResponseInfo &responseInfo)
1004 {
1005 TELEPHONY_LOGI(
1006 "GetBoolResult CallStateUpdated slotId : %{public}d, type: %{public}d", responseInfo.slotId, responseInfo.type);
1007 return 0;
1008 }
1009
CallRingbackVoiceNotice(const RilRadioResponseInfo & responseInfo,const RingbackVoice & ringbackVoice)1010 int32_t RilCallbackTest::CallRingbackVoiceNotice(
1011 const RilRadioResponseInfo &responseInfo, const RingbackVoice &ringbackVoice)
1012 {
1013 TELEPHONY_LOGI("GetBoolResult CallRingbackVoiceNotice slotId : %{public}d, ringbackVoice: %{public}d",
1014 responseInfo.slotId, ringbackVoice.status);
1015 return 0;
1016 }
1017
CallSrvccStatusNotice(const RilRadioResponseInfo & responseInfo,const SrvccStatus & srvccStatus)1018 int32_t RilCallbackTest::CallSrvccStatusNotice(const RilRadioResponseInfo &responseInfo, const SrvccStatus &srvccStatus)
1019 {
1020 TELEPHONY_LOGI("GetBoolResult CallSrvccStatusNotice slotId : %{public}d, srvccStatus: %{public}d",
1021 responseInfo.slotId, srvccStatus.status);
1022 return 0;
1023 }
1024
CallUssdNotice(const RilRadioResponseInfo & responseInfo,const UssdNoticeInfo & ussdNoticeInfo)1025 int32_t RilCallbackTest::CallUssdNotice(const RilRadioResponseInfo &responseInfo, const UssdNoticeInfo &ussdNoticeInfo)
1026 {
1027 TELEPHONY_LOGI("GetBoolResult CallUssdNotice slotId : %{public}d, ussdNoticeInfo m: %{public}d, str: %{public}s",
1028 responseInfo.slotId, ussdNoticeInfo.type, ussdNoticeInfo.message.c_str());
1029 return 0;
1030 }
1031
CallSsNotice(const RilRadioResponseInfo & responseInfo,const SsNoticeInfo & ssNoticeInfo)1032 int32_t RilCallbackTest::CallSsNotice(const RilRadioResponseInfo &responseInfo, const SsNoticeInfo &ssNoticeInfo)
1033 {
1034 TELEPHONY_LOGI("GetBoolResult CallSsNotice slotId : %{public}d, result: %{public}d, serviceType: %{public}d,"
1035 "requestType: %{public}d, serviceClass: %{public}d",
1036 responseInfo.slotId, ssNoticeInfo.result, ssNoticeInfo.serviceType, ssNoticeInfo.requestType,
1037 ssNoticeInfo.serviceClass);
1038 return 0;
1039 }
1040
CallRsrvccStatusNotify(const RilRadioResponseInfo & responseInfo)1041 int32_t RilCallbackTest::CallRsrvccStatusNotify(const RilRadioResponseInfo &responseInfo)
1042 {
1043 TELEPHONY_LOGI(
1044 "CallRsrvccStatusNotify slotId : %{public}d, type: %{public}d", responseInfo.slotId, responseInfo.type);
1045 return 0;
1046 }
1047
GetEmergencyCallListResponse(const RilRadioResponseInfo & responseInfo,const EmergencyInfoList & emergencyInfoList)1048 int32_t RilCallbackTest::GetEmergencyCallListResponse(
1049 const RilRadioResponseInfo &responseInfo, const EmergencyInfoList &emergencyInfoList)
1050 {
1051 TELEPHONY_LOGI("GetBoolResult emergencyInfoList callSize : %{public}d", emergencyInfoList.callSize);
1052 hdiId_ = HdiId::HREQ_CALL_GET_EMERGENCY_LIST;
1053 resultInfo_ = responseInfo;
1054 NotifyAll();
1055 return 0;
1056 }
1057
SetEmergencyCallListResponse(const RilRadioResponseInfo & responseInfo)1058 int32_t RilCallbackTest::SetEmergencyCallListResponse(const RilRadioResponseInfo &responseInfo)
1059 {
1060 TELEPHONY_LOGI("GetBoolResult SetEmergencyCallListResponse");
1061 hdiId_ = HdiId::HREQ_CALL_SET_EMERGENCY_LIST;
1062 resultInfo_ = responseInfo;
1063 NotifyAll();
1064 return 0;
1065 }
1066
GetCallListResponse(const RilRadioResponseInfo & responseInfo,const CallInfoList & callList)1067 int32_t RilCallbackTest::GetCallListResponse(const RilRadioResponseInfo &responseInfo, const CallInfoList &callList)
1068 {
1069 TELEPHONY_LOGI("GetBoolResult CallInfoList callSize : %{public}d", callList.callSize);
1070 hdiId_ = HdiId::HREQ_CALL_GET_CALL_LIST;
1071 resultInfo_ = responseInfo;
1072 NotifyAll();
1073 return 0;
1074 }
1075
GetCallListResponseExt(const RilRadioResponseInfo & responseInfo,const CallInfoExtList & callList)1076 int32_t RilCallbackTest::GetCallListResponseExt(
1077 const RilRadioResponseInfo &responseInfo, const CallInfoExtList &callList)
1078 {
1079 TELEPHONY_LOGI("GetBoolResult CallInfoList callSize : %{public}d", callList.callSize);
1080 hdiId_ = HdiId::HREQ_CALL_GET_CALL_LIST;
1081 resultInfo_ = responseInfo;
1082 NotifyAll();
1083 return 0;
1084 }
1085
DialResponse(const RilRadioResponseInfo & responseInfo)1086 int32_t RilCallbackTest::DialResponse(const RilRadioResponseInfo &responseInfo)
1087 {
1088 TELEPHONY_LOGI("GetBoolResult DialResponse");
1089 hdiId_ = HdiId::HREQ_CALL_DIAL;
1090 resultInfo_ = responseInfo;
1091 NotifyAll();
1092 return 0;
1093 }
1094
HangupResponse(const RilRadioResponseInfo & responseInfo)1095 int32_t RilCallbackTest::HangupResponse(const RilRadioResponseInfo &responseInfo)
1096 {
1097 TELEPHONY_LOGI("GetBoolResult HangupResponse");
1098 hdiId_ = HdiId::HREQ_CALL_HANGUP;
1099 resultInfo_ = responseInfo;
1100 NotifyAll();
1101 return 0;
1102 }
1103
RejectResponse(const RilRadioResponseInfo & responseInfo)1104 int32_t RilCallbackTest::RejectResponse(const RilRadioResponseInfo &responseInfo)
1105 {
1106 TELEPHONY_LOGI("GetBoolResult RejectResponse");
1107 hdiId_ = HdiId::HREQ_CALL_REJECT;
1108 resultInfo_ = responseInfo;
1109 NotifyAll();
1110 return 0;
1111 }
1112
AnswerResponse(const RilRadioResponseInfo & responseInfo)1113 int32_t RilCallbackTest::AnswerResponse(const RilRadioResponseInfo &responseInfo)
1114 {
1115 TELEPHONY_LOGI("GetBoolResult AnswerResponse");
1116 hdiId_ = HdiId::HREQ_CALL_ANSWER;
1117 resultInfo_ = responseInfo;
1118 NotifyAll();
1119 return 0;
1120 }
1121
HoldCallResponse(const RilRadioResponseInfo & responseInfo)1122 int32_t RilCallbackTest::HoldCallResponse(const RilRadioResponseInfo &responseInfo)
1123 {
1124 TELEPHONY_LOGI("GetBoolResult HoldCallResponse");
1125 hdiId_ = HdiId::HREQ_CALL_HOLD_CALL;
1126 resultInfo_ = responseInfo;
1127 NotifyAll();
1128 return 0;
1129 }
1130
UnHoldCallResponse(const RilRadioResponseInfo & responseInfo)1131 int32_t RilCallbackTest::UnHoldCallResponse(const RilRadioResponseInfo &responseInfo)
1132 {
1133 TELEPHONY_LOGI("GetBoolResult UnHoldCallResponse");
1134 hdiId_ = HdiId::HREQ_CALL_UNHOLD_CALL;
1135 resultInfo_ = responseInfo;
1136 NotifyAll();
1137 return 0;
1138 }
1139
SwitchCallResponse(const RilRadioResponseInfo & responseInfo)1140 int32_t RilCallbackTest::SwitchCallResponse(const RilRadioResponseInfo &responseInfo)
1141 {
1142 TELEPHONY_LOGI("GetBoolResult SwitchCallResponse");
1143 hdiId_ = HdiId::HREQ_CALL_SWITCH_CALL;
1144 resultInfo_ = responseInfo;
1145 NotifyAll();
1146 return 0;
1147 }
1148
GetClipResponse(const RilRadioResponseInfo & responseInfo,const GetClipResult & getClipResult)1149 int32_t RilCallbackTest::GetClipResponse(const RilRadioResponseInfo &responseInfo, const GetClipResult &getClipResult)
1150 {
1151 TELEPHONY_LOGI("GetBoolResult result: %{public}d, action: %{public}d, clipStat: %{public}d", getClipResult.result,
1152 getClipResult.action, getClipResult.clipStat);
1153 hdiId_ = HdiId::HREQ_CALL_GET_CLIP;
1154 resultInfo_ = responseInfo;
1155 NotifyAll();
1156 return 0;
1157 }
1158
SetClipResponse(const RilRadioResponseInfo & responseInfo)1159 int32_t RilCallbackTest::SetClipResponse(const RilRadioResponseInfo &responseInfo)
1160 {
1161 TELEPHONY_LOGI("GetBoolResult SetClipResponse");
1162 hdiId_ = HdiId::HREQ_CALL_SET_CLIP;
1163 resultInfo_ = responseInfo;
1164 NotifyAll();
1165 return 0;
1166 }
1167
CombineConferenceResponse(const RilRadioResponseInfo & responseInfo)1168 int32_t RilCallbackTest::CombineConferenceResponse(const RilRadioResponseInfo &responseInfo)
1169 {
1170 TELEPHONY_LOGI("GetBoolResult CombineConferenceResponse");
1171 hdiId_ = HdiId::HREQ_CALL_COMBINE_CONFERENCE;
1172 resultInfo_ = responseInfo;
1173 NotifyAll();
1174 return 0;
1175 }
1176
SeparateConferenceResponse(const RilRadioResponseInfo & responseInfo)1177 int32_t RilCallbackTest::SeparateConferenceResponse(const RilRadioResponseInfo &responseInfo)
1178 {
1179 TELEPHONY_LOGI("GetBoolResult SeparateConferenceResponse");
1180 hdiId_ = HdiId::HREQ_CALL_SEPARATE_CONFERENCE;
1181 resultInfo_ = responseInfo;
1182 NotifyAll();
1183 return 0;
1184 }
1185
CallSupplementResponse(const RilRadioResponseInfo & responseInfo)1186 int32_t RilCallbackTest::CallSupplementResponse(const RilRadioResponseInfo &responseInfo)
1187 {
1188 TELEPHONY_LOGI("GetBoolResult CallSupplementResponse");
1189 hdiId_ = HdiId::HREQ_CALL_CALL_SUPPLEMENT;
1190 resultInfo_ = responseInfo;
1191 NotifyAll();
1192 return 0;
1193 }
1194
GetCallWaitingResponse(const RilRadioResponseInfo & responseInfo,const CallWaitResult & callWaitResult)1195 int32_t RilCallbackTest::GetCallWaitingResponse(
1196 const RilRadioResponseInfo &responseInfo, const CallWaitResult &callWaitResult)
1197 {
1198 TELEPHONY_LOGI("GetBoolResult GetCallWaitingResponse result: %{public}d, status: %{public}d, classCw: %{public}d",
1199 callWaitResult.result, callWaitResult.status, callWaitResult.classCw);
1200 hdiId_ = HdiId::HREQ_CALL_GET_CALL_WAITING;
1201 resultInfo_ = responseInfo;
1202 NotifyAll();
1203 return 0;
1204 }
1205
SetCallWaitingResponse(const RilRadioResponseInfo & responseInfo)1206 int32_t RilCallbackTest::SetCallWaitingResponse(const RilRadioResponseInfo &responseInfo)
1207 {
1208 TELEPHONY_LOGI("GetBoolResult SetCallWaitingResponse");
1209 hdiId_ = HdiId::HREQ_CALL_SET_CALL_WAITING;
1210 resultInfo_ = responseInfo;
1211 NotifyAll();
1212 return 0;
1213 }
1214
GetCallTransferInfoResponse(const RilRadioResponseInfo & responseInfo,const CallForwardQueryInfoList & cFQueryList)1215 int32_t RilCallbackTest::GetCallTransferInfoResponse(
1216 const RilRadioResponseInfo &responseInfo, const CallForwardQueryInfoList &cFQueryList)
1217 {
1218 TELEPHONY_LOGI("GetBoolResult GetCallTransferInfoResponse cFQueryList: %{public}d", cFQueryList.callSize);
1219 hdiId_ = HdiId::HREQ_CALL_GET_CALL_TRANSFER_INFO;
1220 resultInfo_ = responseInfo;
1221 NotifyAll();
1222 return 0;
1223 }
1224
SetCallTransferInfoResponse(const RilRadioResponseInfo & responseInfo)1225 int32_t RilCallbackTest::SetCallTransferInfoResponse(const RilRadioResponseInfo &responseInfo)
1226 {
1227 TELEPHONY_LOGI("GetBoolResult SetCallTransferInfoResponse");
1228 hdiId_ = HdiId::HREQ_CALL_SET_CALL_TRANSFER_INFO;
1229 resultInfo_ = responseInfo;
1230 NotifyAll();
1231 return 0;
1232 }
1233
GetCallRestrictionResponse(const RilRadioResponseInfo & responseInfo,const CallRestrictionResult & result)1234 int32_t RilCallbackTest::GetCallRestrictionResponse(
1235 const RilRadioResponseInfo &responseInfo, const CallRestrictionResult &result)
1236 {
1237 TELEPHONY_LOGI("GetBoolResult result: %{public}d, status: %{public}d, classCw: %{public}d", result.result,
1238 result.status, result.classCw);
1239 hdiId_ = HdiId::HREQ_CALL_GET_CALL_RESTRICTION;
1240 resultInfo_ = responseInfo;
1241 NotifyAll();
1242 return 0;
1243 }
1244
SetCallRestrictionResponse(const RilRadioResponseInfo & responseInfo)1245 int32_t RilCallbackTest::SetCallRestrictionResponse(const RilRadioResponseInfo &responseInfo)
1246 {
1247 TELEPHONY_LOGI("GetBoolResult SetCallRestrictionResponse");
1248 hdiId_ = HdiId::HREQ_CALL_SET_CALL_RESTRICTION;
1249 resultInfo_ = responseInfo;
1250 NotifyAll();
1251 return 0;
1252 }
1253
GetClirResponse(const RilRadioResponseInfo & responseInfo,const GetClirResult & getClirResult)1254 int32_t RilCallbackTest::GetClirResponse(const RilRadioResponseInfo &responseInfo, const GetClirResult &getClirResult)
1255 {
1256 TELEPHONY_LOGI("GetBoolResult result: %{public}d, action: %{public}d, clirStat: %{public}d", getClirResult.result,
1257 getClirResult.action, getClirResult.clirStat);
1258 hdiId_ = HdiId::HREQ_CALL_GET_CLIR;
1259 resultInfo_ = responseInfo;
1260 NotifyAll();
1261 return 0;
1262 }
1263
SetClirResponse(const RilRadioResponseInfo & responseInfo)1264 int32_t RilCallbackTest::SetClirResponse(const RilRadioResponseInfo &responseInfo)
1265 {
1266 TELEPHONY_LOGI("GetBoolResult SetClirResponse");
1267 hdiId_ = HdiId::HREQ_CALL_SET_CLIR;
1268 resultInfo_ = responseInfo;
1269 NotifyAll();
1270 return 0;
1271 }
1272
StartDtmfResponse(const RilRadioResponseInfo & responseInfo)1273 int32_t RilCallbackTest::StartDtmfResponse(const RilRadioResponseInfo &responseInfo)
1274 {
1275 TELEPHONY_LOGI("GetBoolResult StartDtmfResponse");
1276 hdiId_ = HdiId::HREQ_CALL_START_DTMF;
1277 resultInfo_ = responseInfo;
1278 NotifyAll();
1279 return 0;
1280 }
1281
SendDtmfResponse(const RilRadioResponseInfo & responseInfo)1282 int32_t RilCallbackTest::SendDtmfResponse(const RilRadioResponseInfo &responseInfo)
1283 {
1284 TELEPHONY_LOGI("GetBoolResult SendDtmfResponse");
1285 hdiId_ = HdiId::HREQ_CALL_SEND_DTMF;
1286 resultInfo_ = responseInfo;
1287 NotifyAll();
1288 return 0;
1289 }
1290
StopDtmfResponse(const RilRadioResponseInfo & responseInfo)1291 int32_t RilCallbackTest::StopDtmfResponse(const RilRadioResponseInfo &responseInfo)
1292 {
1293 TELEPHONY_LOGI("GetBoolResult StopDtmfResponse");
1294 hdiId_ = HdiId::HREQ_CALL_STOP_DTMF;
1295 resultInfo_ = responseInfo;
1296 NotifyAll();
1297 return 0;
1298 }
1299
GetCallPreferenceModeResponse(const RilRadioResponseInfo & responseInfo,int32_t mode)1300 int32_t RilCallbackTest::GetCallPreferenceModeResponse(const RilRadioResponseInfo &responseInfo, int32_t mode)
1301 {
1302 TELEPHONY_LOGI("GetBoolResult GetCallPreferenceModeResponse mode: %{public}d", mode);
1303 hdiId_ = HdiId::HREQ_CALL_GET_CALL_PREFERENCE;
1304 resultInfo_ = responseInfo;
1305 NotifyAll();
1306 return 0;
1307 }
1308
SetCallPreferenceModeResponse(const RilRadioResponseInfo & responseInfo)1309 int32_t RilCallbackTest::SetCallPreferenceModeResponse(const RilRadioResponseInfo &responseInfo)
1310 {
1311 TELEPHONY_LOGI("GetBoolResult SetCallPreferenceModeResponse");
1312 hdiId_ = HdiId::HREQ_CALL_SET_CALL_PREFERENCE;
1313 resultInfo_ = responseInfo;
1314 NotifyAll();
1315 return 0;
1316 }
1317
SetUssdResponse(const RilRadioResponseInfo & responseInfo)1318 int32_t RilCallbackTest::SetUssdResponse(const RilRadioResponseInfo &responseInfo)
1319 {
1320 TELEPHONY_LOGI("GetBoolResult SetUssdResponse");
1321 hdiId_ = HdiId::HREQ_CALL_SET_USSD;
1322 resultInfo_ = responseInfo;
1323 NotifyAll();
1324 return 0;
1325 }
1326
GetUssdResponse(const RilRadioResponseInfo & responseInfo,int32_t cusd)1327 int32_t RilCallbackTest::GetUssdResponse(const RilRadioResponseInfo &responseInfo, int32_t cusd)
1328 {
1329 TELEPHONY_LOGI("GetBoolResult GetUssdResponse cusd: %{public}d", cusd);
1330 hdiId_ = HdiId::HREQ_CALL_GET_USSD;
1331 resultInfo_ = responseInfo;
1332 NotifyAll();
1333 return 0;
1334 }
1335
SetMuteResponse(const RilRadioResponseInfo & responseInfo)1336 int32_t RilCallbackTest::SetMuteResponse(const RilRadioResponseInfo &responseInfo)
1337 {
1338 TELEPHONY_LOGI("GetBoolResult SetMuteResponse");
1339 hdiId_ = HdiId::HREQ_CALL_SET_MUTE;
1340 resultInfo_ = responseInfo;
1341 NotifyAll();
1342 return 0;
1343 }
1344
GetMuteResponse(const RilRadioResponseInfo & responseInfo,int32_t mute)1345 int32_t RilCallbackTest::GetMuteResponse(const RilRadioResponseInfo &responseInfo, int32_t mute)
1346 {
1347 TELEPHONY_LOGI("GetBoolResult GetMuteResponse mute: %{public}d", mute);
1348 hdiId_ = HdiId::HREQ_CALL_GET_MUTE;
1349 resultInfo_ = responseInfo;
1350 NotifyAll();
1351 return 0;
1352 }
1353
GetCallFailReasonResponse(const RilRadioResponseInfo & responseInfo,int32_t callFail)1354 int32_t RilCallbackTest::GetCallFailReasonResponse(const RilRadioResponseInfo &responseInfo, int32_t callFail)
1355 {
1356 TELEPHONY_LOGI("GetBoolResult GetCallFailReasonResponse callFail: %{public}d", callFail);
1357 hdiId_ = HdiId::HREQ_CALL_GET_FAIL_REASON;
1358 resultInfo_ = responseInfo;
1359 NotifyAll();
1360 return 0;
1361 }
1362
SetBarringPasswordResponse(const RilRadioResponseInfo & responseInfo)1363 int32_t RilCallbackTest::SetBarringPasswordResponse(const RilRadioResponseInfo &responseInfo)
1364 {
1365 TELEPHONY_LOGI("GetBoolResult SetBarringPasswordResponse");
1366 hdiId_ = HdiId::HREQ_CALL_SET_BARRING_PASSWORD;
1367 resultInfo_ = responseInfo;
1368 NotifyAll();
1369 return 0;
1370 }
1371
CloseUnFinishedUssdResponse(const RilRadioResponseInfo & responseInfo)1372 int32_t RilCallbackTest::CloseUnFinishedUssdResponse(const RilRadioResponseInfo &responseInfo)
1373 {
1374 TELEPHONY_LOGI("GetBoolResult CloseUnFinishedUssdResponse");
1375 hdiId_ = HdiId::HREQ_CALL_CLOSE_UNFINISHED_USSD;
1376 resultInfo_ = responseInfo;
1377 NotifyAll();
1378 return 0;
1379 }
1380
SetVonrSwitchResponse(const RilRadioResponseInfo & responseInfo)1381 int32_t RilCallbackTest::SetVonrSwitchResponse(const RilRadioResponseInfo &responseInfo)
1382 {
1383 TELEPHONY_LOGI("GetBoolResult SetVonrSwitchResponse");
1384 hdiId_ = HdiId::HREQ_SET_VONR_SWITCH;
1385 resultInfo_ = responseInfo;
1386 NotifyAll();
1387 return 0;
1388 }
1389
1390 /**
1391 * modem
1392 **/
RadioStateUpdated(const RilRadioResponseInfo & responseInfo,int32_t state)1393 int32_t RilCallbackTest::RadioStateUpdated(const RilRadioResponseInfo &responseInfo, int32_t state)
1394 {
1395 TELEPHONY_LOGI("RadioStateUpdated state : %{public}d", state);
1396 return 0;
1397 }
1398
VoiceRadioTechUpdated(const RilRadioResponseInfo & responseInfo,const VoiceRadioTechnology & voiceRadioTechnology)1399 int32_t RilCallbackTest::VoiceRadioTechUpdated(
1400 const RilRadioResponseInfo &responseInfo, const VoiceRadioTechnology &voiceRadioTechnology)
1401 {
1402 TELEPHONY_LOGI(
1403 "GetVoiceRadioTechnologyResponse srvStatus : %{public}d srvDomain : %{public}d roamStatus: %{public}d "
1404 "simStatus : %{public}d lockStatus : %{public}d sysMode : %{public}d actType : %{public}d sysModeName : "
1405 "%{public}s actName : %{public}s",
1406 voiceRadioTechnology.srvStatus, voiceRadioTechnology.srvDomain, voiceRadioTechnology.roamStatus,
1407 voiceRadioTechnology.simStatus, voiceRadioTechnology.lockStatus, voiceRadioTechnology.sysMode,
1408 voiceRadioTechnology.actType, voiceRadioTechnology.sysModeName.c_str(), voiceRadioTechnology.actName.c_str());
1409 return 0;
1410 }
1411
DsdsModeUpdated(const RilRadioResponseInfo & responseInfo,int32_t mode)1412 int32_t RilCallbackTest::DsdsModeUpdated(const RilRadioResponseInfo &responseInfo, int32_t mode)
1413 {
1414 TELEPHONY_LOGI("DsdsModeUpdated mode : %{public}d", mode);
1415 return 0;
1416 }
1417
NcfgFinishedResult(const RilRadioResponseInfo & responseInfo,int32_t state)1418 int32_t RilCallbackTest::NcfgFinishedResult(const RilRadioResponseInfo &responseInfo, int32_t state)
1419 {
1420 TELEPHONY_LOGI("NcfgFinishedResult state : %{public}d", state);
1421 return 0;
1422 }
1423
RestartRildNvMatch(const RilRadioResponseInfo & responseInfo,int32_t state)1424 int32_t RilCallbackTest::RestartRildNvMatch(const RilRadioResponseInfo &responseInfo, int32_t state)
1425 {
1426 TELEPHONY_LOGI("RestartRildNvMatch state : %{public}d", state);
1427 return 0;
1428 }
1429
ShutDownResponse(const RilRadioResponseInfo & responseInfo)1430 int32_t RilCallbackTest::ShutDownResponse(const RilRadioResponseInfo &responseInfo)
1431 {
1432 TELEPHONY_LOGI("ShutDownResponse");
1433 hdiId_ = HdiId::HREQ_MODEM_SHUT_DOWN;
1434 resultInfo_ = responseInfo;
1435 NotifyAll();
1436 return 0;
1437 }
1438
SetRadioStateResponse(const RilRadioResponseInfo & responseInfo)1439 int32_t RilCallbackTest::SetRadioStateResponse(const RilRadioResponseInfo &responseInfo)
1440 {
1441 TELEPHONY_LOGI("SetRadioStateResponse");
1442 hdiId_ = HdiId::HREQ_MODEM_SET_RADIO_STATUS;
1443 resultInfo_ = responseInfo;
1444 NotifyAll();
1445 return 0;
1446 }
1447
GetRadioStateResponse(const RilRadioResponseInfo & responseInfo,int32_t state)1448 int32_t RilCallbackTest::GetRadioStateResponse(const RilRadioResponseInfo &responseInfo, int32_t state)
1449 {
1450 TELEPHONY_LOGI("GetRadioStateResponse state : %{public}d", state);
1451 hdiId_ = HdiId::HREQ_MODEM_GET_RADIO_STATUS;
1452 resultInfo_ = responseInfo;
1453 NotifyAll();
1454 return 0;
1455 }
1456
GetImeiResponse(const RilRadioResponseInfo & responseInfo,const std::string & imei)1457 int32_t RilCallbackTest::GetImeiResponse(const RilRadioResponseInfo &responseInfo, const std::string &imei)
1458 {
1459 TELEPHONY_LOGI("GetImeiResponse imei : %{public}s", imei.c_str());
1460 hdiId_ = HdiId::HREQ_MODEM_GET_IMEI;
1461 resultInfo_ = responseInfo;
1462 NotifyAll();
1463 return 0;
1464 }
1465
GetImeiSvResponse(const RilRadioResponseInfo & responseInfo,const std::string & imeiSv)1466 int32_t RilCallbackTest::GetImeiSvResponse(const RilRadioResponseInfo &responseInfo, const std::string &imeiSv)
1467 {
1468 hdiId_ = HdiId::HREQ_MODEM_GET_IMEISV;
1469 resultInfo_ = responseInfo;
1470 NotifyAll();
1471 return 0;
1472 }
1473
GetMeidResponse(const RilRadioResponseInfo & responseInfo,const std::string & meid)1474 int32_t RilCallbackTest::GetMeidResponse(const RilRadioResponseInfo &responseInfo, const std::string &meid)
1475 {
1476 TELEPHONY_LOGI("GetMeidResponse meid : %{public}s", meid.c_str());
1477 hdiId_ = HdiId::HREQ_MODEM_GET_MEID;
1478 resultInfo_ = responseInfo;
1479 NotifyAll();
1480 return 0;
1481 }
1482
GetVoiceRadioTechnologyResponse(const RilRadioResponseInfo & responseInfo,const VoiceRadioTechnology & voiceRadioTechnology)1483 int32_t RilCallbackTest::GetVoiceRadioTechnologyResponse(
1484 const RilRadioResponseInfo &responseInfo, const VoiceRadioTechnology &voiceRadioTechnology)
1485 {
1486 TELEPHONY_LOGI(
1487 "GetVoiceRadioTechnologyResponse srvStatus : %{public}d srvDomain : %{public}d roamStatus: %{public}d "
1488 "simStatus : %{public}d lockStatus : %{public}d sysMode : %{public}d actType : %{public}d sysModeName : "
1489 "%{public}s actName : %{public}s",
1490 voiceRadioTechnology.srvStatus, voiceRadioTechnology.srvDomain, voiceRadioTechnology.roamStatus,
1491 voiceRadioTechnology.simStatus, voiceRadioTechnology.lockStatus, voiceRadioTechnology.sysMode,
1492 voiceRadioTechnology.actType, voiceRadioTechnology.sysModeName.c_str(), voiceRadioTechnology.actName.c_str());
1493 hdiId_ = HdiId::HREQ_MODEM_GET_VOICE_RADIO;
1494 resultInfo_ = responseInfo;
1495 NotifyAll();
1496 return 0;
1497 }
1498
GetBasebandVersionResponse(const RilRadioResponseInfo & responseInfo,const std::string & basebandVersion)1499 int32_t RilCallbackTest::GetBasebandVersionResponse(
1500 const RilRadioResponseInfo &responseInfo, const std::string &basebandVersion)
1501 {
1502 TELEPHONY_LOGI("GetBasebandVersionResponse basebandVersion : %{public}s", basebandVersion.c_str());
1503 hdiId_ = HdiId::HREQ_MODEM_GET_BASEBAND_VERSION;
1504 resultInfo_ = responseInfo;
1505 NotifyAll();
1506 return 0;
1507 }
1508
GetRrcConnectionStateUpdated(const RilRadioResponseInfo & responseInfo,int32_t state)1509 int32_t RilCallbackTest::GetRrcConnectionStateUpdated(const RilRadioResponseInfo &responseInfo, int32_t state)
1510 {
1511 TELEPHONY_LOGI("GetRrcConnectionStateUpdated state : %{public}d", state);
1512 return 0;
1513 }
1514
1515 // Data
PdpContextListUpdated(const RilRadioResponseInfo & responseInfo,const DataCallResultList & dataCallResultList)1516 int32_t RilCallbackTest::PdpContextListUpdated(
1517 const RilRadioResponseInfo &responseInfo, const DataCallResultList &dataCallResultList)
1518 {
1519 TELEPHONY_LOGI("RilCallbackTest::PdpContextListUpdated size:%{public}d", dataCallResultList.size);
1520 for (auto &setupDataCallResultInfo : dataCallResultList.dcList) {
1521 TELEPHONY_LOGI(
1522 "RilCallbackTest::PdpContextListUpdated flag:%{public}d reason:%{public}d retryTime:%{public}d "
1523 "cid:%{public}d active:%{public}d type:%{public}s netPortName:%{public}s address:%{public}s "
1524 "dns:%{public}s dnsSec:%{public}s gateway:%{public}s maxTransferUnit:%{public}d pCscfPrimAddr:%{public}s "
1525 "pCscfSecAddr:%{public}s pduSessionId:%{public}d",
1526 setupDataCallResultInfo.flag, setupDataCallResultInfo.reason, setupDataCallResultInfo.retryTime,
1527 setupDataCallResultInfo.cid, setupDataCallResultInfo.active, setupDataCallResultInfo.type.c_str(),
1528 setupDataCallResultInfo.netPortName.c_str(), setupDataCallResultInfo.address.c_str(),
1529 setupDataCallResultInfo.dns.c_str(), setupDataCallResultInfo.dnsSec.c_str(),
1530 setupDataCallResultInfo.gateway.c_str(), setupDataCallResultInfo.maxTransferUnit,
1531 setupDataCallResultInfo.pCscfPrimAddr.c_str(), setupDataCallResultInfo.pCscfSecAddr.c_str(),
1532 setupDataCallResultInfo.pduSessionId);
1533 }
1534 return 0;
1535 }
1536
DataLinkCapabilityUpdated(const RilRadioResponseInfo & responseInfo,const DataLinkCapability & dataLinkCapability)1537 int32_t RilCallbackTest::DataLinkCapabilityUpdated(
1538 const RilRadioResponseInfo &responseInfo, const DataLinkCapability &dataLinkCapability)
1539 {
1540 TELEPHONY_LOGI(
1541 "RilCallbackTest::DataLinkCapabilityUpdated primaryDownlinkKbps:%{public}d primaryUplinkKbps:%{public}d "
1542 "secondaryDownlinkKbps:%{public}d secondaryUplinkKbps:%{public}d",
1543 dataLinkCapability.primaryDownlinkKbps, dataLinkCapability.primaryUplinkKbps,
1544 dataLinkCapability.secondaryDownlinkKbps, dataLinkCapability.secondaryUplinkKbps);
1545 return 0;
1546 }
1547
ActivatePdpContextResponse(const RilRadioResponseInfo & responseInfo,const SetupDataCallResultInfo & setupDataCallResultInfo)1548 int32_t RilCallbackTest::ActivatePdpContextResponse(
1549 const RilRadioResponseInfo &responseInfo, const SetupDataCallResultInfo &setupDataCallResultInfo)
1550 {
1551 TELEPHONY_LOGI(
1552 "RilCallbackTest::ActivatePdpContextResponse flag:%{public}d reason:%{public}d retryTime:%{public}d "
1553 "cid:%{public}d active:%{public}d type:%{public}s netPortName:%{public}s address:%{public}s "
1554 "dns:%{public}s dnsSec:%{public}s gateway:%{public}s maxTransferUnit:%{public}d pCscfPrimAddr:%{public}s "
1555 "pCscfSecAddr:%{public}s pduSessionId:%{public}d",
1556 setupDataCallResultInfo.flag, setupDataCallResultInfo.reason, setupDataCallResultInfo.retryTime,
1557 setupDataCallResultInfo.cid, setupDataCallResultInfo.active, setupDataCallResultInfo.type.c_str(),
1558 setupDataCallResultInfo.netPortName.c_str(), setupDataCallResultInfo.address.c_str(),
1559 setupDataCallResultInfo.dns.c_str(), setupDataCallResultInfo.dnsSec.c_str(),
1560 setupDataCallResultInfo.gateway.c_str(), setupDataCallResultInfo.maxTransferUnit,
1561 setupDataCallResultInfo.pCscfPrimAddr.c_str(), setupDataCallResultInfo.pCscfSecAddr.c_str(),
1562 setupDataCallResultInfo.pduSessionId);
1563 hdiId_ = HdiId::HREQ_DATA_ACTIVATE_PDP_CONTEXT;
1564 resultInfo_ = responseInfo;
1565 NotifyAll();
1566 return 0;
1567 }
1568
DeactivatePdpContextResponse(const RilRadioResponseInfo & responseInfo)1569 int32_t RilCallbackTest::DeactivatePdpContextResponse(const RilRadioResponseInfo &responseInfo)
1570 {
1571 TELEPHONY_LOGI("RilCallbackTest::DeactivatePdpContextResponse error:%{public}d", responseInfo.error);
1572 hdiId_ = HdiId::HREQ_DATA_DEACTIVATE_PDP_CONTEXT;
1573 resultInfo_ = responseInfo;
1574 NotifyAll();
1575 return 0;
1576 }
1577
GetPdpContextListResponse(const RilRadioResponseInfo & responseInfo,const DataCallResultList & dataCallResultList)1578 int32_t RilCallbackTest::GetPdpContextListResponse(
1579 const RilRadioResponseInfo &responseInfo, const DataCallResultList &dataCallResultList)
1580 {
1581 TELEPHONY_LOGI("RilCallbackTest::GetPdpContextListResponse size:%{public}d", dataCallResultList.size);
1582 for (auto &setupDataCallResultInfo : dataCallResultList.dcList) {
1583 TELEPHONY_LOGI(
1584 "RilCallbackTest::GetPdpContextListResponse flag:%{public}d reason:%{public}d retryTime:%{public}d "
1585 "cid:%{public}d active:%{public}d type:%{public}s netPortName:%{public}s address:%{public}s "
1586 "dns:%{public}s dnsSec:%{public}s gateway:%{public}s maxTransferUnit:%{public}d pCscfPrimAddr:%{public}s "
1587 "pCscfSecAddr:%{public}s pduSessionId:%{public}d",
1588 setupDataCallResultInfo.flag, setupDataCallResultInfo.reason, setupDataCallResultInfo.retryTime,
1589 setupDataCallResultInfo.cid, setupDataCallResultInfo.active, setupDataCallResultInfo.type.c_str(),
1590 setupDataCallResultInfo.netPortName.c_str(), setupDataCallResultInfo.address.c_str(),
1591 setupDataCallResultInfo.dns.c_str(), setupDataCallResultInfo.dnsSec.c_str(),
1592 setupDataCallResultInfo.gateway.c_str(), setupDataCallResultInfo.maxTransferUnit,
1593 setupDataCallResultInfo.pCscfPrimAddr.c_str(), setupDataCallResultInfo.pCscfSecAddr.c_str(),
1594 setupDataCallResultInfo.pduSessionId);
1595 }
1596 hdiId_ = HdiId::HREQ_DATA_GET_PDP_CONTEXT_LIST;
1597 resultInfo_ = responseInfo;
1598 NotifyAll();
1599 return 0;
1600 }
1601
SetInitApnInfoResponse(const RilRadioResponseInfo & responseInfo)1602 int32_t RilCallbackTest::SetInitApnInfoResponse(const RilRadioResponseInfo &responseInfo)
1603 {
1604 TELEPHONY_LOGI("RilCallbackTest::SetInitApnInfoResponse error:%{public}d", responseInfo.error);
1605 hdiId_ = HdiId::HREQ_DATA_SET_INIT_APN_INFO;
1606 resultInfo_ = responseInfo;
1607 NotifyAll();
1608 return 0;
1609 }
1610
SetLinkBandwidthReportingRuleResponse(const RilRadioResponseInfo & responseInfo)1611 int32_t RilCallbackTest::SetLinkBandwidthReportingRuleResponse(const RilRadioResponseInfo &responseInfo)
1612 {
1613 TELEPHONY_LOGI("RilCallbackTest::SetLinkBandwidthReportingRuleResponse error:%{public}d", responseInfo.error);
1614 hdiId_ = HdiId::HREQ_DATA_SET_LINK_BANDWIDTH_REPORTING_RULE;
1615 resultInfo_ = responseInfo;
1616 NotifyAll();
1617 return 0;
1618 }
1619
GetLinkBandwidthInfoResponse(const RilRadioResponseInfo & responseInfo,const DataLinkBandwidthInfo & dataLinkBandwidthInfo)1620 int32_t RilCallbackTest::GetLinkBandwidthInfoResponse(
1621 const RilRadioResponseInfo &responseInfo, const DataLinkBandwidthInfo &dataLinkBandwidthInfo)
1622 {
1623 TELEPHONY_LOGI("RilCallbackTest::GetLinkBandwidthInfoResponse serial:%{public}d cid:%{public}d qi:%{public}d "
1624 "dlGfbr:%{public}d "
1625 "ulGfbr:%{public}d dlMfbr:%{public}d ulMfbr:%{public}d ulSambr:%{public}d dlSambr:%{public}d "
1626 "averagingWindow:%{public}d",
1627 dataLinkBandwidthInfo.serial, dataLinkBandwidthInfo.cid, dataLinkBandwidthInfo.qi, dataLinkBandwidthInfo.dlGfbr,
1628 dataLinkBandwidthInfo.ulGfbr, dataLinkBandwidthInfo.dlMfbr, dataLinkBandwidthInfo.ulMfbr,
1629 dataLinkBandwidthInfo.ulSambr, dataLinkBandwidthInfo.dlSambr, dataLinkBandwidthInfo.averagingWindow);
1630 hdiId_ = HdiId::HREQ_DATA_GET_LINK_BANDWIDTH_INFO;
1631 resultInfo_ = responseInfo;
1632 NotifyAll();
1633 return 0;
1634 }
1635
GetLinkCapabilityResponse(const RilRadioResponseInfo & responseInfo,const DataLinkCapability & dataLinkCapability)1636 int32_t RilCallbackTest::GetLinkCapabilityResponse(
1637 const RilRadioResponseInfo &responseInfo, const DataLinkCapability &dataLinkCapability)
1638 {
1639 TELEPHONY_LOGI("RilCallbackTest::GetLinkCapabilityResponse primaryDownlinkKbps:%{public}d "
1640 "primaryUplinkKbps:%{public}d secondaryDownlinkKbps:%{public}d "
1641 "secondaryUplinkKbps:%{public}d",
1642 dataLinkCapability.primaryDownlinkKbps, dataLinkCapability.primaryUplinkKbps,
1643 dataLinkCapability.secondaryDownlinkKbps, dataLinkCapability.secondaryUplinkKbps);
1644 hdiId_ = HdiId::HREQ_DATA_GET_LINK_CAPABILITY;
1645 resultInfo_ = responseInfo;
1646 NotifyAll();
1647 return 0;
1648 }
1649
SetDataPermittedResponse(const RilRadioResponseInfo & responseInfo)1650 int32_t RilCallbackTest::SetDataPermittedResponse(const RilRadioResponseInfo &responseInfo)
1651 {
1652 TELEPHONY_LOGI("RilCallbackTest::SetDataPermittedResponse error:%{public}d", responseInfo.error);
1653 hdiId_ = HdiId::HREQ_DATA_SET_DATA_PERMITTED;
1654 resultInfo_ = responseInfo;
1655 NotifyAll();
1656 return 0;
1657 }
1658
SetDataProfileInfoResponse(const RilRadioResponseInfo & responseInfo)1659 int32_t RilCallbackTest::SetDataProfileInfoResponse(const RilRadioResponseInfo &responseInfo)
1660 {
1661 TELEPHONY_LOGI("RilCallbackTest::SetDataProfileInfoResponse error:%{public}d", responseInfo.error);
1662 hdiId_ = HdiId::HREQ_DATA_SET_DATA_PROFILE_INFO;
1663 resultInfo_ = responseInfo;
1664 NotifyAll();
1665 return 0;
1666 }
1667
CleanAllConnectionsResponse(const RilRadioResponseInfo & responseInfo)1668 int32_t RilCallbackTest::CleanAllConnectionsResponse(const RilRadioResponseInfo &responseInfo)
1669 {
1670 TELEPHONY_LOGI("RilCallbackTest::CleanAllConnectionsResponse error:%{public}d", responseInfo.error);
1671 hdiId_ = HdiId::HREQ_DATA_CLEAN_ALL_CONNECTIONS;
1672 resultInfo_ = responseInfo;
1673 NotifyAll();
1674 return 0;
1675 }
1676
NetworkSliceUrspRpt(const RilRadioResponseInfo & responseInfo,const NetworkSliceUrspInfo & networkSliceUrspInfo)1677 int32_t RilCallbackTest::NetworkSliceUrspRpt(const RilRadioResponseInfo &responseInfo,
1678 const NetworkSliceUrspInfo &networkSliceUrspInfo)
1679 {
1680 TELEPHONY_LOGI("RilCallbackTest::NetworkSliceUrspRpt:%{public}d", (int)networkSliceUrspInfo.urspInfo.size());
1681 return 0;
1682 }
1683
NetworkSliceAllowedNssaiRpt(const RilRadioResponseInfo & responseInfo,const NetworkSliceAllowedNssaiInfo & networkSliceAllowedNssaiInfo)1684 int32_t RilCallbackTest::NetworkSliceAllowedNssaiRpt(const RilRadioResponseInfo &responseInfo,
1685 const NetworkSliceAllowedNssaiInfo &networkSliceAllowedNssaiInfo)
1686 {
1687 TELEPHONY_LOGI("RilCallbackTest::NetworkSliceAllowedNssaiRpt:%{public}d",
1688 (int)networkSliceAllowedNssaiInfo.allowednssaiInfo.size());
1689 return 0;
1690 }
1691
NetworkSliceEhplmnRpt(const RilRadioResponseInfo & responseInfo,const NetworkSliceEhplmnInfo & networkSliceEhplmnInfo)1692 int32_t RilCallbackTest::NetworkSliceEhplmnRpt(const RilRadioResponseInfo &responseInfo,
1693 const NetworkSliceEhplmnInfo &networkSliceEhplmnInfo)
1694 {
1695 TELEPHONY_LOGI("RilCallbackTest::NetworkSliceEhplmnRpt:%{public}d", (int)networkSliceEhplmnInfo.ehplmnInfo.size());
1696 return 0;
1697 }
1698
1699 // Sms
NewSmsNotify(const HDI::Ril::V1_1::RilRadioResponseInfo & responseInfo,const SmsMessageInfo & smsMessageInfo)1700 int32_t RilCallbackTest::NewSmsNotify(
1701 const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo, const SmsMessageInfo &smsMessageInfo)
1702 {
1703 TELEPHONY_LOGI("RilCallbackTest::NewSmsNotify smsMessageInfo size : %{public}d", smsMessageInfo.size);
1704 return 0;
1705 }
1706
NewCdmaSmsNotify(const HDI::Ril::V1_1::RilRadioResponseInfo & responseInfo,const SmsMessageInfo & smsMessageInfo)1707 int32_t RilCallbackTest::NewCdmaSmsNotify(
1708 const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo, const SmsMessageInfo &smsMessageInfo)
1709 {
1710 TELEPHONY_LOGI("RilCallbackTest::NewCdmaSmsNotify smsMessageInfo size : %{public}d", smsMessageInfo.size);
1711 return 0;
1712 }
1713
SmsStatusReportNotify(const HDI::Ril::V1_1::RilRadioResponseInfo & responseInfo,const SmsMessageInfo & smsMessageInfo)1714 int32_t RilCallbackTest::SmsStatusReportNotify(
1715 const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo, const SmsMessageInfo &smsMessageInfo)
1716 {
1717 TELEPHONY_LOGI("RilCallbackTest::SmsStatusReportNotify smsMessageInfo size : %{public}d", smsMessageInfo.size);
1718 return 0;
1719 }
1720
NewSmsStoredOnSimNotify(const HDI::Ril::V1_1::RilRadioResponseInfo & responseInfo,int32_t recordNumber,int32_t indicationType)1721 int32_t RilCallbackTest::NewSmsStoredOnSimNotify(
1722 const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo, int32_t recordNumber, int32_t indicationType)
1723 {
1724 TELEPHONY_LOGI("RilCallbackTest::NewSmsStoredOnSimNotify recordNumber : %{public}d, indicationType : %{public}d",
1725 recordNumber, indicationType);
1726 return 0;
1727 }
1728
CBConfigNotify(const HDI::Ril::V1_1::RilRadioResponseInfo & responseInfo,const CBConfigReportInfo & cellBroadConfigReportInfo)1729 int32_t RilCallbackTest::CBConfigNotify(
1730 const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo, const CBConfigReportInfo &cellBroadConfigReportInfo)
1731 {
1732 TELEPHONY_LOGI("RilCallbackTest::CBConfigNotify cellBroadConfigReportInfo dcs : %{public}s",
1733 cellBroadConfigReportInfo.dcs.c_str());
1734 return 0;
1735 }
1736
SendGsmSmsResponse(const RilRadioResponseInfo & responseInfo,const SendSmsResultInfo & sendSmsResultInfo)1737 int32_t RilCallbackTest::SendGsmSmsResponse(
1738 const RilRadioResponseInfo &responseInfo, const SendSmsResultInfo &sendSmsResultInfo)
1739 {
1740 TELEPHONY_LOGI("RilCallbackTest::SendGsmSmsResponse sendSmsResultInfo pdu : %{public}s, error : %{public}d",
1741 sendSmsResultInfo.pdu.c_str(), sendSmsResultInfo.errCode);
1742 hdiId_ = HdiId::HREQ_SMS_SEND_GSM_SMS;
1743 resultInfo_ = responseInfo;
1744 NotifyAll();
1745 return 0;
1746 }
1747
SendCdmaSmsResponse(const RilRadioResponseInfo & responseInfo,const SendSmsResultInfo & sendSmsResultInfo)1748 int32_t RilCallbackTest::SendCdmaSmsResponse(
1749 const RilRadioResponseInfo &responseInfo, const SendSmsResultInfo &sendSmsResultInfo)
1750 {
1751 TELEPHONY_LOGI("RilCallbackTest::SendCdmaSmsResponse sendSmsResultInfo pdu : %{public}s, error : %{public}d",
1752 sendSmsResultInfo.pdu.c_str(), sendSmsResultInfo.errCode);
1753 hdiId_ = HdiId::HREQ_SMS_SEND_CDMA_SMS;
1754 resultInfo_ = responseInfo;
1755 NotifyAll();
1756 return 0;
1757 }
1758
AddSimMessageResponse(const RilRadioResponseInfo & responseInfo)1759 int32_t RilCallbackTest::AddSimMessageResponse(const RilRadioResponseInfo &responseInfo)
1760 {
1761 TELEPHONY_LOGI("RilCallbackTest::AddSimMessageResponse error : %{public}d", responseInfo.error);
1762 hdiId_ = HdiId::HREQ_SMS_ADD_SIM_MESSAGE;
1763 resultInfo_ = responseInfo;
1764 NotifyAll();
1765 return 0;
1766 }
1767
DelSimMessageResponse(const RilRadioResponseInfo & responseInfo)1768 int32_t RilCallbackTest::DelSimMessageResponse(const RilRadioResponseInfo &responseInfo)
1769 {
1770 TELEPHONY_LOGI("RilCallbackTest::DelSimMessageResponse error : %{public}d", responseInfo.error);
1771 hdiId_ = HdiId::HREQ_SMS_DEL_SIM_MESSAGE;
1772 resultInfo_ = responseInfo;
1773 NotifyAll();
1774 return 0;
1775 }
1776
UpdateSimMessageResponse(const RilRadioResponseInfo & responseInfo)1777 int32_t RilCallbackTest::UpdateSimMessageResponse(const RilRadioResponseInfo &responseInfo)
1778 {
1779 TELEPHONY_LOGI("RilCallbackTest::UpdateSimMessageResponse error : %{public}d", responseInfo.error);
1780 hdiId_ = HdiId::HREQ_SMS_UPDATE_SIM_MESSAGE;
1781 resultInfo_ = responseInfo;
1782 NotifyAll();
1783 return 0;
1784 }
1785
AddCdmaSimMessageResponse(const RilRadioResponseInfo & responseInfo)1786 int32_t RilCallbackTest::AddCdmaSimMessageResponse(const RilRadioResponseInfo &responseInfo)
1787 {
1788 TELEPHONY_LOGI("RilCallbackTest::AddCdmaSimMessageResponse error : %{public}d", responseInfo.error);
1789 hdiId_ = HdiId::HREQ_SMS_ADD_CDMA_SIM_MESSAGE;
1790 resultInfo_ = responseInfo;
1791 NotifyAll();
1792 return 0;
1793 }
1794
DelCdmaSimMessageResponse(const RilRadioResponseInfo & responseInfo)1795 int32_t RilCallbackTest::DelCdmaSimMessageResponse(const RilRadioResponseInfo &responseInfo)
1796 {
1797 TELEPHONY_LOGI("RilCallbackTest::DelCdmaSimMessageResponse error : %{public}d", responseInfo.error);
1798 hdiId_ = HdiId::HREQ_SMS_DEL_CDMA_SIM_MESSAGE;
1799 resultInfo_ = responseInfo;
1800 NotifyAll();
1801 return 0;
1802 }
1803
UpdateCdmaSimMessageResponse(const RilRadioResponseInfo & responseInfo)1804 int32_t RilCallbackTest::UpdateCdmaSimMessageResponse(const RilRadioResponseInfo &responseInfo)
1805 {
1806 TELEPHONY_LOGI("RilCallbackTest::UpdateCdmaSimMessageResponse error : %{public}d", responseInfo.error);
1807 hdiId_ = HdiId::HREQ_SMS_UPDATE_CDMA_SIM_MESSAGE;
1808 resultInfo_ = responseInfo;
1809 NotifyAll();
1810 return 0;
1811 }
1812
SetSmscAddrResponse(const RilRadioResponseInfo & responseInfo)1813 int32_t RilCallbackTest::SetSmscAddrResponse(const RilRadioResponseInfo &responseInfo)
1814 {
1815 TELEPHONY_LOGI("RilCallbackTest::SetSmscAddrResponse error : %{public}d", responseInfo.error);
1816 hdiId_ = HdiId::HREQ_SMS_SET_SMSC_ADDR;
1817 resultInfo_ = responseInfo;
1818 NotifyAll();
1819 return 0;
1820 }
1821
GetSmscAddrResponse(const RilRadioResponseInfo & responseInfo,const ServiceCenterAddress & serviceCenterAddress)1822 int32_t RilCallbackTest::GetSmscAddrResponse(
1823 const RilRadioResponseInfo &responseInfo, const ServiceCenterAddress &serviceCenterAddress)
1824 {
1825 TELEPHONY_LOGI("RilCallbackTest::GetSmscAddrResponse serviceCenterAddress tosca : %{public}d, address : %{public}s",
1826 serviceCenterAddress.tosca, serviceCenterAddress.address.c_str());
1827 smscAddr_ = serviceCenterAddress.address;
1828 hdiId_ = HdiId::HREQ_SMS_GET_SMSC_ADDR;
1829 resultInfo_ = responseInfo;
1830 NotifyAll();
1831 return 0;
1832 }
1833
SetCBConfigResponse(const RilRadioResponseInfo & responseInfo)1834 int32_t RilCallbackTest::SetCBConfigResponse(const RilRadioResponseInfo &responseInfo)
1835 {
1836 TELEPHONY_LOGI("RilCallbackTest::SetCBConfigResponse error : %{public}d", responseInfo.error);
1837 hdiId_ = HdiId::HREQ_SMS_SET_CB_CONFIG;
1838 resultInfo_ = responseInfo;
1839 NotifyAll();
1840 return 0;
1841 }
1842
GetCBConfigResponse(const RilRadioResponseInfo & responseInfo,const CBConfigInfo & cellBroadcastInfo)1843 int32_t RilCallbackTest::GetCBConfigResponse(
1844 const RilRadioResponseInfo &responseInfo, const CBConfigInfo &cellBroadcastInfo)
1845 {
1846 TELEPHONY_LOGI("RilCallbackTest::GetCBConfigResponse cellBroadcastInfo mids : %{public}s, dcss: %{public}s",
1847 cellBroadcastInfo.mids.c_str(), cellBroadcastInfo.dcss.c_str());
1848 hdiId_ = HdiId::HREQ_SMS_GET_CB_CONFIG;
1849 resultInfo_ = responseInfo;
1850 NotifyAll();
1851 return 0;
1852 }
1853
SetCdmaCBConfigResponse(const RilRadioResponseInfo & responseInfo)1854 int32_t RilCallbackTest::SetCdmaCBConfigResponse(const RilRadioResponseInfo &responseInfo)
1855 {
1856 TELEPHONY_LOGI("RilCallbackTest::SetCdmaCBConfigResponse error : %{public}d", responseInfo.error);
1857 hdiId_ = HdiId::HREQ_SMS_SET_CDMA_CB_CONFIG;
1858 resultInfo_ = responseInfo;
1859 NotifyAll();
1860 return 0;
1861 }
1862
GetCdmaCBConfigResponse(const RilRadioResponseInfo & responseInfo,const CdmaCBConfigInfo & cdmaCBConfigInfo)1863 int32_t RilCallbackTest::GetCdmaCBConfigResponse(
1864 const RilRadioResponseInfo &responseInfo, const CdmaCBConfigInfo &cdmaCBConfigInfo)
1865 {
1866 TELEPHONY_LOGI(
1867 "RilCallbackTest::GetCdmaCBConfigResponse cdmaCBConfigInfo service : %{public}d, language : %{public}d, "
1868 "checked: %{public}d",
1869 cdmaCBConfigInfo.service, cdmaCBConfigInfo.language, cdmaCBConfigInfo.checked);
1870 hdiId_ = HdiId::HREQ_SMS_GET_CDMA_CB_CONFIG;
1871 resultInfo_ = responseInfo;
1872 NotifyAll();
1873 return 0;
1874 }
1875
SendSmsMoreModeResponse(const RilRadioResponseInfo & responseInfo,const SendSmsResultInfo & sendSmsResultInfo)1876 int32_t RilCallbackTest::SendSmsMoreModeResponse(
1877 const RilRadioResponseInfo &responseInfo, const SendSmsResultInfo &sendSmsResultInfo)
1878 {
1879 TELEPHONY_LOGI("RilCallbackTest::SendSmsMoreModeResponse sendSmsResultInfo pdu : %{public}s, error : %{public}d",
1880 sendSmsResultInfo.pdu.c_str(), sendSmsResultInfo.errCode);
1881 hdiId_ = HdiId::HREQ_SMS_SEND_SMS_MORE_MODE;
1882 resultInfo_ = responseInfo;
1883 NotifyAll();
1884 return 0;
1885 }
1886
SendSmsAckResponse(const RilRadioResponseInfo & responseInfo)1887 int32_t RilCallbackTest::SendSmsAckResponse(const RilRadioResponseInfo &responseInfo)
1888 {
1889 TELEPHONY_LOGI("RilCallbackTest::SendSmsAckResponse error: %{public}d", responseInfo.error);
1890 hdiId_ = HdiId::HREQ_SMS_SEND_SMS_ACK;
1891 resultInfo_ = responseInfo;
1892 NotifyAll();
1893 return 0;
1894 }
1895
CommonErrorResponse(const RilRadioResponseInfo & responseInfo)1896 int32_t RilCallbackTest::CommonErrorResponse(const RilRadioResponseInfo &responseInfo)
1897 {
1898 TELEPHONY_LOGI("RilCallbackTest::CommonErrorResponse type:%{public}d error: %{public}d",
1899 responseInfo.type, responseInfo.error);
1900 return 0;
1901 }
1902
1903 } // namespace Telephony
1904 } // namespace OHOS
1905