From 6282ea3d5eed4d309130d67f43a08e9e5104bdbf Mon Sep 17 00:00:00 2001 From: li-tiangang4 Date: Fri, 21 Jun 2024 17:17:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=BF=E6=92=AD=E4=B8=8A=E7=BA=BF=E6=80=BB?= =?UTF-8?q?=E7=BA=BFipc=E8=B0=83=E7=94=A8=E9=A2=91=E7=B9=81=E6=B2=BB?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: li-tiangang4 --- common/src/daudio_util.cpp | 9 +++++---- services/common/BUILD.gn | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/common/src/daudio_util.cpp b/common/src/daudio_util.cpp index 38b270c0..79552bb8 100644 --- a/common/src/daudio_util.cpp +++ b/common/src/daudio_util.cpp @@ -25,7 +25,8 @@ #include #include -#include "softbus_bus_center.h" +#include "device_manager.h" +#include "dm_device_info.h" #include "audio_event.h" #include "daudio_constants.h" @@ -133,14 +134,14 @@ std::string GetEventNameByType(const int32_t eventType) int32_t GetLocalDeviceNetworkId(std::string &networkId) { - NodeBasicInfo basicInfo = { { 0 } }; - int32_t ret = GetLocalNodeDeviceInfo(PKG_NAME.c_str(), &basicInfo); + DmDeviceInfo info; + auto ret = DeviceManager::GetInstance().GetLocalDeviceInfo(PKG_NAME, info); if (ret != DH_SUCCESS) { DHLOGE("Failed to obtain the network ID of the local device. ret: %{public}d", ret); return ret; } - networkId = std::string(basicInfo.networkId); + networkId = info.networkId; return DH_SUCCESS; } diff --git a/services/common/BUILD.gn b/services/common/BUILD.gn index cbf99f90..695a6e19 100644 --- a/services/common/BUILD.gn +++ b/services/common/BUILD.gn @@ -58,8 +58,8 @@ ohos_shared_library("distributed_audio_utils") { external_deps = [ "cJSON:cjson", "c_utils:utils", + "device_manager:devicemanagersdk", "distributed_hardware_fwk:distributedhardwareutils", - "dsoftbus:softbus_client", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", -- Gitee