diff --git a/common/include/ipc/model/ipc_credential_auth_status_req.h b/common/include/ipc/model/ipc_credential_auth_status_req.h index 730d077bf7a4a1185784196d3f09ec9cab551ee8..f1988e56c56908d37e54bde3f587a53ea738847c 100644 --- a/common/include/ipc/model/ipc_credential_auth_status_req.h +++ b/common/include/ipc/model/ipc_credential_auth_status_req.h @@ -25,23 +25,23 @@ class IpcNotifyCredentialAuthStatusReq : public IpcReq { public: /** - * @tc.name: IpcNotifyCredentialAuthStatusReq::GetDeviceList - * @tc.desc: Get DeviceList of the Ipc Notify Credential Auth Status Request + * @tc.name: IpcNotifyCredentialAuthStatusReq::GetProofInfo + * @tc.desc: Get proofInfo of the Ipc Notify Credential Auth Status Request * @tc.type: FUNC */ - std::string GetDeviceList() const + std::string GetProofInfo() const { - return deviceList_; + return proofInfo_; } /** - * @tc.name: IpcNotifyCredentialAuthStatusReq::SetDeviceList - * @tc.desc: Set DeviceList of the Ipc Notify Credential Auth Status Request + * @tc.name: IpcNotifyCredentialAuthStatusReq::SetProofInfo + * @tc.desc: Set proofInfo of the Ipc Notify Credential Auth Status Request * @tc.type: FUNC */ - void SetDeviceList(const std::string &deviceList) + void SetProofInfo(const std::string &proofInfo) { - deviceList_ = deviceList; + proofInfo_ = proofInfo; } /** @@ -85,7 +85,7 @@ public: } private: - std::string deviceList_; + std::string proofInfo_; uint16_t deviceTypeId_ = 0; int32_t errcode_ = 0; }; diff --git a/interfaces/inner_kits/native_cpp/include/device_manager_callback.h b/interfaces/inner_kits/native_cpp/include/device_manager_callback.h index 61989ccf34bfc9b969a1f17b7b2a52c16477d245..2e431380cf506dba9e29b7b3ed4ed269eb9f7cc3 100644 --- a/interfaces/inner_kits/native_cpp/include/device_manager_callback.h +++ b/interfaces/inner_kits/native_cpp/include/device_manager_callback.h @@ -154,7 +154,7 @@ public: virtual ~CredentialAuthStatusCallback() { } - virtual void OnCredentialAuthStatus(const std::string &deviceList, uint16_t deviceTypeId, int32_t errcode) = 0; + virtual void OnCredentialAuthStatus(const std::string &proofInfo, uint16_t deviceTypeId, int32_t errcode) = 0; }; } // namespace DistributedHardware } // namespace OHOS diff --git a/interfaces/inner_kits/native_cpp/include/notify/device_manager_notify.h b/interfaces/inner_kits/native_cpp/include/notify/device_manager_notify.h index ed39e630a8a6d24adf8f3e0e16e4e294b84feb13..6d59fa6b07b158b13c1ee784b51dc03d22e7cc92 100644 --- a/interfaces/inner_kits/native_cpp/include/notify/device_manager_notify.h +++ b/interfaces/inner_kits/native_cpp/include/notify/device_manager_notify.h @@ -119,7 +119,7 @@ public: void OnDeviceTrustChange(const std::string &pkgName, const std::string &udid, const std::string &uuid, int32_t authForm); void OnDeviceScreenStatus(const std::string &pkgName, const DmDeviceInfo &deviceInfo); - void OnCredentialAuthStatus(const std::string &pkgName, const std::string &deviceList, + void OnCredentialAuthStatus(const std::string &pkgName, const std::string &proofInfo, uint16_t deviceTypeId, int32_t errcode); private: diff --git a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_cmd_parser.cpp b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_cmd_parser.cpp index eee8b4acb631d500147f0c006f340011576852b8..aa925ca8202134ac1626653573e1bf1efd92ed47 100644 --- a/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_cmd_parser.cpp +++ b/interfaces/inner_kits/native_cpp/src/ipc/standard/ipc_cmd_parser.cpp @@ -1736,10 +1736,10 @@ ON_IPC_READ_RESPONSE(GET_NETWORKID_BY_UDID, MessageParcel &reply, std::shared_pt ON_IPC_CMD(SERVICE_CREDENTIAL_AUTH_STATUS_NOTIFY, MessageParcel &data, MessageParcel &reply) { std::string pkgName = data.ReadString(); - std::string deviceList = data.ReadString(); + std::string proofInfo = data.ReadString(); uint16_t deviceTypeId = data.ReadUint16(); int32_t errCode = data.ReadInt32(); - DeviceManagerNotify::GetInstance().OnCredentialAuthStatus(pkgName, deviceList, deviceTypeId, errCode); + DeviceManagerNotify::GetInstance().OnCredentialAuthStatus(pkgName, proofInfo, deviceTypeId, errCode); reply.WriteInt32(DM_OK); return DM_OK; diff --git a/interfaces/inner_kits/native_cpp/src/notify/device_manager_notify.cpp b/interfaces/inner_kits/native_cpp/src/notify/device_manager_notify.cpp index f2072b0a0c2d4bfd33f782b4baaf05f44f1d4558..23077009f0b842ef2f9b686ad0ec10e20b185865 100644 --- a/interfaces/inner_kits/native_cpp/src/notify/device_manager_notify.cpp +++ b/interfaces/inner_kits/native_cpp/src/notify/device_manager_notify.cpp @@ -1169,7 +1169,7 @@ void DeviceManagerNotify::UnRegisterCredentialAuthStatusCallback(const std::stri credentialAuthStatusCallback_.erase(pkgName); } -void DeviceManagerNotify::OnCredentialAuthStatus(const std::string &pkgName, const std::string &deviceList, +void DeviceManagerNotify::OnCredentialAuthStatus(const std::string &pkgName, const std::string &proofInfo, uint16_t deviceTypeId, int32_t errcode) { if (pkgName.empty()) { @@ -1190,7 +1190,7 @@ void DeviceManagerNotify::OnCredentialAuthStatus(const std::string &pkgName, con LOGE("error, registered credential auth status callback is nullptr."); return; } - tempCbk->OnCredentialAuthStatus(deviceList, deviceTypeId, errcode); + tempCbk->OnCredentialAuthStatus(proofInfo, deviceTypeId, errcode); } } // namespace DistributedHardware } // namespace OHOS diff --git a/services/implementation/include/device_manager_service_impl.h b/services/implementation/include/device_manager_service_impl.h index 551f915189a3ae630aebb616b2dad18cbbf2fc42..d312b63ef833971f6d803c28a569ffde9a93f171 100644 --- a/services/implementation/include/device_manager_service_impl.h +++ b/services/implementation/include/device_manager_service_impl.h @@ -131,7 +131,7 @@ public: void HandleIdentAccountLogout(const std::string &udid, int32_t userId, const std::string &accountId); void HandleDeviceScreenStatusChange(DmDeviceInfo &devInfo); int32_t StopAuthenticateDevice(const std::string &pkgName); - void HandleCredentialAuthStatus(const std::string &deviceList, uint16_t deviceTypeId, int32_t errcode); + void HandleCredentialAuthStatus(const std::string &proofInfo, uint16_t deviceTypeId, int32_t errcode); int32_t ProcessAppUnintall(const std::string &appId, int32_t accessTokenId); private: diff --git a/services/implementation/include/device_manager_service_impl_lite.h b/services/implementation/include/device_manager_service_impl_lite.h index 67c30b86348081d04a1ac21c9e31575b35484e30..38be101cf6acf570445c5196ecf77c70cf328f4f 100644 --- a/services/implementation/include/device_manager_service_impl_lite.h +++ b/services/implementation/include/device_manager_service_impl_lite.h @@ -137,7 +137,7 @@ public: void HandleDeviceScreenStatusChange(DmDeviceInfo &devInfo); void HandleUserSwitched(int32_t switchUserId); int32_t StopAuthenticateDevice(const std::string &pkgName); - void HandleCredentialAuthStatus(const std::string &deviceList, uint16_t deviceTypeId, int32_t errcode); + void HandleCredentialAuthStatus(const std::string &proofInfo, uint16_t deviceTypeId, int32_t errcode); int32_t ProcessAppUnintall(const std::string &appId, int32_t accessTokenId); private: diff --git a/services/implementation/include/devicestate/dm_device_state_manager.h b/services/implementation/include/devicestate/dm_device_state_manager.h index e1343283e300558a034106b1d272c6c66a015cac..091ff6da99764255550ab11e461d38bf3547714a 100644 --- a/services/implementation/include/devicestate/dm_device_state_manager.h +++ b/services/implementation/include/devicestate/dm_device_state_manager.h @@ -96,7 +96,7 @@ public: bool CheckIsOnline(const std::string &udid); void DeleteOffLineTimer(std::string udidHash); void HandleDeviceScreenStatusChange(DmDeviceInfo &devInfo); - void HandleCredentialAuthStatus(const std::string &deviceList, uint16_t deviceTypeId, int32_t errcode); + void HandleCredentialAuthStatus(const std::string &proofInfo, uint16_t deviceTypeId, int32_t errcode); private: void StartEventThread(); void StopEventThread(); diff --git a/services/implementation/src/device_manager_service_impl.cpp b/services/implementation/src/device_manager_service_impl.cpp index f24af10f611ac67fa4fcaa7b5254fe541a9f8e51..32fa0c3676d11532c37e314be31abf40cd105d4f 100644 --- a/services/implementation/src/device_manager_service_impl.cpp +++ b/services/implementation/src/device_manager_service_impl.cpp @@ -853,11 +853,11 @@ void DeviceManagerServiceImpl::HandleDeviceScreenStatusChange(DmDeviceInfo &devI deviceStateMgr_->HandleDeviceScreenStatusChange(devInfo); } -void DeviceManagerServiceImpl::HandleCredentialAuthStatus(const std::string &deviceList, uint16_t deviceTypeId, +void DeviceManagerServiceImpl::HandleCredentialAuthStatus(const std::string &proofInfo, uint16_t deviceTypeId, int32_t errcode) { CHECK_NULL_VOID(deviceStateMgr_); - deviceStateMgr_->HandleCredentialAuthStatus(deviceList, deviceTypeId, errcode); + deviceStateMgr_->HandleCredentialAuthStatus(proofInfo, deviceTypeId, errcode); } int32_t DeviceManagerServiceImpl::ProcessAppUnintall(const std::string &appId, int32_t accessTokenId) diff --git a/services/implementation/src/device_manager_service_impl_lite.cpp b/services/implementation/src/device_manager_service_impl_lite.cpp index d8b73f8566076b62075aab4d4c7439bf29d7fc67..0306d82f052eca994544f64b5dd96a299d269ca1 100644 --- a/services/implementation/src/device_manager_service_impl_lite.cpp +++ b/services/implementation/src/device_manager_service_impl_lite.cpp @@ -524,10 +524,10 @@ int32_t DeviceManagerServiceImpl::StopAuthenticateDevice(const std::string &pkgN return 0; } -void DeviceManagerServiceImpl::HandleCredentialAuthStatus(const std::string &deviceList, uint16_t deviceTypeId, +void DeviceManagerServiceImpl::HandleCredentialAuthStatus(const std::string &proofInfo, uint16_t deviceTypeId, int32_t errcode) { - (void)deviceList; + (void)proofInfo; (void)deviceTypeId; (void)errcode; return; diff --git a/services/implementation/src/devicestate/dm_device_state_manager.cpp b/services/implementation/src/devicestate/dm_device_state_manager.cpp index 1848fc3b1dc4c291cab73b4c9c2fdb8849d61f0f..8086a8b3f9c06753392f7e36c5f73c3dad750faa 100644 --- a/services/implementation/src/devicestate/dm_device_state_manager.cpp +++ b/services/implementation/src/devicestate/dm_device_state_manager.cpp @@ -527,14 +527,14 @@ void DmDeviceStateManager::HandleDeviceScreenStatusChange(DmDeviceInfo &devInfo) softbusConnector_->ClearPkgName(); } -void DmDeviceStateManager::HandleCredentialAuthStatus(const std::string &deviceList, uint16_t deviceTypeId, +void DmDeviceStateManager::HandleCredentialAuthStatus(const std::string &proofInfo, uint16_t deviceTypeId, int32_t errcode) { if (listener_ == nullptr) { LOGE("Failed, listener_ is null."); return; } - listener_->OnCredentialAuthStatus(std::string(DM_PKG_NAME), deviceList, deviceTypeId, errcode); + listener_->OnCredentialAuthStatus(std::string(DM_PKG_NAME), proofInfo, deviceTypeId, errcode); } } // namespace DistributedHardware } // namespace OHOS \ No newline at end of file diff --git a/services/service/include/device_manager_service.h b/services/service/include/device_manager_service.h index b735cfd55696481a18449ed9d7ad3888bda29c9d..7e6eabc784a209e8a907926ffe6d2652d8e7aeaa 100644 --- a/services/service/include/device_manager_service.h +++ b/services/service/include/device_manager_service.h @@ -201,7 +201,7 @@ public: int32_t &screenStatus); void SubscribePackageCommonEvent(); int32_t GetNetworkIdByUdid(const std::string &pkgName, const std::string &udid, std::string &networkId); - void HandleCredentialAuthStatus(const std::string &deviceList, uint16_t deviceTypeId, int32_t errcode); + void HandleCredentialAuthStatus(const std::string &proofInfo, uint16_t deviceTypeId, int32_t errcode); int32_t SetLocalDeviceName(const std::string &localDeviceName); private: bool IsDMServiceImplReady(); diff --git a/services/service/include/device_manager_service_listener.h b/services/service/include/device_manager_service_listener.h index ba2641f5cb23af5d5da8b5e03a2b15dbade00940..b35acf3d7bc34d3a01bf12798344d42d43f7e3f6 100644 --- a/services/service/include/device_manager_service_listener.h +++ b/services/service/include/device_manager_service_listener.h @@ -73,7 +73,7 @@ public: const std::string &content) override; void OnDeviceTrustChange(const std::string &udid, const std::string &uuid, DmAuthForm authForm) override; void OnDeviceScreenStateChange(const std::string &pkgName, DmDeviceInfo &devInfo) override; - void OnCredentialAuthStatus(const std::string &pkgName, const std::string &deviceList, uint16_t deviceTypeId, + void OnCredentialAuthStatus(const std::string &pkgName, const std::string &proofInfo, uint16_t deviceTypeId, int32_t errcode) override; void OnAppUnintall(const std::string &pkgName) override; diff --git a/services/service/include/idevice_manager_service_impl.h b/services/service/include/idevice_manager_service_impl.h index f447e2ebca4811ff3be5db62dd0212c6cb7ac8fa..6d47758f3ebd84b6e0d391dc7fb0059766590bd9 100644 --- a/services/service/include/idevice_manager_service_impl.h +++ b/services/service/include/idevice_manager_service_impl.h @@ -273,7 +273,7 @@ public: virtual void HandleDeviceScreenStatusChange(DmDeviceInfo &devInfo) = 0; virtual void HandleUserSwitched(int32_t switchUserId) = 0; virtual int32_t StopAuthenticateDevice(const std::string &pkgName) = 0; - virtual void HandleCredentialAuthStatus(const std::string &deviceList, uint16_t deviceTypeId, + virtual void HandleCredentialAuthStatus(const std::string &proofInfo, uint16_t deviceTypeId, int32_t errcode) = 0; virtual int32_t ProcessAppUnintall(const std::string &appId, int32_t accessTokenId) = 0; }; diff --git a/services/service/include/idevice_manager_service_listener.h b/services/service/include/idevice_manager_service_listener.h index e611b3b5f4d794fe8b14adfd2205dbd35aff34a0..385a68bf1652dd5f35fb831343df1909876c4737 100644 --- a/services/service/include/idevice_manager_service_listener.h +++ b/services/service/include/idevice_manager_service_listener.h @@ -164,7 +164,7 @@ public: * @tc.desc: Candidate Restrict Status Change of the DeviceManager Service Listener * @tc.type: FUNC */ - virtual void OnCredentialAuthStatus(const std::string &pkgName, const std::string &deviceList, + virtual void OnCredentialAuthStatus(const std::string &pkgName, const std::string &proofInfo, uint16_t deviceTypeId, int32_t errcode) = 0; virtual void OnAppUnintall(const std::string &pkgName) = 0; }; diff --git a/services/service/include/softbus/softbus_listener.h b/services/service/include/softbus/softbus_listener.h index 52ee84058068f64d610c4444eadd353f87c59fa5..a31a3a4c06ccd5ca2fafdadec4098ec0342716aa 100644 --- a/services/service/include/softbus/softbus_listener.h +++ b/services/service/include/softbus/softbus_listener.h @@ -58,9 +58,9 @@ public: static void DeviceTrustedChange(const std::string &msg); static void OnDeviceScreenStatusChanged(NodeStatusType type, NodeStatus *status); static void DeviceScreenStatusChange(DmDeviceInfo deviceInfo); - static void OnCredentialAuthStatus(const char *deviceList, uint32_t deviceListLen, uint16_t deviceTypeId, + static void OnCredentialAuthStatus(const char *proofInfo, uint32_t proofLen, uint16_t deviceTypeId, int32_t errcode); - static void CredentialAuthStatusProcess(std::string deviceList, uint16_t deviceTypeId, int32_t errcode); + static void CredentialAuthStatusProcess(std::string proofInfo, uint16_t deviceTypeId, int32_t errcode); static void CacheDiscoveredDevice(const DeviceInfo *device); static void ClearDiscoveredDevice(); diff --git a/services/service/src/device_manager_service.cpp b/services/service/src/device_manager_service.cpp index 641331f7c9a082835a95f9d9f7cea70b25ed347b..9611b1f2c34c26c81dd5ff3a0ab77da3d1844142 100755 --- a/services/service/src/device_manager_service.cpp +++ b/services/service/src/device_manager_service.cpp @@ -2000,11 +2000,11 @@ void DeviceManagerService::SubscribePackageCommonEvent() #endif } -void DeviceManagerService::HandleCredentialAuthStatus(const std::string &deviceList, uint16_t deviceTypeId, +void DeviceManagerService::HandleCredentialAuthStatus(const std::string &proofInfo, uint16_t deviceTypeId, int32_t errcode) { if (IsDMServiceImplReady()) { - dmServiceImpl_->HandleCredentialAuthStatus(deviceList, deviceTypeId, errcode); + dmServiceImpl_->HandleCredentialAuthStatus(proofInfo, deviceTypeId, errcode); } } diff --git a/services/service/src/device_manager_service_listener.cpp b/services/service/src/device_manager_service_listener.cpp index 56e05b4d73398b63c9f54d5a78ea88d1e3eef856..6235ed6b2372ad54fa18aad5c54cabc6ab2892ff 100644 --- a/services/service/src/device_manager_service_listener.cpp +++ b/services/service/src/device_manager_service_listener.cpp @@ -553,13 +553,13 @@ void DeviceManagerServiceListener::RemoveOnlinePkgName(const DmDeviceInfo &info) } void DeviceManagerServiceListener::OnCredentialAuthStatus(const std::string &pkgName, - const std::string &deviceList, uint16_t deviceTypeId, int32_t errcode) + const std::string &proofInfo, uint16_t deviceTypeId, int32_t errcode) { LOGI("In, pkgName = %{public}s", pkgName.c_str()); std::shared_ptr pReq = std::make_shared(); std::shared_ptr pRsp = std::make_shared(); - pReq->SetDeviceList(deviceList); + pReq->SetProofInfo(proofInfo); pReq->SetDeviceTypeId(deviceTypeId); pReq->SetErrCode(errcode); if (pkgName == std::string(DM_PKG_NAME)) { diff --git a/services/service/src/ipc/standard/ipc_cmd_parser.cpp b/services/service/src/ipc/standard/ipc_cmd_parser.cpp index 27416f7a00b24d002ac20ef6c215ce6d1f1aee84..7b91245c37d5aff84e612b0f2c9b7a2b2a6885d8 100644 --- a/services/service/src/ipc/standard/ipc_cmd_parser.cpp +++ b/services/service/src/ipc/standard/ipc_cmd_parser.cpp @@ -1581,7 +1581,7 @@ ON_IPC_SET_REQUEST(SERVICE_CREDENTIAL_AUTH_STATUS_NOTIFY, std::shared_ptr pReq = std::static_pointer_cast(pBaseReq); std::string pkgName = pReq->GetPkgName(); - std::string deviceList = pReq->GetDeviceList(); + std::string proofInfo = pReq->GetProofInfo(); uint16_t deviceTypeId = pReq->GetDeviceTypeId(); int32_t errCode = pReq->GetErrCode(); @@ -1589,8 +1589,8 @@ ON_IPC_SET_REQUEST(SERVICE_CREDENTIAL_AUTH_STATUS_NOTIFY, std::shared_ptr lock(g_credentialAuthStatus); - DeviceManagerService::GetInstance().HandleCredentialAuthStatus(deviceList, deviceTypeId, errcode); + DeviceManagerService::GetInstance().HandleCredentialAuthStatus(proofInfo, deviceTypeId, errcode); } -void SoftbusListener::OnCredentialAuthStatus(const char *deviceList, uint32_t deviceListLen, +void SoftbusListener::OnCredentialAuthStatus(const char *proofInfo, uint32_t proofLen, uint16_t deviceTypeId, int32_t errcode) { LOGI("received credential auth status callback from softbus."); - if (deviceListLen > MAX_SOFTBUS_MSG_LEN) { - LOGE("[SOFTBUS]received invaild deviceList value."); + if (proofLen > MAX_SOFTBUS_MSG_LEN) { + LOGE("[SOFTBUS]received invaild proofInfo value."); return; } - std::string deviceListStr; - if (deviceList != nullptr) { - deviceListStr = std::string(deviceList, deviceListLen); + std::string proofInfoStr; + if (proofInfo != nullptr) { + proofInfoStr = std::string(proofInfo, proofLen); } #if !(defined(__LITEOS_M__) || defined(LITE_DEVICE)) - ffrt::submit([=]() { CredentialAuthStatusProcess(deviceListStr, deviceTypeId, errcode); }); + ffrt::submit([=]() { CredentialAuthStatusProcess(proofInfoStr, deviceTypeId, errcode); }); #else - std::thread credentialAuthStatus([=]() { CredentialAuthStatusProcess(deviceListStr, deviceTypeId, errcode); }); + std::thread credentialAuthStatus([=]() { CredentialAuthStatusProcess(proofInfoStr, deviceTypeId, errcode); }); if (pthread_setname_np(credentialAuthStatus.native_handle(), CREDENTIAL_AUTH_STATUS) != DM_OK) { LOGE("credentialAuthStatus setname failed."); } diff --git a/test/commonunittest/UTTest_dm_device_state_manager.cpp b/test/commonunittest/UTTest_dm_device_state_manager.cpp index 9980b61b7358f58ac7122fc47eafe9ef95f3df9f..01f9a72916ab7c50b25420262ce3257605886785 100644 --- a/test/commonunittest/UTTest_dm_device_state_manager.cpp +++ b/test/commonunittest/UTTest_dm_device_state_manager.cpp @@ -255,10 +255,10 @@ HWTEST_F(DmDeviceStateManagerTest, ProcNotifyEvent_001, testing::ext::TestSize.L HWTEST_F(DmDeviceStateManagerTest, HandleCandidateRestrictStatus_001, testing::ext::TestSize.Level0) { - std::string deviceList; + std::string proofInfo; uint16_t deviceTypeId = 0x00; int32_t errcode = -1; - dmDeviceStateManager->HandleCredentialAuthStatus(deviceList, deviceTypeId, errcode); + dmDeviceStateManager->HandleCredentialAuthStatus(proofInfo, deviceTypeId, errcode); EXPECT_NE(dmDeviceStateManager->softbusConnector_, nullptr); } } // namespace diff --git a/test/softbusunittest/UTTest_softbus_listener.cpp b/test/softbusunittest/UTTest_softbus_listener.cpp index 3a987096e800478aecc20f48dbd565710b4a23ac..6c21901e87c2414593c5d96e84689615f3cf6cb8 100644 --- a/test/softbusunittest/UTTest_softbus_listener.cpp +++ b/test/softbusunittest/UTTest_softbus_listener.cpp @@ -788,13 +788,13 @@ HWTEST_F(SoftbusListenerTest, StopRefreshSoftbusLNN_001, testing::ext::TestSize. softbusListener->OnDeviceTrustedChange(type, msg1, msgLen2); softbusListener->OnDeviceTrustedChange(type, msg2, msgLen2); softbusListener->SendAclChangedBroadcast(msg); - char devicelist[msgLen] = {0}; + char proofInfo[msgLen] = {0}; uint16_t deviceTypeId = 0; int32_t errcode = -1; - softbusListener->OnCredentialAuthStatus(devicelist, msgLen, deviceTypeId, errcode); - std::string deviceList2; + softbusListener->OnCredentialAuthStatus(proofInfo, msgLen, deviceTypeId, errcode); + std::string proofInfo2; deviceTypeId = 0xA2F; - softbusListener->CredentialAuthStatusProcess(deviceList2, deviceTypeId, errcode); + softbusListener->CredentialAuthStatusProcess(proofInfo2, deviceTypeId, errcode); EXPECT_EQ(true, checkSoftbusRes(ret)); } } // namespace diff --git a/test/unittest/UTTest_device_manager_impl.h b/test/unittest/UTTest_device_manager_impl.h index bb1de8da259588fa180ca6a9e60ca465d189194a..94f01905fe6787adb1a791ce334c3fdc058434a5 100644 --- a/test/unittest/UTTest_device_manager_impl.h +++ b/test/unittest/UTTest_device_manager_impl.h @@ -123,7 +123,7 @@ public: virtual ~CandidateRestrictStatusCallbackTest() { } - void OnCredentialAuthStatus(const std::string &deviceList, uint16_t deviceTypeId, int32_t errcode) override {} + void OnCredentialAuthStatus(const std::string &proofInfo, uint16_t deviceTypeId, int32_t errcode) override {} }; } // namespace DistributedHardware } // namespace OHOS diff --git a/test/unittest/UTTest_device_manager_service_impl.cpp b/test/unittest/UTTest_device_manager_service_impl.cpp index 195b962a7b24864f63d2bc1c86b310bb4030f126..28a75ea14d93a76a62c7a346be898ed51c8b809d 100644 --- a/test/unittest/UTTest_device_manager_service_impl.cpp +++ b/test/unittest/UTTest_device_manager_service_impl.cpp @@ -1504,10 +1504,10 @@ HWTEST_F(DeviceManagerServiceImplTest, ConvertBindTypeToAuthForm_104, testing::e HWTEST_F(DeviceManagerServiceImplTest, CredentialAuthStatus_101, testing::ext::TestSize.Level0) { - std::string deviceList; + std::string proofInfo; uint16_t deviceTypeId = 0x00; int32_t errcode = -1; - deviceManagerServiceImpl_->HandleCredentialAuthStatus(deviceList, deviceTypeId, errcode); + deviceManagerServiceImpl_->HandleCredentialAuthStatus(proofInfo, deviceTypeId, errcode); EXPECT_NE(deviceManagerServiceImpl_->deviceStateMgr_, nullptr); } } // namespace diff --git a/test/unittest/UTTest_dm_pin_holder.h b/test/unittest/UTTest_dm_pin_holder.h index 3c1668837fb81494a451049838f8a5d926b960b6..e601c1d746c60b2df04e65f74c32200b6277ca7b 100644 --- a/test/unittest/UTTest_dm_pin_holder.h +++ b/test/unittest/UTTest_dm_pin_holder.h @@ -193,11 +193,11 @@ public: (void)devInfo; } - void OnCredentialAuthStatus(const std::string &pkgName, const std::string &deviceList, uint16_t deviceTypeId, + void OnCredentialAuthStatus(const std::string &pkgName, const std::string &proofInfo, uint16_t deviceTypeId, int32_t errcode) override { (void)pkgName; - (void)deviceList; + (void)proofInfo; (void)deviceTypeId; (void)errcode; } diff --git a/test/unittest/UTTest_ipc_cmd_parser_service.cpp b/test/unittest/UTTest_ipc_cmd_parser_service.cpp index 71e2f2b7d688507d18c5ef981cc3994658fb80ed..0ccc1d1b9169f52ff23f15f1676448a3c410787f 100644 --- a/test/unittest/UTTest_ipc_cmd_parser_service.cpp +++ b/test/unittest/UTTest_ipc_cmd_parser_service.cpp @@ -1544,11 +1544,11 @@ HWTEST_F(IpcCmdParserServiceTest, SetIpcRequestFunc_022, testing::ext::TestSize. req = std::make_shared(); std::string pkgName = "com.ohos.test"; - std::string deviceList = "test"; + std::string proofInfo = "test"; uint16_t deviceTypeId = 0x00; int32_t errcode = -1; req->SetPkgName(pkgName); - req->SetDeviceList(deviceList); + req->SetProofInfo(proofInfo); req->SetDeviceTypeId(deviceTypeId); req->SetErrCode(errcode); if (ptr) {