diff --git a/common/include/device_manager_ipc_interface_code.h b/common/include/device_manager_ipc_interface_code.h index ec42dc7a89d6560f7e326548d67acee1aa3f3dd8..bc86a585c369a6c9354be9789b98e79f6f485d5d 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 1723de34567873c88ce6f342f6216697e3dc2749..61fbc54d6ad42eefb95c8ac2988ff60974c9cf00 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 ee2c5ca87685ae2d33640263f678cd9fe22280ad..755651ece00f3199da6da50c670935b0de6d7590 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 fffca73c30d0d015758d90327f1c5e0b713aae9a..c7631d47150e4120b04de3faf30d97138cffd413 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 c4744e673307598dca9693b948fe3fa9be6563a2..dce9e58f400649ee871f88b955a322c94a2844ba 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 85b19822df7833efc7ec3bc50e5b713c2ed2d186..f57a29acb271b86a4dcbd9054e58f1c1c1190d3a 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 23317352e87f30fb2a40c5e2657578bda757c1b4..a04a213a6cc04bdb577016354c02f573bb8656aa 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 2917002c2b77b072d26f74ae6bba37bdedb9be37..4a99d6c6937db76f861eba2ccce8eaf407aceaa7 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 c804c05d299329657ed3423da04ba52ad8beb1cb..0ae1358b754293b0af7ddd03f499528fe8abad85 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 49c5d981cc4f07500b55d75c2c21f623ba26e7f0..bc115308e730fc8bec84f3543724a534e13607b5 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 5a174234d46f38729c66964bcdd445e88b24d794..8721e01dc6a888dcb5b7bb314c750003e73ec13b 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 a97bad57b0c680e37695f7ccb14e12666e83bcb8..5741458241f77de3ad471dcec6f0c724588d5871 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 3c4b37a7ca5f28f2dae7900d0bd3da8900e8b316..0cb1e7b21b44b73884a1fd025c7f11c0eee448aa 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 b8a0621f583e91520c38a632fe9cbf8c6e3c8d91..ecf137944035fc7508ef06813c8c038e143da126 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 9add164b1e1bd76bd4ea62eafdd16bc937c2e836..049ffdb531a261a7c24f8c56fe979ab8ce2039cf 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 c92b5a0c966faf1972bd98c6fa14586379b56720..6bc2757194f6a187d063771fca03e38f84b69865 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 1045b6cc1f451c7de8355be875f47c2c6fc5aaf3..8a1a5e38592930c937c428165b104494745eed72 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 30ef6b88259a2da44a69338033369ca996e90b05..731f97cc5737679abcf3e9616cd3a09d90b92c73 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 e6357b91cc063620f0b01044d103fedf7f99434d..b69e49882096650e7e1f61fa65ec25440a0f5857 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", ]