diff --git a/services/distributeddataservice/adapter/account/BUILD.gn b/services/distributeddataservice/adapter/account/BUILD.gn index 67d8637c33be70e0f0fc400e284bdebe887f1f33..0a488ab98bebeff2382edaa09f6c2023fc4dbb30 100755 --- a/services/distributeddataservice/adapter/account/BUILD.gn +++ b/services/distributeddataservice/adapter/account/BUILD.gn @@ -40,9 +40,9 @@ ohos_static_library("distributeddata_account_static") { # "ces:libcommonevent", "aafwk_standard:want", + "ces_standard:cesfwk_innerkits", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "os_account_standard:libaccountkits", - "ces_standard:cesfwk_kits", ] } diff --git a/services/distributeddataservice/adapter/broadcaster/BUILD.gn b/services/distributeddataservice/adapter/broadcaster/BUILD.gn index 714a885146e1caefdf2760540a612e5b5ef1017e..c9ea199fdfd3eb2820b6b9d8dbff88c87eb0a6de 100755 --- a/services/distributeddataservice/adapter/broadcaster/BUILD.gn +++ b/services/distributeddataservice/adapter/broadcaster/BUILD.gn @@ -33,9 +33,9 @@ ohos_static_library("distributeddata_broadcaster_static") { external_deps = [ # "ces:libcommonevent", "aafwk_standard:want", + "ces_standard:cesfwk_innerkits", "appexecfwk_standard:appexecfwk_base", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", - "ces_standard:cesfwk_kits", ] } diff --git a/services/distributeddataservice/adapter/communicator/src/softbus_adapter_standard.cpp b/services/distributeddataservice/adapter/communicator/src/softbus_adapter_standard.cpp index 020a55a636e397f29413d926d18206d5cafce994..e79d42649af0cb636922588e96084910f86be5fc 100755 --- a/services/distributeddataservice/adapter/communicator/src/softbus_adapter_standard.cpp +++ b/services/distributeddataservice/adapter/communicator/src/softbus_adapter_standard.cpp @@ -201,12 +201,18 @@ Status SoftBusAdapter::StopWatchDeviceChange(const AppDeviceStatusChangeListener void SoftBusAdapter::NotifyAll(const DeviceInfo &deviceInfo, const DeviceChangeType &type) { std::thread th = std::thread([this, deviceInfo, type]() { - std::lock_guard lock(deviceChangeMutex_); + std::vector listeners; + { + std::lock_guard lock(deviceChangeMutex_); + for (const auto &listener : listeners_) { + listeners.push_back(listener); + } + } ZLOGD("high"); std::string uuid = GetUuidByNodeId(deviceInfo.deviceId); ZLOGD("[Notify] to DB from: %{public}s, type:%{public}d", ToBeAnonymous(uuid).c_str(), type); UpdateRelationship(deviceInfo.deviceId, type); - for (const auto &device : listeners_) { + for (const auto &device : listeners) { if (device == nullptr) { continue; } @@ -217,7 +223,7 @@ void SoftBusAdapter::NotifyAll(const DeviceInfo &deviceInfo, const DeviceChangeT } } ZLOGD("low"); - for (const auto &device : listeners_) { + for (const auto &device : listeners) { if (device == nullptr) { continue; } @@ -228,7 +234,7 @@ void SoftBusAdapter::NotifyAll(const DeviceInfo &deviceInfo, const DeviceChangeT } } ZLOGD("min"); - for (const auto &device : listeners_) { + for (const auto &device : listeners) { if (device == nullptr) { continue; } diff --git a/services/distributeddataservice/app/src/uninstaller/BUILD.gn b/services/distributeddataservice/app/src/uninstaller/BUILD.gn index 41d8af81347617d7828f68feb1080e765bab10fb..4194572e35b22e80c8626797f37eb3b0ef87af73 100755 --- a/services/distributeddataservice/app/src/uninstaller/BUILD.gn +++ b/services/distributeddataservice/app/src/uninstaller/BUILD.gn @@ -43,11 +43,11 @@ ohos_static_library("distributeddata_uninstaller_static") { # "ces:libcommonevent", "aafwk_standard:want", + "ces_standard:cesfwk_innerkits", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", "samgr_L2:samgr_proxy", - "ces_standard:cesfwk_kits", "dmsfwk_standard:zuri" ] } diff --git a/services/distributeddataservice/test/common/distributeddb/include/distributeddb_schema_test_tools.h b/services/distributeddataservice/test/common/distributeddb/include/distributeddb_schema_test_tools.h index 7faa44956ef11718d82bd48e26d78d70de7d5c29..d701910329ed94defa733360de6f152ce627065a 100755 --- a/services/distributeddataservice/test/common/distributeddb/include/distributeddb_schema_test_tools.h +++ b/services/distributeddataservice/test/common/distributeddb/include/distributeddb_schema_test_tools.h @@ -15,9 +15,7 @@ #ifndef DISTRIBUTED_DB_SCHEMA_TEST_TOOLS_H #define DISTRIBUTED_DB_SCHEMA_TEST_TOOLS_H -#ifdef RUNNING_ON_SIMULATED_ENV #include -#endif #include "kv_store_delegate.h" #include "kv_store_delegate_manager.h" #include "types.h" @@ -182,4 +180,4 @@ public: const uint64_t serialNo, const RecordInfo &recordInfo, const std::string &valueSkipString = VALUE_SKIP_STRING); }; -#endif // DISTRIBUTED_DB_SCHEMA_TEST_TOOLS_H \ No newline at end of file +#endif // DISTRIBUTED_DB_SCHEMA_TEST_TOOLS_H