From 9888181b799bf8b5adf68c12f7484844b6584830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=B7=8D?= Date: Fri, 8 Nov 2024 21:20:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E6=B0=B4=E7=BA=BF=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李巍 --- device_manager.gni | 5 +++-- services/service/BUILD.gn | 6 +----- services/service/src/device_manager_service.cpp | 3 ++- services/service/src/softbus/softbus_listener.cpp | 3 ++- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/device_manager.gni b/device_manager.gni index 57eb3a487..49de91bae 100644 --- a/device_manager.gni +++ b/device_manager.gni @@ -79,9 +79,10 @@ declare_args() { } if (defined(global_parts_info) && - defined(global_parts_info.distributedhardware_distributed_hardware_adapter)) { + defined( + global_parts_info.distributedhardware_distributed_hardware_adapter)) { device_manager_common = false } else { device_manager_common = true } -} +} \ No newline at end of file diff --git a/services/service/BUILD.gn b/services/service/BUILD.gn index b3e68af5c..41ff450db 100644 --- a/services/service/BUILD.gn +++ b/services/service/BUILD.gn @@ -106,11 +106,7 @@ if (defined(ohos_lite)) { "-Wfloat-equal", "-Wshadow", ] - - if (dm_common) { - cflags += [ "-DDEVICE_MANAGER_COMMON_SWITCH" ] - } - + cflags_cc = cflags } } diff --git a/services/service/src/device_manager_service.cpp b/services/service/src/device_manager_service.cpp index 46f015844..db144ccbe 100755 --- a/services/service/src/device_manager_service.cpp +++ b/services/service/src/device_manager_service.cpp @@ -2017,7 +2017,8 @@ void DeviceManagerService::HandleCredentialAuthStatus(const std::string &deviceL } } -int32_t DeviceManagerService::SetLocalDeviceName(const std::string &localDeviceName, const std::string &localDisplayName) +int32_t DeviceManagerService::SetLocalDeviceName(const std::string &localDeviceName, + const std::string &localDisplayName) { LOGI("DeviceManagerService Start SetLocalDeviceName!"); CHECK_NULL_RETURN(softbusListener_, ERR_DM_POINT_NULL); diff --git a/services/service/src/softbus/softbus_listener.cpp b/services/service/src/softbus/softbus_listener.cpp index 903e18ad0..d420034e5 100644 --- a/services/service/src/softbus/softbus_listener.cpp +++ b/services/service/src/softbus/softbus_listener.cpp @@ -688,7 +688,8 @@ int32_t SoftbusListener::GetNetworkIdByUdid(const std::string &udid, std::string return SoftbusCache::GetInstance().GetNetworkIdFromCache(udid, networkId); } -int32_t SoftbusListener::SetLocalDeviceName(const std::string &localDeviceName, const std::string &localDisplayName) +int32_t SoftbusListener::SetLocalDeviceName(const std::string &localDeviceName, + const std::string &localDisplayName) { LOGI("SoftbusListener Start SetLocalDeviceName!"); #ifdef DDEVICE_MANAGER_COMMON_SWITCH