From f4759ce6080c75ac8702e61d5e79b1b86ccb8a74 Mon Sep 17 00:00:00 2001 From: q30043944 Date: Fri, 7 Feb 2025 19:49:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8E=B7=E5=8F=96=E6=89=80?= =?UTF-8?q?=E6=9C=89=E5=8F=AF=E4=BF=A1=E8=AE=BE=E5=A4=87=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: q30043944 --- .../device_manager_ipc_interface_code.h | 1 + .../native_cpp/include/device_manager.h | 2 + .../native_cpp/include/device_manager_impl.h | 2 + .../native_cpp/src/device_manager_impl.cpp | 38 ++++++++ .../src/ipc/standard/ipc_cmd_parser.cpp | 41 ++++++++ .../service/include/device_manager_service.h | 2 + .../include/softbus/softbus_listener.h | 14 ++- .../service/src/device_manager_service.cpp | 28 +++++- .../src/ipc/standard/ipc_cmd_parser.cpp | 23 +++++ .../service/src/softbus/softbus_listener.cpp | 97 ++++++++++++++++++- .../softbuscache/include/dm_softbus_cache.h | 1 + .../softbuscache/src/dm_softbus_cache.cpp | 15 +++ .../BUILD.gn | 2 + .../onsoftbusdeviceoffline_fuzzer/BUILD.gn | 2 + .../onsoftbusdeviceonline_fuzzer/BUILD.gn | 2 + .../BUILD.gn | 2 + .../publishsoftbuslnn_fuzzer/BUILD.gn | 2 + .../refreshsoftbuslnn_fuzzer/BUILD.gn | 2 + .../stoprefreshsoftbuslnn_fuzzer/BUILD.gn | 2 + 19 files changed, 273 insertions(+), 5 deletions(-) diff --git a/common/include/device_manager_ipc_interface_code.h b/common/include/device_manager_ipc_interface_code.h index ec42dc7a8..bc86a585c 100644 --- a/common/include/device_manager_ipc_interface_code.h +++ b/common/include/device_manager_ipc_interface_code.h @@ -108,6 +108,7 @@ enum DMIpcCmdInterfaceCode { SET_REMOTE_DEVICE_NAME_RESULT, SET_LOCAL_DEVICE_NAME, SET_LOCAL_DEVICE_NAME_RESULT, + GET_ALL_TRUST_DEVICE_LIST, // Add ipc msg here IPC_MSG_BUTT }; diff --git a/interfaces/inner_kits/native_cpp/include/device_manager.h b/interfaces/inner_kits/native_cpp/include/device_manager.h index 1723de345..61fbc54d6 100644 --- a/interfaces/inner_kits/native_cpp/include/device_manager.h +++ b/interfaces/inner_kits/native_cpp/include/device_manager.h @@ -634,6 +634,8 @@ public: virtual int32_t RegisterSinkBindCallback(const std::string &pkgName, std::shared_ptr callback) = 0; virtual int32_t UnRegisterSinkBindCallback(const std::string &pkgName) = 0; + virtual int32_t GetAllTrustedDeviceList(const std::string &pkgName, const std::string &extra, + std::vector &deviceList) = 0; virtual int32_t RegisterAuthenticationType(const std::string &pkgName, const std::map &authParam) = 0; diff --git a/interfaces/inner_kits/native_cpp/include/device_manager_impl.h b/interfaces/inner_kits/native_cpp/include/device_manager_impl.h index ee2c5ca87..755651ece 100644 --- a/interfaces/inner_kits/native_cpp/include/device_manager_impl.h +++ b/interfaces/inner_kits/native_cpp/include/device_manager_impl.h @@ -406,6 +406,8 @@ public: virtual int32_t RegisterSinkBindCallback(const std::string &pkgName, std::shared_ptr callback) override; virtual int32_t UnRegisterSinkBindCallback(const std::string &pkgName) override; + virtual int32_t GetAllTrustedDeviceList(const std::string &pkgName, const std::string &extra, + std::vector &deviceList) override; void SyncCallbacksToService(std::map> &callbackMap); virtual int32_t RegisterAuthenticationType(const std::string &pkgName, const std::map &authParam) override; diff --git a/interfaces/inner_kits/native_cpp/src/device_manager_impl.cpp b/interfaces/inner_kits/native_cpp/src/device_manager_impl.cpp index fffca73c3..c7631d471 100644 --- a/interfaces/inner_kits/native_cpp/src/device_manager_impl.cpp +++ b/interfaces/inner_kits/native_cpp/src/device_manager_impl.cpp @@ -2542,6 +2542,44 @@ void DeviceManagerImpl::SyncCallbackToService(DmCommonNotifyEvent dmCommonNotify } } +int32_t DeviceManagerImpl::GetAllTrustedDeviceList(const std::string &pkgName, const std::string &extra, + std::vector &deviceList) +{ + if (pkgName.empty()) { + DmRadarHelper::GetInstance().ReportGetTrustDeviceList( + pkgName, "GetAllTrustedDeviceList", deviceList, ERR_DM_INPUT_PARA_INVALID, anonyLocalUdid_); + LOGE("Invalid parameter, pkgName is empty."); + return ERR_DM_INPUT_PARA_INVALID; + } + LOGD("Start, pkgName: %{public}s, extra: %{public}s", GetAnonyString(pkgName).c_str(), extra.c_str()); + + std::shared_ptr req = std::make_shared(); + std::shared_ptr rsp = std::make_shared(); + req->SetPkgName(pkgName); + req->SetExtra(extra); + int32_t ret = ipcClientProxy_->SendRequest(GET_ALL_TRUST_DEVICE_LIST, req, rsp); + if (ret != DM_OK) { + DmRadarHelper::GetInstance().ReportGetTrustDeviceList(pkgName, "GetAllTrustedDeviceList", + deviceList, ret, anonyLocalUdid_); + LOGE("DeviceManagerImpl::GetAllTrustedDeviceList error, Send Request failed ret: %{public}d", ret); + return ERR_DM_IPC_SEND_REQUEST_FAILED; + } + + ret = rsp->GetErrCode(); + if (ret != DM_OK) { + DmRadarHelper::GetInstance().ReportGetTrustDeviceList(pkgName, "GetAllTrustedDeviceList", + deviceList, ret, anonyLocalUdid_); + LOGE("GetAllTrustedDeviceList error, failed ret: %{public}d", ret); + return ret; + } + + deviceList = rsp->GetDeviceVec(); + LOGI("Completed, device size %{public}zu", deviceList.size()); + DmRadarHelper::GetInstance().ReportGetTrustDeviceList(pkgName, "GetAllTrustedDeviceList", + deviceList, DM_OK, anonyLocalUdid_); + return DM_OK; +} + void DeviceManagerImpl::SyncCallbacksToService(std::map> &callbackMap) { if (callbackMap.size() == 0) { 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 c4744e673..dce9e58f4 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 @@ -185,6 +185,47 @@ ON_IPC_SET_REQUEST(GET_DEVICE_INFO, std::shared_ptr pBaseReq, MessagePar return DM_OK; } +ON_IPC_SET_REQUEST(GET_ALL_TRUST_DEVICE_LIST, std::shared_ptr pBaseReq, MessageParcel &data) +{ + if (pBaseReq == nullptr) { + LOGE("pBaseReq is null"); + return ERR_DM_FAILED; + } + std::shared_ptr pReq = std::static_pointer_cast(pBaseReq); + std::string pkgName = pReq->GetPkgName(); + std::string extra = pReq->GetExtra(); + if (!data.WriteString(pkgName)) { + LOGE("write pkg failed"); + return ERR_DM_IPC_WRITE_FAILED; + } + if (!data.WriteString(extra)) { + LOGE("write extra failed"); + return ERR_DM_IPC_WRITE_FAILED; + } + return DM_OK; +} + +ON_IPC_READ_RESPONSE(GET_ALL_TRUST_DEVICE_LIST, MessageParcel &reply, std::shared_ptr pBaseRsp) +{ + if (pBaseRsp == nullptr) { + LOGE("pBaseRsp is null"); + return ERR_DM_FAILED; + } + std::shared_ptr pRsp = std::static_pointer_cast(pBaseRsp); + int32_t deviceNum = reply.ReadInt32(); + if (deviceNum > 0 && deviceNum <= DM_MAX_TRUST_DEVICE_NUM) { + std::vector deviceInfoVec; + for (int32_t i = 0; i < deviceNum; ++i) { + DmDeviceInfo deviceInfo; + IpcModelCodec::DecodeDmDeviceInfo(reply, deviceInfo); + deviceInfoVec.emplace_back(deviceInfo); + } + pRsp->SetDeviceVec(deviceInfoVec); + } + pRsp->SetErrCode(reply.ReadInt32()); + return DM_OK; +} + ON_IPC_READ_RESPONSE(GET_DEVICE_INFO, MessageParcel &reply, std::shared_ptr pBaseRsp) { if (pBaseRsp == nullptr) { diff --git a/services/service/include/device_manager_service.h b/services/service/include/device_manager_service.h index 85b19822d..f57a29acb 100644 --- a/services/service/include/device_manager_service.h +++ b/services/service/include/device_manager_service.h @@ -213,6 +213,8 @@ public: int32_t GetTrustedDeviceList(const std::string &pkgName, std::vector &deviceList); void HandleDeviceUnBind(const char *peerUdid, const GroupInformation &groupInfo); int32_t GetAnonyLocalUdid(const std::string &pkgName, std::string &anonyUdid); + int32_t GetAllTrustedDeviceList(const std::string &pkgName, const std::string &extra, + std::vector &deviceList); int32_t RegisterAuthenticationType(const std::string &pkgName, const std::map &authParam); int32_t GetDeviceProfileInfoList(const std::string &pkgName, DmDeviceProfileInfoFilterOptions &filterOptions); diff --git a/services/service/include/softbus/softbus_listener.h b/services/service/include/softbus/softbus_listener.h index 23317352e..a04a213a6 100644 --- a/services/service/include/softbus/softbus_listener.h +++ b/services/service/include/softbus/softbus_listener.h @@ -35,10 +35,12 @@ #include "session.h" #include "socket.h" #include "dm_anonymous.h" +#if !(defined(__LITEOS_M__) || defined(LITE_DEVICE)) +#include "access_control_profile.h" +#endif namespace OHOS { namespace DistributedHardware { - class SoftbusListener { public: SoftbusListener(); @@ -104,14 +106,22 @@ public: void SendAclChangedBroadcast(const std::string &msg); int32_t GetDeviceScreenStatus(const char *networkId, int32_t &screenStatus); static int32_t GetNetworkIdByUdid(const std::string &udid, std::string &networkId); + static int32_t GetDeviceNameByUdid(const std::string &udid, std::string &deviceName); int32_t SetForegroundUserIdsToDSoftBus(const std::string &remoteUserId, const std::vector &userIds); void DeleteCacheDeviceInfo(); int32_t SetLocalDisplayName(const std::string &displayName); +#if !(defined(__LITEOS_M__) || defined(LITE_DEVICE)) + int32_t GetAllTrustedDeviceList(const std::string &pkgName, const std::string &extra, + std::vector &deviceList); +#endif + int32_t GetUdidFromDp(const std::string &udidHash, std::string &udid); private: static int32_t FillDeviceInfo(const DeviceInfo &device, DmDeviceInfo &dmDevice); static void ParseConnAddrInfo(const ConnectionAddr *addrInfo, nlohmann::json &jsonObj); int32_t InitSoftPublishLNN(); - +#if !(defined(__LITEOS_M__) || defined(LITE_DEVICE)) + void ConvertAclToDeviceInfo(DistributedDeviceProfile::AccessControlProfile &profile, DmDeviceInfo &dmDevice); +#endif private: static std::string hostName_; static bool isRadarSoLoad_; diff --git a/services/service/src/device_manager_service.cpp b/services/service/src/device_manager_service.cpp index 2917002c2..4a99d6c69 100755 --- a/services/service/src/device_manager_service.cpp +++ b/services/service/src/device_manager_service.cpp @@ -322,6 +322,28 @@ int32_t DeviceManagerService::GetTrustedDeviceList(const std::string &pkgName, c return DM_OK; } +int32_t DeviceManagerService::GetAllTrustedDeviceList(const std::string &pkgName, const std::string &extra, + std::vector &deviceList) +{ + (void)extra; + LOGI("Begin for pkgName = %{public}s.", pkgName.c_str()); + if (pkgName.empty()) { + LOGE("Invalid parameter, pkgName or extra is empty."); + return ERR_DM_INPUT_PARA_INVALID; + } + if (!PermissionManager::GetInstance().CheckNewPermission()) { + LOGE("The caller: %{public}s does not have permission to call GetAllTrustedDeviceList.", pkgName.c_str()); + return ERR_DM_NO_PERMISSION; + } + CHECK_NULL_RETURN(softbusListener_, ERR_DM_POINT_NULL); + int32_t ret = softbusListener_->GetAllTrustedDeviceList(pkgName, extra, deviceList); + if (ret != DM_OK) { + LOGE("GetAllTrustedDeviceList failed"); + return ret; + } + return DM_OK; +} + int32_t DeviceManagerService::ShiftLNNGear(const std::string &pkgName, const std::string &callerId, bool isRefresh, bool isWakeUp) { @@ -641,8 +663,9 @@ int32_t DeviceManagerService::UnBindDevice(const std::string &pkgName, const std realDeviceId = udidHashTemp; } #endif + CHECK_NULL_RETURN(softbusListener_, ERR_DM_POINT_NULL); std::string udid = ""; - if (SoftbusCache::GetInstance().GetUdidByUdidHash(realDeviceId, udid) != DM_OK) { + if (softbusListener_->GetUdidFromDp(realDeviceId, udid) != DM_OK) { LOGE("Get udid by udidhash failed."); return ERR_DM_FAILED; } @@ -690,8 +713,9 @@ int32_t DeviceManagerService::UnBindDevice(const std::string &pkgName, const std realDeviceId = udidHashTemp; } #endif + CHECK_NULL_RETURN(softbusListener_, ERR_DM_POINT_NULL); std::string udid = ""; - if (SoftbusCache::GetInstance().GetUdidByUdidHash(realDeviceId, udid) != DM_OK) { + if (softbusListener_->GetUdidFromDp(realDeviceId, udid) != DM_OK) { LOGE("Get udid by udidhash failed."); return ERR_DM_FAILED; } diff --git a/services/service/src/ipc/standard/ipc_cmd_parser.cpp b/services/service/src/ipc/standard/ipc_cmd_parser.cpp index c804c05d2..0ae1358b7 100644 --- a/services/service/src/ipc/standard/ipc_cmd_parser.cpp +++ b/services/service/src/ipc/standard/ipc_cmd_parser.cpp @@ -410,6 +410,29 @@ ON_IPC_CMD(GET_TRUST_DEVICE_LIST, MessageParcel &data, MessageParcel &reply) return DM_OK; } +ON_IPC_CMD(GET_ALL_TRUST_DEVICE_LIST, MessageParcel &data, MessageParcel &reply) +{ + std::string pkgName = data.ReadString(); + std::string extra = data.ReadString(); + std::vector deviceList; + int32_t result = DeviceManagerService::GetInstance().GetAllTrustedDeviceList(pkgName, extra, deviceList); + if (!reply.WriteInt32((int32_t)deviceList.size())) { + LOGE("write device list size failed"); + return ERR_DM_IPC_WRITE_FAILED; + } + for (const auto &devInfo : deviceList) { + if (!EncodeDmDeviceInfo(devInfo, reply)) { + LOGE("write dm device info failed"); + return ERR_DM_IPC_WRITE_FAILED; + } + } + if (!reply.WriteInt32(result)) { + LOGE("write result failed"); + return ERR_DM_IPC_WRITE_FAILED; + } + return DM_OK; +} + ON_IPC_CMD(REGISTER_DEVICE_MANAGER_LISTENER, MessageParcel &data, MessageParcel &reply) { int32_t id = OHOS::HiviewDFX::XCollie::GetInstance().SetTimer("RegisterDeviceManagerListener", XCOLLIE_TIMEOUT_S, diff --git a/services/service/src/softbus/softbus_listener.cpp b/services/service/src/softbus/softbus_listener.cpp index 49c5d981c..bc115308e 100644 --- a/services/service/src/softbus/softbus_listener.cpp +++ b/services/service/src/softbus/softbus_listener.cpp @@ -32,12 +32,13 @@ #include "dm_transport_msg.h" #include "ffrt.h" #endif +#include "ipc_skeleton.h" #include "parameter.h" #include "system_ability_definition.h" namespace OHOS { namespace DistributedHardware { - +using namespace OHOS::DistributedDeviceProfile; const int32_t SOFTBUS_CHECK_INTERVAL = 100000; // 100ms const int32_t SOFTBUS_SUBSCRIBE_ID_MASK = 0x0000FFFF; const int32_t MAX_CACHED_DISCOVERED_DEVICE_SIZE = 100; @@ -713,6 +714,11 @@ int32_t SoftbusListener::GetNetworkIdByUdid(const std::string &udid, std::string return SoftbusCache::GetInstance().GetNetworkIdFromCache(udid, networkId); } +int32_t SoftbusListener::GetDeviceNameByUdid(const std::string &udid, std::string &deviceName) +{ + return SoftbusCache::GetInstance().GetDeviceNameFromCache(udid, deviceName); +} + int32_t SoftbusListener::ShiftLNNGear(bool isWakeUp, const std::string &callerId) { if (callerId.empty()) { @@ -1185,5 +1191,94 @@ int32_t SoftbusListener::SetLocalDisplayName(const std::string &displayName) } return DM_OK; } + +#if !(defined(__LITEOS_M__) || defined(LITE_DEVICE)) +void SoftbusListener::ConvertAclToDeviceInfo(DistributedDeviceProfile::AccessControlProfile &profile, + DmDeviceInfo &deviceInfo) +{ + char udidHash[DM_MAX_DEVICE_ID_LEN] = {0}; + if (Crypto::GetUdidHash(profile.GetTrustDeviceId(), reinterpret_cast(udidHash)) != DM_OK) { + LOGE("get udidhash by udid: %{public}s failed.", GetAnonyString(profile.GetTrustDeviceId()).c_str()); + return; + } + + if (memcpy_s(deviceInfo.deviceId, sizeof(deviceInfo.deviceId), udidHash, + std::min(sizeof(deviceInfo.deviceId), sizeof(udidHash))) != DM_OK) { + LOGE("GetAllTrustedDeviceList copy deviceId failed."); + return; + } + + std::string networkId = ""; + if (GetNetworkIdByUdid(profile.GetTrustDeviceId(), networkId) == DM_OK) { + if (memcpy_s(deviceInfo.networkId, sizeof(deviceInfo.networkId), networkId.c_str(), + std::min(sizeof(deviceInfo.networkId), networkId.size())) != DM_OK) { + LOGE("GetAllTrustedDeviceList copy networkId data failed."); + } + } + + std::string deviceName = ""; + if (GetDeviceNameByUdid(profile.GetTrustDeviceId(), deviceName) == DM_OK) { + if (memcpy_s(deviceInfo.deviceName, sizeof(deviceInfo.deviceName), deviceName.c_str(), + std::min(sizeof(deviceInfo.deviceName), deviceName.size())) != DM_OK) { + LOGE("GetAllTrustedDeviceList copy deviceName data failed."); + } + } else { + if (memcpy_s(deviceInfo.deviceName, sizeof(deviceInfo.deviceName), udidHash, + std::min(sizeof(deviceInfo.deviceName), sizeof(udidHash))) != DM_OK) { + LOGE("GetAllTrustedDeviceList copy deviceName data failed."); + } + } +} + +int32_t SoftbusListener::GetAllTrustedDeviceList(const std::string &pkgName, const std::string &extra, + std::vector &deviceList) +{ + (void)extra; + uint32_t tokenId = static_cast(OHOS::IPCSkeleton::GetCallingTokenID()); + std::vector allProfile = + DeviceProfileConnector::GetInstance().GetAllAccessControlProfile(); + for (DistributedDeviceProfile::AccessControlProfile profile : allProfile) { + if (profile.GetBindType() == GROUP_TYPE_IDENTICAL_ACCOUNT_GROUP) { + continue; + } + DistributedDeviceProfile::Accesser acer = profile.GetAccesser(); + if (pkgName == acer.GetAccesserBundleName() && tokenId == acer.GetAccesserTokenId()) { + DmDeviceInfo deviceinfo; + ConvertAclToDeviceInfo(profile, deviceinfo); + deviceList.push_back(deviceinfo); + continue; + } + DistributedDeviceProfile::Accessee acee = profile.GetAccessee(); + if (pkgName == acee.GetAccesseeBundleName() && tokenId == acee.GetAccesseeTokenId()) { + DmDeviceInfo deviceinfo; + ConvertAclToDeviceInfo(profile, deviceinfo); + deviceList.push_back(deviceinfo); + continue; + } + } + return DM_OK; +} +#endif + +int32_t SoftbusListener::GetUdidFromDp(const std::string &udidHash, std::string &udid) +{ + std::vector allProfile = + DeviceProfileConnector::GetInstance().GetAllAccessControlProfile(); + for (DistributedDeviceProfile::AccessControlProfile profile : allProfile) { + if (profile.GetBindType() == GROUP_TYPE_IDENTICAL_ACCOUNT_GROUP) { + continue; + } + char udidHashTemp[DM_MAX_DEVICE_ID_LEN] = {0}; + if (Crypto::GetUdidHash(profile.GetTrustDeviceId(), reinterpret_cast(udidHashTemp)) != DM_OK) { + LOGE("get udidHash by udid: %{public}s failed.", GetAnonyString(profile.GetTrustDeviceId()).c_str()); + continue; + } + if (udidHash == std::string(udidHashTemp)) { + udid = profile.GetTrustDeviceId(); + return DM_OK; + } + } + return ERR_DM_FAILED; +} } // namespace DistributedHardware } // namespace OHOS \ No newline at end of file diff --git a/services/softbuscache/include/dm_softbus_cache.h b/services/softbuscache/include/dm_softbus_cache.h index 5a174234d..8721e01dc 100644 --- a/services/softbuscache/include/dm_softbus_cache.h +++ b/services/softbuscache/include/dm_softbus_cache.h @@ -49,6 +49,7 @@ public: int32_t GetUdidByUdidHash(const std::string &udidHash, std::string &udid); int32_t GetUuidByUdid(const std::string &udid, std::string &uuid); int32_t GetNetworkIdFromCache(const std::string &udid, std::string &networkId); + int32_t GetDeviceNameFromCache(const std::string &udid, std::string &deviceName); bool CheckIsOnline(const std::string &udidHash); private: int32_t GetUdidByNetworkId(const char *networkId, std::string &udid); diff --git a/services/softbuscache/src/dm_softbus_cache.cpp b/services/softbuscache/src/dm_softbus_cache.cpp index a97bad57b..574145824 100644 --- a/services/softbuscache/src/dm_softbus_cache.cpp +++ b/services/softbuscache/src/dm_softbus_cache.cpp @@ -446,6 +446,21 @@ int32_t SoftbusCache::GetNetworkIdFromCache(const std::string &udid, std::string return ERR_DM_FAILED; } +int32_t SoftbusCache::GetDeviceNameFromCache(const std::string &udid, std::string &deviceName) +{ + LOGI("udid %{public}s.", GetAnonyString(udid).c_str()); + { + std::lock_guard mutexLock(deviceInfosMutex_); + if (deviceInfo_.find(udid) != deviceInfo_.end()) { + deviceName = deviceInfo_[udid].second.deviceName; + LOGI("GetDeviceNameFromCache success deviceName: %{public}s, udid: %{public}s.", + deviceName.c_str(), GetAnonyString(udid).c_str()); + return DM_OK; + } + } + return ERR_DM_FAILED; +} + bool SoftbusCache::CheckIsOnline(const std::string &deviceId) { LOGI("deviceId %{public}s.", GetAnonyString(deviceId).c_str()); diff --git a/test/softbusfuzztest/onsoftbusdeviceinfochanged_fuzzer/BUILD.gn b/test/softbusfuzztest/onsoftbusdeviceinfochanged_fuzzer/BUILD.gn index 3c4b37a7c..0cb1e7b21 100644 --- a/test/softbusfuzztest/onsoftbusdeviceinfochanged_fuzzer/BUILD.gn +++ b/test/softbusfuzztest/onsoftbusdeviceinfochanged_fuzzer/BUILD.gn @@ -47,6 +47,8 @@ ohos_fuzztest("OnSoftbusDeviceInfoChangedFuzzTest") { external_deps = [ "c_utils:utils", "device_auth:deviceauth_sdk", + "device_info_manager:distributed_device_profile_common", + "device_info_manager:distributed_device_profile_sdk", "dsoftbus:softbus_client", "safwk:system_ability_fwk", ] diff --git a/test/softbusfuzztest/onsoftbusdeviceoffline_fuzzer/BUILD.gn b/test/softbusfuzztest/onsoftbusdeviceoffline_fuzzer/BUILD.gn index b8a0621f5..ecf137944 100644 --- a/test/softbusfuzztest/onsoftbusdeviceoffline_fuzzer/BUILD.gn +++ b/test/softbusfuzztest/onsoftbusdeviceoffline_fuzzer/BUILD.gn @@ -48,6 +48,8 @@ ohos_fuzztest("OnSoftbusDeviceOfflineFuzzTest") { external_deps = [ "c_utils:utils", "device_auth:deviceauth_sdk", + "device_info_manager:distributed_device_profile_common", + "device_info_manager:distributed_device_profile_sdk", "dsoftbus:softbus_client", "safwk:system_ability_fwk", ] diff --git a/test/softbusfuzztest/onsoftbusdeviceonline_fuzzer/BUILD.gn b/test/softbusfuzztest/onsoftbusdeviceonline_fuzzer/BUILD.gn index 9add164b1..049ffdb53 100644 --- a/test/softbusfuzztest/onsoftbusdeviceonline_fuzzer/BUILD.gn +++ b/test/softbusfuzztest/onsoftbusdeviceonline_fuzzer/BUILD.gn @@ -48,6 +48,8 @@ ohos_fuzztest("OnSoftbusDeviceOnlineFuzzTest") { external_deps = [ "c_utils:utils", "device_auth:deviceauth_sdk", + "device_info_manager:distributed_device_profile_common", + "device_info_manager:distributed_device_profile_sdk", "dsoftbus:softbus_client", "safwk:system_ability_fwk", ] diff --git a/test/softbusfuzztest/onsoftbuslistenerdevicefound_fuzzer/BUILD.gn b/test/softbusfuzztest/onsoftbuslistenerdevicefound_fuzzer/BUILD.gn index c92b5a0c9..6bc275719 100644 --- a/test/softbusfuzztest/onsoftbuslistenerdevicefound_fuzzer/BUILD.gn +++ b/test/softbusfuzztest/onsoftbuslistenerdevicefound_fuzzer/BUILD.gn @@ -47,6 +47,8 @@ ohos_fuzztest("OnSoftbusListenerDeviceFoundFuzzTest") { external_deps = [ "c_utils:utils", "device_auth:deviceauth_sdk", + "device_info_manager:distributed_device_profile_common", + "device_info_manager:distributed_device_profile_sdk", "dsoftbus:softbus_client", "safwk:system_ability_fwk", ] diff --git a/test/softbusfuzztest/publishsoftbuslnn_fuzzer/BUILD.gn b/test/softbusfuzztest/publishsoftbuslnn_fuzzer/BUILD.gn index 1045b6cc1..8a1a5e385 100644 --- a/test/softbusfuzztest/publishsoftbuslnn_fuzzer/BUILD.gn +++ b/test/softbusfuzztest/publishsoftbuslnn_fuzzer/BUILD.gn @@ -48,6 +48,8 @@ ohos_fuzztest("PublishSoftbusLnnFuzzTest") { external_deps = [ "c_utils:utils", "device_auth:deviceauth_sdk", + "device_info_manager:distributed_device_profile_common", + "device_info_manager:distributed_device_profile_sdk", "dsoftbus:softbus_client", "safwk:system_ability_fwk", ] diff --git a/test/softbusfuzztest/refreshsoftbuslnn_fuzzer/BUILD.gn b/test/softbusfuzztest/refreshsoftbuslnn_fuzzer/BUILD.gn index 30ef6b882..731f97cc5 100644 --- a/test/softbusfuzztest/refreshsoftbuslnn_fuzzer/BUILD.gn +++ b/test/softbusfuzztest/refreshsoftbuslnn_fuzzer/BUILD.gn @@ -48,6 +48,8 @@ ohos_fuzztest("RefreshSoftbusLnnFuzzTest") { external_deps = [ "c_utils:utils", "device_auth:deviceauth_sdk", + "device_info_manager:distributed_device_profile_common", + "device_info_manager:distributed_device_profile_sdk", "dsoftbus:softbus_client", "safwk:system_ability_fwk", ] diff --git a/test/softbusfuzztest/stoprefreshsoftbuslnn_fuzzer/BUILD.gn b/test/softbusfuzztest/stoprefreshsoftbuslnn_fuzzer/BUILD.gn index e6357b91c..b69e49882 100644 --- a/test/softbusfuzztest/stoprefreshsoftbuslnn_fuzzer/BUILD.gn +++ b/test/softbusfuzztest/stoprefreshsoftbuslnn_fuzzer/BUILD.gn @@ -48,6 +48,8 @@ ohos_fuzztest("StopRefreshSoftbusLnnFuzzTest") { external_deps = [ "c_utils:utils", "device_auth:deviceauth_sdk", + "device_info_manager:distributed_device_profile_common", + "device_info_manager:distributed_device_profile_sdk", "dsoftbus:softbus_client", "safwk:system_ability_fwk", ] -- Gitee