diff --git a/av_transport/av_trans_control_center/test/unittest/BUILD.gn b/av_transport/av_trans_control_center/test/unittest/BUILD.gn index d26d3763cb16efc16ccb1273c48800c80b56f448..d8a951052f8b6720bf9005fd889ddb213098d48a 100644 --- a/av_transport/av_trans_control_center/test/unittest/BUILD.gn +++ b/av_transport/av_trans_control_center/test/unittest/BUILD.gn @@ -29,7 +29,6 @@ config("module_private_config") { "${engine_path}/av_receiver/include", "${engine_path}/av_sender/include", "${engine_path}/filters/av_transport_input", - "${distributedhardwarefwk_path}/utils/include/eventbus", "${control_center_path}/inner_kits/include", "${control_center_path}/services/include", "${control_center_path}/services/include/ipc", diff --git a/bundle.json b/bundle.json index 7633d1959adbfbf7020452a093b1d531e2888295..c466e473806db75303c5b07f1cda8e80b17fc8e3 100644 --- a/bundle.json +++ b/bundle.json @@ -54,7 +54,6 @@ "graphic_surface", "media_foundation", "bounds_checking_function", - "power_manager", "openssl", "ffmpeg", "zlib", diff --git a/common/utils/include/constants.h b/common/utils/include/constants.h index c3719d625714a29fbf272e4e2909c0c079d9fd8d..b60abd2f1c9cee48dfdbb17eae4fc903c4856fe9 100644 --- a/common/utils/include/constants.h +++ b/common/utils/include/constants.h @@ -42,7 +42,6 @@ namespace DistributedHardware { constexpr uint32_t MAX_KEY_SIZE = 256; const std::string LOW_LATENCY_KEY = "identity"; - const std::u16string DHMS_STUB_INTERFACE_TOKEN = u"ohos.distributedhardware.accessToken"; const std::string APP_ID = "dtbhardware_manager_service"; const std::string GLOBAL_CAPABILITY_ID = "global_capability_info"; const std::string GLOBAL_VERSION_ID = "global_version_info"; @@ -57,7 +56,6 @@ namespace DistributedHardware { const std::string DH_ATTRS = "dh_attrs"; const std::string DH_SUBTYPE = "dh_subtype"; const std::string DEV_UDID_HASH = "udid_hash"; - const std::string DH_LOG_TITLE_TAG = "DHFWK"; const std::string DH_VER = "dh_ver"; const std::string COMP_VER = "comp_ver"; const std::string NAME = "name"; @@ -68,10 +66,6 @@ namespace DistributedHardware { const std::string DH_TASK_NAME_PREFIX = "Task_"; const std::string DH_FWK_PKG_NAME = "ohos.dhardware"; const std::string DH_FWK_SESSION_NAME = "ohos.dhardware.session_"; - const std::string DH_COMPONENT_VERSIONS = "componentVersions"; - const std::string DH_COMPONENT_TYPE = "dhType"; - const std::string DH_COMPONENT_SINK_VER = "version"; - const std::string DH_COMPONENT_DEFAULT_VERSION = "1.0"; const std::string LOW_LATENCY_ENABLE = "low_latency_enable"; constexpr const char *DO_RECOVER = "DoRecover"; constexpr const char *SEND_ONLINE = "SendOnLine"; @@ -82,7 +76,6 @@ namespace DistributedHardware { constexpr const char *OFFLINE_TASK_INNER = "OffLineTask"; constexpr const char *TRIGGER_TASK = "TriggerTask"; constexpr const char *EVENT_RUN = "EventRun"; - constexpr const char *START_EVENT = "StartEvent"; constexpr const char *COMPONENTSLOAD_PROFILE_PATH = "etc/distributedhardware/distributed_hardware_components_cfg.json"; diff --git a/distributedhardwarefwk.gni b/distributedhardwarefwk.gni index d77261bf8e35d2293605c5d66cdd20f2ca9a0b1b..7057ac0774e76dcdfed330beeeebc63af09a3006 100644 --- a/distributedhardwarefwk.gni +++ b/distributedhardwarefwk.gni @@ -36,10 +36,4 @@ build_flags = [ "-Werror" ] declare_args() { distributed_hardware_fwk_low_latency = false - powermgr_power_manager_fwk = true - - if (defined(global_parts_info) && - !defined(global_parts_info.powermgr_power_manager)) { - powermgr_power_manager_fwk = false - } } diff --git a/interfaces/inner_kits/BUILD.gn b/interfaces/inner_kits/BUILD.gn index 0a2a37fd228dfef0c6478cb8fdcefa0ccf8deaf1..3def025bad2d020dd86326c0249f199cdd564520 100644 --- a/interfaces/inner_kits/BUILD.gn +++ b/interfaces/inner_kits/BUILD.gn @@ -43,7 +43,6 @@ ohos_shared_library("libdhfwk_sdk") { "${common_path}/log/include", "${common_path}/utils/include", "${utils_path}/include", - "${utils_path}/include/log", "${services_path}/distributedhardwarefwkservice/include", ] diff --git a/interfaces/inner_kits/include/distributed_hardware_fwk_kit.h b/interfaces/inner_kits/include/distributed_hardware_fwk_kit.h index c66ef9de77a982f295bc327bfd05d3a788833790..db3c014564e31dad0384ffbdf803a7aadc69d525 100644 --- a/interfaces/inner_kits/include/distributed_hardware_fwk_kit.h +++ b/interfaces/inner_kits/include/distributed_hardware_fwk_kit.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -23,7 +23,6 @@ #include #include "refbase.h" -#include "distributed_hardware_fwk_kit_paras.h" #include "ipublisher_listener.h" #include "idistributed_hardware.h" diff --git a/interfaces/inner_kits/include/ipc/distributed_hardware_proxy.h b/interfaces/inner_kits/include/ipc/distributed_hardware_proxy.h index c0533a7d1f4c67ad551bdaa6f5b9cd4184ae8755..e182e204c816752fb10e769a2c69e0277f1267f9 100644 --- a/interfaces/inner_kits/include/ipc/distributed_hardware_proxy.h +++ b/interfaces/inner_kits/include/ipc/distributed_hardware_proxy.h @@ -18,9 +18,9 @@ #include -#include "distributed_hardware_fwk_kit_paras.h" #include "iremote_proxy.h" #include "refbase.h" + #include "idistributed_hardware.h" namespace OHOS { diff --git a/interfaces/inner_kits/test/fuzztest/distributedhardwarefwkkit_fuzzer/BUILD.gn b/interfaces/inner_kits/test/fuzztest/distributedhardwarefwkkit_fuzzer/BUILD.gn index 6cd9d1f72025131114705710c653b30787745983..ac555e1c6ac11cb7692e763ae05078e9849e31bf 100644 --- a/interfaces/inner_kits/test/fuzztest/distributedhardwarefwkkit_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/test/fuzztest/distributedhardwarefwkkit_fuzzer/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2023 Huawei Device Co., Ltd. +# Copyright (c) 2022-2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -27,7 +27,6 @@ ohos_fuzztest("DistributedHardwareFwkKitFuzzTest") { "${av_trans_path}/common/include", "include", "${utils_path}/include", - "${utils_path}/include/log", "${common_path}/utils/include", "${common_path}/log/include", "${services_path}/distributedhardwarefwkservice/include", diff --git a/interfaces/inner_kits/test/fuzztest/distributedhardwarefwkstub_fuzzer/BUILD.gn b/interfaces/inner_kits/test/fuzztest/distributedhardwarefwkstub_fuzzer/BUILD.gn index 531c7e5312543eca21ab757d77b8a0da95c1f7d2..4cadc327ef201599add31b82c628720a3dde3236 100644 --- a/interfaces/inner_kits/test/fuzztest/distributedhardwarefwkstub_fuzzer/BUILD.gn +++ b/interfaces/inner_kits/test/fuzztest/distributedhardwarefwkstub_fuzzer/BUILD.gn @@ -26,7 +26,6 @@ ohos_fuzztest("DistributedHardwareFwkStubFuzzTest") { "${av_trans_path}/common/include", "include", "${utils_path}/include", - "${utils_path}/include/log", "${common_path}/utils/include", "${common_path}/log/include", "${services_path}/distributedhardwarefwkservice/include", diff --git a/interfaces/inner_kits/test/unittest/common/distributedhardwarefwkkit/BUILD.gn b/interfaces/inner_kits/test/unittest/common/distributedhardwarefwkkit/BUILD.gn index 76e8592be0514ff066b61c50e8b96bd8bc852cce..a3741c26f0832c4aec83279bd05c0f87d93d74a4 100644 --- a/interfaces/inner_kits/test/unittest/common/distributedhardwarefwkkit/BUILD.gn +++ b/interfaces/inner_kits/test/unittest/common/distributedhardwarefwkkit/BUILD.gn @@ -23,7 +23,6 @@ config("module_private_config") { "${av_trans_path}/common/include", "include", "${utils_path}/include", - "${utils_path}/include/log", "${common_path}/utils/include", "${common_path}/log/include", "${innerkits_path}/include", diff --git a/interfaces/inner_kits/test/unittest/common/ipc/dhfwk_sa_manager/BUILD.gn b/interfaces/inner_kits/test/unittest/common/ipc/dhfwk_sa_manager/BUILD.gn index 9b6103daf2456b1ab048148392ff1e673bb88670..1d04514e0bfbde6783b71d1a3b88ad7cb5defc6a 100644 --- a/interfaces/inner_kits/test/unittest/common/ipc/dhfwk_sa_manager/BUILD.gn +++ b/interfaces/inner_kits/test/unittest/common/ipc/dhfwk_sa_manager/BUILD.gn @@ -23,7 +23,6 @@ config("module_private_config") { "${av_trans_path}/common/include", "include", "${utils_path}/include", - "${utils_path}/include/log", "${common_path}/utils/include", "${common_path}/log/include", "${innerkits_path}/include", diff --git a/interfaces/inner_kits/test/unittest/common/ipc/distributed_hardware_proxy/BUILD.gn b/interfaces/inner_kits/test/unittest/common/ipc/distributed_hardware_proxy/BUILD.gn index 54a5f8089e5e5fde13d731fc3b72c199be9a283f..e899322c2a7c959c3f2ae49b2e415a2fc7d64074 100644 --- a/interfaces/inner_kits/test/unittest/common/ipc/distributed_hardware_proxy/BUILD.gn +++ b/interfaces/inner_kits/test/unittest/common/ipc/distributed_hardware_proxy/BUILD.gn @@ -23,7 +23,6 @@ config("module_private_config") { "${av_trans_path}/common/include", "include", "${utils_path}/include", - "${utils_path}/include/log", "${common_path}/utils/include", "${common_path}/log/include", "${innerkits_path}/include", diff --git a/interfaces/inner_kits/test/unittest/common/ipc/publisher_listener_stub/BUILD.gn b/interfaces/inner_kits/test/unittest/common/ipc/publisher_listener_stub/BUILD.gn index 04335ee10c2a2aff16c2ee4006c6d7548d065833..410952b4852d286aeb7938eb9e6b6010e60ec817 100644 --- a/interfaces/inner_kits/test/unittest/common/ipc/publisher_listener_stub/BUILD.gn +++ b/interfaces/inner_kits/test/unittest/common/ipc/publisher_listener_stub/BUILD.gn @@ -23,7 +23,6 @@ config("module_private_config") { "${av_trans_path}/common/include", "include", "${utils_path}/include", - "${utils_path}/include/log", "${common_path}/utils/include", "${common_path}/log/include", "${innerkits_path}/include", diff --git a/interfaces/kits/napi/BUILD.gn b/interfaces/kits/napi/BUILD.gn index 55425a977a158121be905c7c4328ac45e09bf189..c1d15e2f2db3d24da70c9390f7253c4af4664ad1 100644 --- a/interfaces/kits/napi/BUILD.gn +++ b/interfaces/kits/napi/BUILD.gn @@ -27,7 +27,6 @@ ohos_shared_library("hardwaremanager") { "${services_path}/distributedhardwarefwkservice/include/task", "${services_path}/distributedhardwarefwkservice/include/resourcemanager", "${av_trans_path}/common/include", - "${utils_path}/include/log", ] sources = [ "src/native_distributedhardwarefwk_js.cpp" ] @@ -55,7 +54,6 @@ ohos_shared_library("hardwaremanager") { external_deps = [ "access_token:libtokenid_sdk", "bundle_framework:appexecfwk_base", - "cJSON:cjson", "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", diff --git a/interfaces/kits/napi/include/native_distributedhardwarefwk_js.h b/interfaces/kits/napi/include/native_distributedhardwarefwk_js.h index 777bd3fa4540e02b46bd01babd08ddeaa6f3043e..083558437a745acd6c28b355e63374fa3ba455e6 100644 --- a/interfaces/kits/napi/include/native_distributedhardwarefwk_js.h +++ b/interfaces/kits/napi/include/native_distributedhardwarefwk_js.h @@ -20,7 +20,6 @@ #include "napi/native_api.h" #include "napi/native_node_api.h" -#include "cJSON.h" class DistributedHardwareManager { public: diff --git a/interfaces/kits/napi/src/native_distributedhardwarefwk_js.cpp b/interfaces/kits/napi/src/native_distributedhardwarefwk_js.cpp index ab12ee5379d2965383f1a84246e3d58dbc52ab28..205a0665397c1242a4ad6d001e727bb4aa9da99b 100644 --- a/interfaces/kits/napi/src/native_distributedhardwarefwk_js.cpp +++ b/interfaces/kits/napi/src/native_distributedhardwarefwk_js.cpp @@ -15,11 +15,11 @@ #include "native_distributedhardwarefwk_js.h" -#include "device_type.h" #include "ipc_skeleton.h" #include "js_native_api.h" #include "tokenid_kit.h" -#include "cJSON.h" + +#include "device_type.h" #include "distributed_hardware_log.h" #include "distributed_hardware_fwk_kit.h" diff --git a/services/distributedhardwarefwkservice/BUILD.gn b/services/distributedhardwarefwkservice/BUILD.gn index b855dbaa99552719999357647ed7766bafc9c099..a623f6ed5a096fed34daf759ab17d84ebc194a17 100644 --- a/services/distributedhardwarefwkservice/BUILD.gn +++ b/services/distributedhardwarefwkservice/BUILD.gn @@ -37,7 +37,6 @@ ohos_shared_library("distributedhardwarefwksvr") { "${innerkits_path}/include/ipc", "${common_path}/log/include", "${common_path}/utils/include", - "${utils_path}/include/log", "${utils_path}/include", "include/componentloader", "include/versionmanager", @@ -50,7 +49,6 @@ ohos_shared_library("distributedhardwarefwksvr") { "include/resourcemanager", "include/hidumphelper", "include/ipc", - "${utils_path}/include/eventbus", "include/lowlatency", ] @@ -164,11 +162,6 @@ ohos_shared_library("distributedhardwarefwksvr") { "samgr:samgr_proxy", ] - if (powermgr_power_manager_fwk) { - external_deps += [ "power_manager:powermgr_client" ] - defines += [ "POWER_MANAGER_ENABLE" ] - } - subsystem_name = "distributedhardware" part_name = "distributed_hardware_fwk" diff --git a/services/distributedhardwarefwkservice/include/distributed_hardware_service.h b/services/distributedhardwarefwkservice/include/distributed_hardware_service.h index cb6d740846eb82f28c76d7528f020080dc3a6055..3f33491f240b3f9e051a2ec59d5be91ad70d227e 100644 --- a/services/distributedhardwarefwkservice/include/distributed_hardware_service.h +++ b/services/distributedhardwarefwkservice/include/distributed_hardware_service.h @@ -21,7 +21,6 @@ #include "system_ability.h" #include "distributed_hardware_fwk_kit.h" -#include "distributed_hardware_fwk_kit_paras.h" #include "distributed_hardware_stub.h" #include "single_instance.h" diff --git a/services/distributedhardwarefwkservice/include/lowlatency/low_latency.h b/services/distributedhardwarefwkservice/include/lowlatency/low_latency.h index f5942bf570ce241e27280bf70bbfaf282842002b..2f33c4340658c31adfc0432b7fcab283a57831ed 100644 --- a/services/distributedhardwarefwkservice/include/lowlatency/low_latency.h +++ b/services/distributedhardwarefwkservice/include/lowlatency/low_latency.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -17,7 +17,7 @@ #define OHOS_DISTRIBUTED_HARDWARE_LOW_LATENCY_H #include -#include +#include #include "device_type.h" #include "dh_timer.h" @@ -37,7 +37,7 @@ private: ~LowLatency(); private: - std::unordered_set lowLatencySwitchSet_; + std::vector lowLatencySwitchVec_; std::mutex lowLatencyMutex_; std::shared_ptr lowLatencyTimer_ = nullptr; }; diff --git a/services/distributedhardwarefwkservice/include/transport/dh_transport_obj.h b/services/distributedhardwarefwkservice/include/transport/dh_transport_obj.h index 3e2dfb7aa70c0a4955d368c768ae26c4ea5af378..ff23eb45e0dac059179bf39dfc19b97ea2ec063c 100644 --- a/services/distributedhardwarefwkservice/include/transport/dh_transport_obj.h +++ b/services/distributedhardwarefwkservice/include/transport/dh_transport_obj.h @@ -24,11 +24,6 @@ namespace OHOS { namespace DistributedHardware { -const char* const CAPS_RSP_NETWORKID_KEY = "networkId"; -const char* const CAPS_RSP_CAPS_KEY = "caps"; -const char* const COMM_MSG_CODE_KEY = "code"; -const char* const COMM_MSG_MSG_KEY = "msg"; - struct FullCapsRsp { // the networkd id of rsp from which device std::string networkId; diff --git a/services/distributedhardwarefwkservice/include/utils/dh_context.h b/services/distributedhardwarefwkservice/include/utils/dh_context.h index 4ee93b1468210ae7274334eb1c24746c5e1f05aa..d90d3d003dea8f0c6ed5763e84525f3ea59476fd 100644 --- a/services/distributedhardwarefwkservice/include/utils/dh_context.h +++ b/services/distributedhardwarefwkservice/include/utils/dh_context.h @@ -16,18 +16,12 @@ #ifndef OHOS_DISTRIBUTED_HARDWARE_DHCONTEXT_H #define OHOS_DISTRIBUTED_HARDWARE_DHCONTEXT_H -#include #include #include #include #include #include -#ifdef POWER_MANAGER_ENABLE -#include "power_mgr_client.h" -#include "power_state_callback_stub.h" -#endif - #include "device_type.h" #include "event_handler.h" #include "ipublisher_listener.h" @@ -109,21 +103,10 @@ public: }; std::shared_ptr GetEventHandler(); - bool IsSleeping(); - void SetIsSleeping(bool isSleeping); uint32_t GetIsomerismConnectCount(); void AddIsomerismConnectDev(const std::string &IsomerismDeviceId); void DelIsomerismConnectDev(const std::string &IsomerismDeviceId); -private: -#ifdef POWER_MANAGER_ENABLE - class DHFWKPowerStateCallback : public OHOS::PowerMgr::PowerStateCallbackStub { - public: - void OnPowerStateChanged(OHOS::PowerMgr::PowerState state) override; - }; - #endif - void RegisterPowerStateLinstener(); - private: class DHFWKIsomerismListener : public IPublisherListener { public: @@ -144,11 +127,8 @@ private: std::shared_mutex realTimeNetworkIdMutex_; std::shared_ptr eventHandler_; - /* true for system in sleeping, false for NOT in sleeping */ - std::atomic isSleeping_ = false; std::unordered_set connectedDevIds_; - std::shared_mutex connectDevMutex_; }; } // namespace DistributedHardware diff --git a/services/distributedhardwarefwkservice/src/distributed_hardware_service.cpp b/services/distributedhardwarefwkservice/src/distributed_hardware_service.cpp index 7c6c246697813cca09bd675a5c561c721f388a6f..7e39bd77fd05c13673eb2eae209c87f0f308ea7d 100644 --- a/services/distributedhardwarefwkservice/src/distributed_hardware_service.cpp +++ b/services/distributedhardwarefwkservice/src/distributed_hardware_service.cpp @@ -34,7 +34,6 @@ #include "dh_context.h" #include "dh_utils_tool.h" #include "dh_utils_hisysevent.h" -#include "distributed_hardware_fwk_kit_paras.h" #include "distributed_hardware_errno.h" #include "distributed_hardware_log.h" #include "distributed_hardware_manager_factory.h" diff --git a/services/distributedhardwarefwkservice/src/localhardwaremanager/plugin_listener_impl.cpp b/services/distributedhardwarefwkservice/src/localhardwaremanager/plugin_listener_impl.cpp index 06a15d93ef16c775636ab2a1bb742e377401058c..3b9e8db0551ea6a313d8732d16ec2986a2c29fca 100644 --- a/services/distributedhardwarefwkservice/src/localhardwaremanager/plugin_listener_impl.cpp +++ b/services/distributedhardwarefwkservice/src/localhardwaremanager/plugin_listener_impl.cpp @@ -36,10 +36,6 @@ void PluginListenerImpl::PluginHardware(const std::string &dhId, const std::stri return; } DHLOGI("plugin start, dhId: %{public}s", GetAnonyString(dhId).c_str()); - if (DHContext::GetInstance().IsSleeping()) { - DHLOGI("System is in sleeping, drop it"); - return; - } std::vector> capabilityInfos; std::string deviceId = DHContext::GetInstance().GetDeviceInfo().deviceId; std::string devName = DHContext::GetInstance().GetDeviceInfo().deviceName; @@ -59,10 +55,6 @@ void PluginListenerImpl::UnPluginHardware(const std::string &dhId) return; } DHLOGI("unplugin start, dhId: %{public}s", GetAnonyString(dhId).c_str()); - if (DHContext::GetInstance().IsSleeping()) { - DHLOGI("System is in sleeping, drop it"); - return; - } std::string deviceId = DHContext::GetInstance().GetDeviceInfo().deviceId; std::shared_ptr capability = nullptr; auto ret = CapabilityInfoManager::GetInstance()->GetCapability(deviceId, dhId, capability); diff --git a/services/distributedhardwarefwkservice/src/lowlatency/low_latency.cpp b/services/distributedhardwarefwkservice/src/lowlatency/low_latency.cpp index f6fd7d6dd00a8cf53f682e2b81ba121814ea68f8..6ec12fb3fc72f6d993ff6f673fdc9dc67400bd6b 100644 --- a/services/distributedhardwarefwkservice/src/lowlatency/low_latency.cpp +++ b/services/distributedhardwarefwkservice/src/lowlatency/low_latency.cpp @@ -53,16 +53,16 @@ void LowLatency::EnableLowLatency(DHType dhType) return; } std::lock_guard lock(lowLatencyMutex_); - DHLOGI("lowLatencySwitchSet size: %{public}zu", lowLatencySwitchSet_.size()); - if (lowLatencySwitchSet_.empty() && lowLatencyTimer_ != nullptr) { + DHLOGI("lowLatencySwitchSet size: %{public}zu", lowLatencySwitchVec_.size()); + if (lowLatencySwitchVec_.empty() && lowLatencyTimer_ != nullptr) { DHLOGD("Open LowLatency dhType: %{public}#X", dhType); lowLatencyTimer_->StartTimer(); } - if (lowLatencySwitchSet_.size() >= MAX_SWITCH_SIZE) { - DHLOGE("lowLatencySwitchSet_ is oversize"); + if (lowLatencySwitchVec_.size() >= MAX_SWITCH_SIZE) { + DHLOGE("lowLatencySwitchVec_ is oversize"); return; } - lowLatencySwitchSet_.insert(dhType); + lowLatencySwitchVec_.push_back(dhType); DHLOGI("End EnableLowLatency dhType: %{public}#X", dhType); } @@ -74,8 +74,13 @@ void LowLatency::DisableLowLatency(DHType dhType) return; } std::lock_guard lock(lowLatencyMutex_); - lowLatencySwitchSet_.erase(dhType); - if (lowLatencySwitchSet_.empty() && lowLatencyTimer_ != nullptr) { + for (auto iter = lowLatencySwitchVec_.begin(); iter != lowLatencySwitchVec_.end(); iter++) { + if (*iter == dhType) { + lowLatencySwitchVec_.erase(iter); + break; + } + } + if (lowLatencySwitchVec_.empty() && lowLatencyTimer_ != nullptr) { DHLOGD("Close LowLatency dhType: %{public}#X", dhType); lowLatencyTimer_->StopTimer(); } @@ -86,7 +91,7 @@ void LowLatency::CloseLowLatency() { DHLOGI("Shutdown LowLatency"); std::lock_guard lock(lowLatencyMutex_); - lowLatencySwitchSet_.clear(); + lowLatencySwitchVec_.clear(); // to restore normal latency mode: value = 1 OHOS::ResourceSchedule::ResSchedClient::GetInstance().ReportData( OHOS::ResourceSchedule::ResType::RES_TYPE_NETWORK_LATENCY_REQUEST, MODE_DISABLE, diff --git a/services/distributedhardwarefwkservice/src/transport/dh_transport_obj.cpp b/services/distributedhardwarefwkservice/src/transport/dh_transport_obj.cpp index 3f40ca9add6a05ff881670a4c1efbcbea0745774..5e4fb783eed78a844b33b0ca02bacd8c7eca7802 100644 --- a/services/distributedhardwarefwkservice/src/transport/dh_transport_obj.cpp +++ b/services/distributedhardwarefwkservice/src/transport/dh_transport_obj.cpp @@ -20,6 +20,12 @@ namespace OHOS { namespace DistributedHardware { +namespace { + const char* const CAPS_RSP_NETWORKID_KEY = "networkId"; + const char* const CAPS_RSP_CAPS_KEY = "caps"; + const char* const COMM_MSG_CODE_KEY = "code"; + const char* const COMM_MSG_MSG_KEY = "msg"; +} void ToJson(cJSON *jsonObject, const FullCapsRsp &capsRsp) { diff --git a/services/distributedhardwarefwkservice/src/utils/dh_context.cpp b/services/distributedhardwarefwkservice/src/utils/dh_context.cpp index bae8f409eaf81c131bb0691eab86e9866e58f88c..4ff2d633a890d85cce143b251bd56fe0db9f3745 100644 --- a/services/distributedhardwarefwkservice/src/utils/dh_context.cpp +++ b/services/distributedhardwarefwkservice/src/utils/dh_context.cpp @@ -34,7 +34,6 @@ DHContext::DHContext() DHLOGI("Ctor DHContext"); std::shared_ptr runner = AppExecFwk::EventRunner::Create(true); eventHandler_ = std::make_shared(runner); - RegisterPowerStateLinstener(); RegisDHFWKIsomerismListener(); } @@ -43,50 +42,6 @@ DHContext::~DHContext() DHLOGI("Dtor DHContext"); } -void DHContext::RegisterPowerStateLinstener() -{ - #ifdef POWER_MANAGER_ENABLE - sptr powerStateCallback_(new DHFWKPowerStateCallback()); - if (powerStateCallback_ == nullptr) { - DHLOGE("DHFWK subscribe create power state callback Create Error"); - return; - } - - bool ret = PowerMgr::PowerMgrClient::GetInstance().RegisterPowerStateCallback(powerStateCallback_); - if (!ret) { - DHLOGE("DHFWK register power state callback failed"); - } else { - DHLOGI("DHFWK register power state callback success"); - } - #endif -} - -#ifdef POWER_MANAGER_ENABLE -void DHContext::DHFWKPowerStateCallback::OnPowerStateChanged(PowerMgr::PowerState state) -{ - DHLOGI("DHFWK OnPowerStateChanged state: %{public}u", static_cast(state)); - if (state == PowerMgr::PowerState::SLEEP || state == PowerMgr::PowerState::HIBERNATE || - state == PowerMgr::PowerState::SHUTDOWN) { - DHLOGI("DHFWK set in sleeping"); - DHContext::GetInstance().SetIsSleeping(true); - return; - } - - DHLOGI("DHFWK set NOT in sleeping"); - DHContext::GetInstance().SetIsSleeping(false); -} -#endif - -bool DHContext::IsSleeping() -{ - return isSleeping_; -} - -void DHContext::SetIsSleeping(bool isSleeping) -{ - isSleeping_ = isSleeping; -} - DHContext::CommonEventHandler::CommonEventHandler(const std::shared_ptr runner) : AppExecFwk::EventHandler(runner) { diff --git a/services/distributedhardwarefwkservice/test/fuzztest/accessmanager_fuzzer/BUILD.gn b/services/distributedhardwarefwkservice/test/fuzztest/accessmanager_fuzzer/BUILD.gn index 5c9e96068d098ccebc8d7000d84cfcd8660246fc..07440f6875ac3609521d9381ca6b59fbca0304c3 100644 --- a/services/distributedhardwarefwkservice/test/fuzztest/accessmanager_fuzzer/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/fuzztest/accessmanager_fuzzer/BUILD.gn @@ -24,7 +24,6 @@ ohos_fuzztest("AccessManagerFuzzTest") { include_dirs = [ "${utils_path}/include", - "${utils_path}/include/log", "${common_path}/utils/include", "${common_path}/log/include", "${services_path}/distributedhardwarefwkservice/include", diff --git a/services/distributedhardwarefwkservice/test/fuzztest/accessmanageroffline_fuzzer/BUILD.gn b/services/distributedhardwarefwkservice/test/fuzztest/accessmanageroffline_fuzzer/BUILD.gn index 1454d4ca30f0487565b7a069b4fcbc1452900376..dc95e933fd55e18c43a6f5d85236a0e8767a9c1d 100644 --- a/services/distributedhardwarefwkservice/test/fuzztest/accessmanageroffline_fuzzer/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/fuzztest/accessmanageroffline_fuzzer/BUILD.gn @@ -23,7 +23,6 @@ ohos_fuzztest("AccessManagerOfflineFuzzTest") { include_dirs = [ "${utils_path}/include", - "${utils_path}/include/log", "${common_path}/utils/include", "${common_path}/log/include", "${services_path}/distributedhardwarefwkservice/include", diff --git a/services/distributedhardwarefwkservice/test/fuzztest/capabilityinfomanager_fuzzer/BUILD.gn b/services/distributedhardwarefwkservice/test/fuzztest/capabilityinfomanager_fuzzer/BUILD.gn index b4bc0d78430e2c610fb8a8c9a30cc016c9f9740a..e0e72057868309907407eef073ce33b9405e0a43 100644 --- a/services/distributedhardwarefwkservice/test/fuzztest/capabilityinfomanager_fuzzer/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/fuzztest/capabilityinfomanager_fuzzer/BUILD.gn @@ -23,8 +23,6 @@ ohos_fuzztest("CapabilityInfoManagerFuzzTest") { include_dirs = [ "${utils_path}/include", - "${utils_path}/include/eventbus", - "${utils_path}/include/log", "${common_path}/log/include", "${common_path}/utils/include", "${services_path}/distributedhardwarefwkservice/include/resourcemanager", diff --git a/services/distributedhardwarefwkservice/test/fuzztest/componentdisable_fuzzer/BUILD.gn b/services/distributedhardwarefwkservice/test/fuzztest/componentdisable_fuzzer/BUILD.gn index 6aeb76caf158906f35f7329583f412393ef1f837..f5cb72d054ac6f29954c38926e2d641d8c6094eb 100644 --- a/services/distributedhardwarefwkservice/test/fuzztest/componentdisable_fuzzer/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/fuzztest/componentdisable_fuzzer/BUILD.gn @@ -23,8 +23,6 @@ ohos_fuzztest("ComponentDisableFuzzTest") { include_dirs = [ "${utils_path}/include", - "${utils_path}/include/eventbus", - "${utils_path}/include/log", "${common_path}/log/include", "${common_path}/utils/include", "${services_path}/distributedhardwarefwkservice/include/componentdisable", diff --git a/services/distributedhardwarefwkservice/test/fuzztest/componentenable_fuzzer/BUILD.gn b/services/distributedhardwarefwkservice/test/fuzztest/componentenable_fuzzer/BUILD.gn index 3b839b89611ecd8a743d7d45a87fa8891eaa6f5a..eb3808ba4deff74cff12fc202cce7f988c0ce50f 100644 --- a/services/distributedhardwarefwkservice/test/fuzztest/componentenable_fuzzer/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/fuzztest/componentenable_fuzzer/BUILD.gn @@ -23,8 +23,6 @@ ohos_fuzztest("ComponentEnableFuzzTest") { include_dirs = [ "${utils_path}/include", - "${utils_path}/include/eventbus", - "${utils_path}/include/log", "${common_path}/log/include", "${common_path}/utils/include", "${services_path}/distributedhardwarefwkservice/include/componentenable", diff --git a/services/distributedhardwarefwkservice/test/fuzztest/componentloader_fuzzer/BUILD.gn b/services/distributedhardwarefwkservice/test/fuzztest/componentloader_fuzzer/BUILD.gn index d1ddf93cd7105ba34a4398d4195e2b695d2980c8..8a49e1edb944012ff01f9e9e1c1ec460a33e1345 100644 --- a/services/distributedhardwarefwkservice/test/fuzztest/componentloader_fuzzer/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/fuzztest/componentloader_fuzzer/BUILD.gn @@ -25,8 +25,6 @@ ohos_fuzztest("ComponentLoaderFuzzTest") { include_dirs = [ "include", "${utils_path}/include", - "${utils_path}/include/eventbus", - "${utils_path}/include/log", "${services_path}/distributedhardwarefwkservice/include", "${services_path}/distributedhardwarefwkservice/include/versionmanager", "${services_path}/distributedhardwarefwkservice/include/resourcemanager", diff --git a/services/distributedhardwarefwkservice/test/fuzztest/componentmanager_fuzzer/BUILD.gn b/services/distributedhardwarefwkservice/test/fuzztest/componentmanager_fuzzer/BUILD.gn index 6888e760b312d501c68fb4daa38171d3bcdf1c59..ef234de0cfadedb109b1d4ece44e397bd58c89a0 100644 --- a/services/distributedhardwarefwkservice/test/fuzztest/componentmanager_fuzzer/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/fuzztest/componentmanager_fuzzer/BUILD.gn @@ -25,7 +25,6 @@ ohos_fuzztest("ComponentManagerFuzzTest") { "${av_trans_path}/common/include", "${innerkits_path}/include", "${utils_path}/include", - "${utils_path}/include/log", "${services_path}/distributedhardwarefwkservice/include", "${services_path}/distributedhardwarefwkservice/include/componentmanager", "${services_path}/distributedhardwarefwkservice/include/lowlatency", diff --git a/services/distributedhardwarefwkservice/test/fuzztest/dhmanagerfactory_fuzzer/BUILD.gn b/services/distributedhardwarefwkservice/test/fuzztest/dhmanagerfactory_fuzzer/BUILD.gn index bf8e970c50b081119dba84f99ca71407afc425bf..9d3b562e15a4dc5784ea29558abc843dcf629fa9 100644 --- a/services/distributedhardwarefwkservice/test/fuzztest/dhmanagerfactory_fuzzer/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/fuzztest/dhmanagerfactory_fuzzer/BUILD.gn @@ -24,7 +24,6 @@ ohos_fuzztest("DhManagerFactoryFuzzTest") { include_dirs = [ "${utils_path}/include", - "${utils_path}/include/log", "${common_path}/utils/include", "${common_path}/log/include", "${services_path}/distributedhardwarefwkservice/include", diff --git a/services/distributedhardwarefwkservice/test/fuzztest/dhtransport_fuzzer/BUILD.gn b/services/distributedhardwarefwkservice/test/fuzztest/dhtransport_fuzzer/BUILD.gn index a4280940380357d21d1f126aad1fe43d43da2445..81ec91d263bc696eed55624957e4488239c51b7f 100644 --- a/services/distributedhardwarefwkservice/test/fuzztest/dhtransport_fuzzer/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/fuzztest/dhtransport_fuzzer/BUILD.gn @@ -23,7 +23,6 @@ ohos_fuzztest("DhTransportFuzzTest") { include_dirs = [ "${utils_path}/include", - "${utils_path}/include/log", "${common_path}/utils/include", "${common_path}/log/include", "${services_path}/distributedhardwarefwkservice/include", diff --git a/services/distributedhardwarefwkservice/test/fuzztest/distributedfwkservices_fuzzer/BUILD.gn b/services/distributedhardwarefwkservice/test/fuzztest/distributedfwkservices_fuzzer/BUILD.gn index 8bf58eb02cd7b5f1e3d192be15ef24fa2a22daf2..d110a596c3fcbd55576b20627728e7983f2faec7 100644 --- a/services/distributedhardwarefwkservice/test/fuzztest/distributedfwkservices_fuzzer/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/fuzztest/distributedfwkservices_fuzzer/BUILD.gn @@ -25,7 +25,6 @@ ohos_fuzztest("DistributedFwkServicesFuzzTest") { "${av_trans_path}/common/include", "include", "${utils_path}/include", - "${utils_path}/include/log", "${common_path}/utils/include", "${common_path}/log/include", "${services_path}/distributedhardwarefwkservice/include", diff --git a/services/distributedhardwarefwkservice/test/fuzztest/enabledcompsdump_fuzzer/BUILD.gn b/services/distributedhardwarefwkservice/test/fuzztest/enabledcompsdump_fuzzer/BUILD.gn index eca2c1a5100fa8cae9c5f319fa855f4a2f59d793..734bbfaf4e51c087b7e7959ee8f9c51f6dca8106 100644 --- a/services/distributedhardwarefwkservice/test/fuzztest/enabledcompsdump_fuzzer/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/fuzztest/enabledcompsdump_fuzzer/BUILD.gn @@ -24,7 +24,6 @@ ohos_fuzztest("EnabledCompsDumpFuzzTest") { include_dirs = [ "${utils_path}/include", - "${utils_path}/include/log", "${common_path}/utils/include", "${common_path}/log/include", "${services_path}/distributedhardwarefwkservice/include", diff --git a/services/distributedhardwarefwkservice/test/fuzztest/metainfomgr_fuzzer/BUILD.gn b/services/distributedhardwarefwkservice/test/fuzztest/metainfomgr_fuzzer/BUILD.gn index e46e730cff2b759058e132baa782518648cf1ec6..02e4fa56ca5655ce23ef55c8c30c76225c6e450d 100644 --- a/services/distributedhardwarefwkservice/test/fuzztest/metainfomgr_fuzzer/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/fuzztest/metainfomgr_fuzzer/BUILD.gn @@ -23,10 +23,8 @@ ohos_fuzztest("MetaInfoMgrFuzzTest") { include_dirs = [ "${utils_path}/include", - "${utils_path}/include/log", "${common_path}/utils/include", "${common_path}/log/include", - "${utils_path}/include/eventbus", "${services_path}/distributedhardwarefwkservice/include", "${services_path}/distributedhardwarefwkservice/include/transport", "${services_path}/distributedhardwarefwkservice/include/componentmanager", diff --git a/services/distributedhardwarefwkservice/test/fuzztest/publisher_fuzzer/BUILD.gn b/services/distributedhardwarefwkservice/test/fuzztest/publisher_fuzzer/BUILD.gn index abb7baa5cbcfb23e23119725523811681a4b49a1..62c726c7bda339aa52491c7d84c96e586a8a03a5 100644 --- a/services/distributedhardwarefwkservice/test/fuzztest/publisher_fuzzer/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/fuzztest/publisher_fuzzer/BUILD.gn @@ -24,7 +24,6 @@ ohos_fuzztest("PublisherFuzzTest") { include_dirs = [ "${utils_path}/include", - "${utils_path}/include/log", "${common_path}/utils/include", "${common_path}/log/include", "${innerkits_path}/include", diff --git a/services/distributedhardwarefwkservice/test/fuzztest/publisheritem_fuzzer/BUILD.gn b/services/distributedhardwarefwkservice/test/fuzztest/publisheritem_fuzzer/BUILD.gn index 94128f5288137d57265d7e44c97cfc76c97976c2..f7e37d83fa77cc634294c82a40e7a3d6c5047e3c 100644 --- a/services/distributedhardwarefwkservice/test/fuzztest/publisheritem_fuzzer/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/fuzztest/publisheritem_fuzzer/BUILD.gn @@ -24,7 +24,6 @@ ohos_fuzztest("PublisherItemFuzzTest") { include_dirs = [ "${utils_path}/include", - "${utils_path}/include/log", "${common_path}/utils/include", "${common_path}/log/include", "${innerkits_path}/include", diff --git a/services/distributedhardwarefwkservice/test/fuzztest/resourcemanager_fuzzer/BUILD.gn b/services/distributedhardwarefwkservice/test/fuzztest/resourcemanager_fuzzer/BUILD.gn index 3063467869e31bf940f7302f391158deae70fe0a..11c2baed7c159602f8305c77f8ea9005d7e7e117 100644 --- a/services/distributedhardwarefwkservice/test/fuzztest/resourcemanager_fuzzer/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/fuzztest/resourcemanager_fuzzer/BUILD.gn @@ -24,8 +24,6 @@ ohos_fuzztest("ResourceManagerFuzzTest") { include_dirs = [ "${utils_path}/include", - "${utils_path}/include/log", - "${utils_path}/include/eventbus", "${services_path}/distributedhardwarefwkservice/include", "${services_path}/distributedhardwarefwkservice/include/resourcemanager", "${services_path}/distributedhardwarefwkservice/include/utils", @@ -57,11 +55,6 @@ ohos_fuzztest("ResourceManagerFuzzTest") { "ipc:ipc_single", "kv_store:distributeddata_inner", ] - - if (powermgr_power_manager_fwk) { - external_deps += [ "power_manager:powermgr_client" ] - defines += [ "POWER_MANAGER_ENABLE" ] - } } ############################################################################### diff --git a/services/distributedhardwarefwkservice/test/fuzztest/task_fuzzer/BUILD.gn b/services/distributedhardwarefwkservice/test/fuzztest/task_fuzzer/BUILD.gn index 4d3bce4625f184ed7309c2a90f5de8dc884a2cca..d83f4ca5705ee606f31ce0464867f573881a6959 100644 --- a/services/distributedhardwarefwkservice/test/fuzztest/task_fuzzer/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/fuzztest/task_fuzzer/BUILD.gn @@ -26,7 +26,6 @@ ohos_fuzztest("TaskFuzzTest") { include_dirs = [ "include", "${utils_path}/include", - "${utils_path}/include/log", "${services_path}/distributedhardwarefwkservice/include", "${services_path}/distributedhardwarefwkservice/include/task", "${services_path}/distributedhardwarefwkservice/include/utils", diff --git a/services/distributedhardwarefwkservice/test/fuzztest/versioninfomanager_fuzzer/BUILD.gn b/services/distributedhardwarefwkservice/test/fuzztest/versioninfomanager_fuzzer/BUILD.gn index f81aa8fe77efc549ef3ce92ed71a899b7f882a2e..5a9381e8f8e80cfd51a3997ed1fadc9189c2769f 100644 --- a/services/distributedhardwarefwkservice/test/fuzztest/versioninfomanager_fuzzer/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/fuzztest/versioninfomanager_fuzzer/BUILD.gn @@ -24,8 +24,6 @@ ohos_fuzztest("VersioninfoManagerFuzzTest") { include_dirs = [ "${utils_path}/include", - "${utils_path}/include/log", - "${utils_path}/include/eventbus", "${services_path}/distributedhardwarefwkservice/include", "${services_path}/distributedhardwarefwkservice/include/resourcemanager", "${services_path}/distributedhardwarefwkservice/include/utils", diff --git a/services/distributedhardwarefwkservice/test/unittest/common/accessmanager/BUILD.gn b/services/distributedhardwarefwkservice/test/unittest/common/accessmanager/BUILD.gn index f14a0f80960685978159f717af357a492ef733a6..631bec2b61730d753e64d1f1cc786223064c66bc 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/accessmanager/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/unittest/common/accessmanager/BUILD.gn @@ -20,14 +20,12 @@ module_out_path = "distributed_hardware_fwk/access_manager_test" config("module_private_config") { include_dirs = [ "${utils_path}/include", - "${utils_path}/include/log", "${common_path}/utils/include", "${common_path}/log/include", "${services_path}/distributedhardwarefwkservice/include", "${services_path}/distributedhardwarefwkservice/include/utils", "${services_path}/distributedhardwarefwkservice/include/accessmanager", "${services_path}/distributedhardwarefwkservice/include/resourcemanager", - "${utils_path}/include/eventbus", ] } @@ -69,11 +67,6 @@ ohos_unittest("AccessManagerTest") { "safwk:system_ability_fwk", "samgr:samgr_proxy", ] - - if (powermgr_power_manager_fwk) { - external_deps += [ "power_manager:powermgr_client" ] - defines += [ "POWER_MANAGER_ENABLE" ] - } } group("unittest") { diff --git a/services/distributedhardwarefwkservice/test/unittest/common/componentloader/BUILD.gn b/services/distributedhardwarefwkservice/test/unittest/common/componentloader/BUILD.gn index 7821e817c899f8982fa0a056430faecaf2dda17d..0b24e07555f105a65d66a5108e2ed5d1273034e7 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/componentloader/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/unittest/common/componentloader/BUILD.gn @@ -22,8 +22,6 @@ config("module_private_config") { include_dirs = [ "include", "${utils_path}/include", - "${utils_path}/include/eventbus", - "${utils_path}/include/log", "${services_path}/distributedhardwarefwkservice/include", "${services_path}/distributedhardwarefwkservice/include/hidumphelper", "${services_path}/distributedhardwarefwkservice/include/versionmanager", @@ -72,11 +70,6 @@ ohos_unittest("ComponentLoaderTest") { if (!distributed_hardware_fwk_low_latency) { defines += [ "DHARDWARE_CLOSE_UT" ] } - - if (powermgr_power_manager_fwk) { - external_deps += [ "power_manager:powermgr_client" ] - defines += [ "POWER_MANAGER_ENABLE" ] - } } group("component_loader_test") { diff --git a/services/distributedhardwarefwkservice/test/unittest/common/componentmanager/component_manager/BUILD.gn b/services/distributedhardwarefwkservice/test/unittest/common/componentmanager/component_manager/BUILD.gn index 45f05507a71ede95c3c7ad44bfe636e041cfddc5..8dfdc1ff50a35bf5d3523f525d00f5a6c86c217f 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/componentmanager/component_manager/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/unittest/common/componentmanager/component_manager/BUILD.gn @@ -24,8 +24,6 @@ config("module_private_config") { "include", "${innerkits_path}/include", "${utils_path}/include", - "${utils_path}/include/log", - "${utils_path}/include/eventbus", "${services_path}/distributedhardwarefwkservice/include", "${services_path}/distributedhardwarefwkservice/include/componentloader", "${services_path}/distributedhardwarefwkservice/include/componentmanager", @@ -79,11 +77,6 @@ ohos_unittest("ComponentManagerTest") { if (!distributed_hardware_fwk_low_latency) { defines += [ "DHARDWARE_CLOSE_UT" ] } - - if (powermgr_power_manager_fwk) { - external_deps += [ "power_manager:powermgr_client" ] - defines += [ "POWER_MANAGER_ENABLE" ] - } } group("component_manager_test") { diff --git a/services/distributedhardwarefwkservice/test/unittest/common/componentmanager/component_monitior/BUILD.gn b/services/distributedhardwarefwkservice/test/unittest/common/componentmanager/component_monitior/BUILD.gn index 53bb179e0ed935d13cdf9b57cc80a4e68ef11e95..bf2484e6727e691103edc5042c7c2e4b8ee0c9a9 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/componentmanager/component_monitior/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/unittest/common/componentmanager/component_monitior/BUILD.gn @@ -22,8 +22,6 @@ config("module_private_config") { include_dirs = [ "include", "${utils_path}/include", - "${utils_path}/include/log", - "${utils_path}/include/eventbus", "${services_path}/distributedhardwarefwkservice/include", "${services_path}/distributedhardwarefwkservice/include/componentloader", "${services_path}/distributedhardwarefwkservice/include/componentmanager", diff --git a/services/distributedhardwarefwkservice/test/unittest/common/componentmanager/component_privacy/BUILD.gn b/services/distributedhardwarefwkservice/test/unittest/common/componentmanager/component_privacy/BUILD.gn index df323e89cd2f45db77f4297f2df8938e3d8ec56d..a4cc21b24bda4cdb819d2c25462200862cb1f522 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/componentmanager/component_privacy/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/unittest/common/componentmanager/component_privacy/BUILD.gn @@ -20,8 +20,6 @@ config("module_private_config") { visibility = [ ":*" ] include_dirs = [ "${utils_path}/include", - "${utils_path}/include/log", - "${utils_path}/include/eventbus", "${services_path}/distributedhardwarefwkservice/include", "${services_path}/distributedhardwarefwkservice/include/componentloader", "${services_path}/distributedhardwarefwkservice/include/componentmanager", diff --git a/services/distributedhardwarefwkservice/test/unittest/common/dbadapter/BUILD.gn b/services/distributedhardwarefwkservice/test/unittest/common/dbadapter/BUILD.gn index 313ca66c183d9b1cc339125d6f3fa6863c4025d4..a8cb59e6939ca54d9d124dc3f4a0600f984ae2c5 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/dbadapter/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/unittest/common/dbadapter/BUILD.gn @@ -22,8 +22,6 @@ config("module_private_config") { include_dirs = [ "include", "${utils_path}/include", - "${utils_path}/include/log", - "${utils_path}/include/eventbus", "${services_path}/distributedhardwarefwkservice/include", "${services_path}/distributedhardwarefwkservice/include/resourcemanager", "${services_path}/distributedhardwarefwkservice/include/utils", @@ -63,11 +61,6 @@ ohos_unittest("DbAdapterTest") { "kv_store:distributeddata_inner", "safwk:system_ability_fwk", ] - - if (powermgr_power_manager_fwk) { - external_deps += [ "power_manager:powermgr_client" ] - defines = [ "POWER_MANAGER_ENABLE" ] - } } group("db_adapter_test") { diff --git a/services/distributedhardwarefwkservice/test/unittest/common/distributedhardwaremanager/BUILD.gn b/services/distributedhardwarefwkservice/test/unittest/common/distributedhardwaremanager/BUILD.gn index e0a9163d7aed2da11619c54a6b2c9587bb9289c8..f5244874abab855fe69842b9c87e69323899b049 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/distributedhardwaremanager/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/unittest/common/distributedhardwaremanager/BUILD.gn @@ -22,7 +22,6 @@ config("module_private_config") { include_dirs = [ "include", "${utils_path}/include", - "${utils_path}/include/log", "${common_path}/log/include", "${common_path}/utils/include", "${services_path}/distributedhardwarefwkservice/include", @@ -59,11 +58,6 @@ ohos_unittest("DistributedHardwareManagerTest") { "-g3", "-Dprivate=public", ] - - if (powermgr_power_manager_fwk) { - external_deps += [ "power_manager:powermgr_client" ] - defines += [ "POWER_MANAGER_ENABLE" ] - } } group("distributed_hardware_manager_test") { diff --git a/services/distributedhardwarefwkservice/test/unittest/common/distributedhardwareservice/BUILD.gn b/services/distributedhardwarefwkservice/test/unittest/common/distributedhardwareservice/BUILD.gn index b344cdec7ddc4d413dbe949064a7d7d909a1c2d1..142ea0be301d8b254e5aeee9e70f0e0c196716e8 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/distributedhardwareservice/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/unittest/common/distributedhardwareservice/BUILD.gn @@ -24,8 +24,6 @@ config("module_private_config") { "include", "${innerkits_path}/include", "${utils_path}/include", - "${utils_path}/include/log", - "${utils_path}/include/eventbus", "${common_path}/log/include", "${common_path}/utils/include", "${services_path}/distributedhardwarefwkservice/include", @@ -66,11 +64,6 @@ ohos_unittest("DistributedHardwareServiceTest") { "ipc:ipc_core", "safwk:system_ability_fwk", ] - - if (powermgr_power_manager_fwk) { - external_deps += [ "power_manager:powermgr_client" ] - defines += [ "POWER_MANAGER_ENABLE" ] - } } group("distributed_hardware_service_test") { diff --git a/services/distributedhardwarefwkservice/test/unittest/common/distributedhardwarestub/BUILD.gn b/services/distributedhardwarefwkservice/test/unittest/common/distributedhardwarestub/BUILD.gn index 2e5f710c6954fef46b73951333d50cb17c6617eb..2f503e2c71422421278915f797a372aa78d35f26 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/distributedhardwarestub/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/unittest/common/distributedhardwarestub/BUILD.gn @@ -24,8 +24,6 @@ config("module_private_config") { "include", "${innerkits_path}/include", "${utils_path}/include", - "${utils_path}/include/log", - "${utils_path}/include/eventbus", "${common_path}/log/include", "${common_path}/utils/include", "${services_path}/distributedhardwarefwkservice/include", diff --git a/services/distributedhardwarefwkservice/test/unittest/common/distributedhardwarestub/include/distributed_hardware_stub_test.h b/services/distributedhardwarefwkservice/test/unittest/common/distributedhardwarestub/include/distributed_hardware_stub_test.h index 55e90c9087015b8cd221adca3f4bc3cecb6d8004..bceb4d8a46187e970408633059d85ef2ca61fa28 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/distributedhardwarestub/include/distributed_hardware_stub_test.h +++ b/services/distributedhardwarefwkservice/test/unittest/common/distributedhardwarestub/include/distributed_hardware_stub_test.h @@ -19,7 +19,6 @@ #include #include "distributed_hardware_errno.h" -#include "distributed_hardware_fwk_kit_paras.h" #include "distributed_hardware_stub.h" namespace OHOS { diff --git a/services/distributedhardwarefwkservice/test/unittest/common/hidumphelper/hidumphelper/BUILD.gn b/services/distributedhardwarefwkservice/test/unittest/common/hidumphelper/hidumphelper/BUILD.gn index b2174a0d8c6765936d810ee4ab8bed7dda1bf7a1..8f0646e542878ee6908f8459601393be29cdc606 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/hidumphelper/hidumphelper/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/unittest/common/hidumphelper/hidumphelper/BUILD.gn @@ -23,9 +23,7 @@ config("module_private_config") { "include", "${av_trans_path}/common/include", "${common_path}/utils/include", - "${utils_path}/include/log", "${innerkits_path}/include", - "${utils_path}/include/eventbus", "${services_path}/distributedhardwarefwkservice/include", "${services_path}/distributedhardwarefwkservice/include/hidumphelper", "${services_path}/distributedhardwarefwkservice/include/resourcemanager", diff --git a/services/distributedhardwarefwkservice/test/unittest/common/localhardwaremanager/localhardwaremanager/BUILD.gn b/services/distributedhardwarefwkservice/test/unittest/common/localhardwaremanager/localhardwaremanager/BUILD.gn index 48c3d17f4377c99de87f73d7bb2c595381de29ee..56b4702d29d0e444ee1e740eeaad71aa99f5f90f 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/localhardwaremanager/localhardwaremanager/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/unittest/common/localhardwaremanager/localhardwaremanager/BUILD.gn @@ -23,8 +23,6 @@ config("module_private_config") { include_dirs = [ "include", "${utils_path}/include", - "${utils_path}/include/eventbus", - "${utils_path}/include/log", "${services_path}/distributedhardwarefwkservice/include", "${services_path}/distributedhardwarefwkservice/include/versionmanager", "${services_path}/distributedhardwarefwkservice/include/resourcemanager", @@ -69,11 +67,6 @@ ohos_unittest("LocalHardwareManagerTest") { "-g3", "-Dprivate=public", ] - - if (powermgr_power_manager_fwk) { - external_deps += [ "power_manager:powermgr_client" ] - defines += [ "POWER_MANAGER_ENABLE" ] - } } group("local_hardware_manager_test") { diff --git a/services/distributedhardwarefwkservice/test/unittest/common/localhardwaremanager/pluginlistenerimpl/BUILD.gn b/services/distributedhardwarefwkservice/test/unittest/common/localhardwaremanager/pluginlistenerimpl/BUILD.gn index a884518a0d908cd92b8e023d7a28b510eaa085f2..0ac488829db407e81ac0408a7c0cbb44ac59af9c 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/localhardwaremanager/pluginlistenerimpl/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/unittest/common/localhardwaremanager/pluginlistenerimpl/BUILD.gn @@ -22,8 +22,6 @@ config("module_private_config") { include_dirs = [ "include", "${utils_path}/include", - "${utils_path}/include/eventbus", - "${utils_path}/include/log", "${services_path}/distributedhardwarefwkservice/include", "${services_path}/distributedhardwarefwkservice/include/versionmanager", "${services_path}/distributedhardwarefwkservice/include/resourcemanager", diff --git a/services/distributedhardwarefwkservice/test/unittest/common/lowlatency/lowlatency/src/low_latency_test.cpp b/services/distributedhardwarefwkservice/test/unittest/common/lowlatency/lowlatency/src/low_latency_test.cpp index 4eb918ee2a91f43378be227068cf7ffa0051d576..728eda4225b7deb6c1774337448c16a6bb276706 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/lowlatency/lowlatency/src/low_latency_test.cpp +++ b/services/distributedhardwarefwkservice/test/unittest/common/lowlatency/lowlatency/src/low_latency_test.cpp @@ -33,7 +33,7 @@ void LowLatencyTest::SetUp() void LowLatencyTest::TearDown() { - LowLatency::GetInstance().lowLatencySwitchSet_.clear(); + LowLatency::GetInstance().lowLatencySwitchVec_.clear(); } /** @@ -46,7 +46,7 @@ HWTEST_F(LowLatencyTest, EnableLowLatency_001, TestSize.Level0) { DHType dhType = DHType::UNKNOWN; LowLatency::GetInstance().EnableLowLatency(dhType); - EXPECT_EQ(true, LowLatency::GetInstance().lowLatencySwitchSet_.empty()); + EXPECT_EQ(true, LowLatency::GetInstance().lowLatencySwitchVec_.empty()); } /** @@ -59,7 +59,7 @@ HWTEST_F(LowLatencyTest, EnableLowLatency_002, TestSize.Level0) { DHType dhType = DHType::CAMERA; LowLatency::GetInstance().EnableLowLatency(dhType); - EXPECT_EQ(false, LowLatency::GetInstance().lowLatencySwitchSet_.empty()); + EXPECT_EQ(false, LowLatency::GetInstance().lowLatencySwitchVec_.empty()); } /** @@ -70,10 +70,10 @@ HWTEST_F(LowLatencyTest, EnableLowLatency_002, TestSize.Level0) */ HWTEST_F(LowLatencyTest, EnableLowLatency_003, TestSize.Level0) { - LowLatency::GetInstance().lowLatencySwitchSet_.insert(DHType::AUDIO); + LowLatency::GetInstance().lowLatencySwitchVec_.push_back(DHType::AUDIO); DHType dhType = DHType::CAMERA; LowLatency::GetInstance().EnableLowLatency(dhType); - EXPECT_EQ(false, LowLatency::GetInstance().lowLatencySwitchSet_.empty()); + EXPECT_EQ(false, LowLatency::GetInstance().lowLatencySwitchVec_.empty()); } /** @@ -86,11 +86,11 @@ HWTEST_F(LowLatencyTest, EnableLowLatency_004, TestSize.Level0) { uint32_t MAX_SWITCH_SIZE = 256; for (uint32_t i = 0; i <= MAX_SWITCH_SIZE; ++i) { - LowLatency::GetInstance().lowLatencySwitchSet_.insert(static_cast(i)); + LowLatency::GetInstance().lowLatencySwitchVec_.push_back(static_cast(i)); } DHType dhType = DHType::CAMERA; LowLatency::GetInstance().EnableLowLatency(dhType); - EXPECT_EQ(false, LowLatency::GetInstance().lowLatencySwitchSet_.empty()); + EXPECT_EQ(false, LowLatency::GetInstance().lowLatencySwitchVec_.empty()); } /** @@ -103,7 +103,7 @@ HWTEST_F(LowLatencyTest, DisableLowLatency_001, TestSize.Level0) { DHType dhType = DHType::UNKNOWN; LowLatency::GetInstance().DisableLowLatency(dhType); - EXPECT_EQ(true, LowLatency::GetInstance().lowLatencySwitchSet_.empty()); + EXPECT_EQ(true, LowLatency::GetInstance().lowLatencySwitchVec_.empty()); } /** @@ -115,9 +115,9 @@ HWTEST_F(LowLatencyTest, DisableLowLatency_001, TestSize.Level0) HWTEST_F(LowLatencyTest, DisableLowLatency_002, TestSize.Level0) { DHType dhType = DHType::CAMERA; - LowLatency::GetInstance().lowLatencySwitchSet_.insert(dhType); + LowLatency::GetInstance().lowLatencySwitchVec_.push_back(dhType); LowLatency::GetInstance().DisableLowLatency(dhType); - EXPECT_EQ(true, LowLatency::GetInstance().lowLatencySwitchSet_.empty()); + EXPECT_EQ(true, LowLatency::GetInstance().lowLatencySwitchVec_.empty()); } /** @@ -129,7 +129,7 @@ HWTEST_F(LowLatencyTest, DisableLowLatency_002, TestSize.Level0) HWTEST_F(LowLatencyTest, CloseLowLatency_001, TestSize.Level0) { LowLatency::GetInstance().CloseLowLatency(); - EXPECT_EQ(true, LowLatency::GetInstance().lowLatencySwitchSet_.empty()); + EXPECT_EQ(true, LowLatency::GetInstance().lowLatencySwitchVec_.empty()); } } // namespace DistributedHardware } // namespace OHOS diff --git a/services/distributedhardwarefwkservice/test/unittest/common/resourcemanager/BUILD.gn b/services/distributedhardwarefwkservice/test/unittest/common/resourcemanager/BUILD.gn index 2809608bfe9b9b0e3044f8e964700490623405e2..1cef373e5d57a1edd7aa17a25f45714d1d8f6fce 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/resourcemanager/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/unittest/common/resourcemanager/BUILD.gn @@ -22,8 +22,6 @@ config("module_private_config") { include_dirs = [ "include", "${utils_path}/include", - "${utils_path}/include/log", - "${utils_path}/include/eventbus", "${services_path}/distributedhardwarefwkservice/include", "${services_path}/distributedhardwarefwkservice/include/resourcemanager", "${services_path}/distributedhardwarefwkservice/include/utils", @@ -60,11 +58,6 @@ ohos_unittest("ResourceManagerTest") { "kv_store:distributeddata_inner", "safwk:system_ability_fwk", ] - - if (powermgr_power_manager_fwk) { - external_deps += [ "power_manager:powermgr_client" ] - defines = [ "POWER_MANAGER_ENABLE" ] - } } group("resource_manager_test") { diff --git a/services/distributedhardwarefwkservice/test/unittest/common/task/BUILD.gn b/services/distributedhardwarefwkservice/test/unittest/common/task/BUILD.gn index b875d8152ff9253f89b2be5482910316466fe694..69792208b82bff1a3f94b01de04f16631b6ea8fb 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/task/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/unittest/common/task/BUILD.gn @@ -22,7 +22,6 @@ config("module_private_config") { include_dirs = [ "include", "${utils_path}/include", - "${utils_path}/include/log", "${services_path}/distributedhardwarefwkservice/include", "${services_path}/distributedhardwarefwkservice/include/task", "${services_path}/distributedhardwarefwkservice/include/utils", diff --git a/services/distributedhardwarefwkservice/test/unittest/common/transport/BUILD.gn b/services/distributedhardwarefwkservice/test/unittest/common/transport/BUILD.gn index 46bb8b2e5a34142333f83c775c421a01a66054db..face9a6738f20727481e3ac9606cd43037c69f18 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/transport/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/unittest/common/transport/BUILD.gn @@ -21,7 +21,6 @@ config("module_private_config") { include_dirs = [ "include", "${utils_path}/include", - "${utils_path}/include/log", "${services_path}/distributedhardwarefwkservice/include", "${services_path}/distributedhardwarefwkservice/include/resourcemanager", "${services_path}/distributedhardwarefwkservice/include/transport", @@ -60,11 +59,6 @@ ohos_unittest("TransportTest") { "kv_store:distributeddata_inner", "safwk:system_ability_fwk", ] - - if (powermgr_power_manager_fwk) { - external_deps += [ "power_manager:powermgr_client" ] - defines = [ "POWER_MANAGER_ENABLE" ] - } } group("transport_test") { diff --git a/services/distributedhardwarefwkservice/test/unittest/common/utils/BUILD.gn b/services/distributedhardwarefwkservice/test/unittest/common/utils/BUILD.gn index 0e6182f62dd953beaee8397670f0b4338835b202..4d68b9741ed69e42b1e8e480b9c6675dd9dcd002 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/utils/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/unittest/common/utils/BUILD.gn @@ -68,11 +68,6 @@ ohos_unittest("DhContextTest") { "safwk:system_ability_fwk", "samgr:samgr_proxy", ] - - if (powermgr_power_manager_fwk) { - external_deps += [ "power_manager:powermgr_client" ] - defines += [ "POWER_MANAGER_ENABLE" ] - } } group("dh_context_test") { diff --git a/services/distributedhardwarefwkservice/test/unittest/common/versioninfomanager/versioninfo/BUILD.gn b/services/distributedhardwarefwkservice/test/unittest/common/versioninfomanager/versioninfo/BUILD.gn index 12ed28dc9bfa35150dc4cc7943852f5cd202777e..7ebad70a1d28e97e3581e993b604e11e7b7cb47d 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/versioninfomanager/versioninfo/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/unittest/common/versioninfomanager/versioninfo/BUILD.gn @@ -22,8 +22,6 @@ config("module_private_config") { include_dirs = [ "include", "${utils_path}/include", - "${utils_path}/include/log", - "${utils_path}/include/eventbus", "${services_path}/distributedhardwarefwkservice/include", "${services_path}/distributedhardwarefwkservice/include/resourcemanager", "${services_path}/distributedhardwarefwkservice/include/utils", @@ -53,11 +51,6 @@ ohos_unittest("VersionInfoTest") { "safwk:system_ability_fwk", ] - if (powermgr_power_manager_fwk) { - external_deps += [ "power_manager:powermgr_client" ] - defines = [ "POWER_MANAGER_ENABLE" ] - } - cflags = [ "-Wall", "-Werror", diff --git a/services/distributedhardwarefwkservice/test/unittest/common/versioninfomanager/versioninfomanager/BUILD.gn b/services/distributedhardwarefwkservice/test/unittest/common/versioninfomanager/versioninfomanager/BUILD.gn index 8889e7731bc7f3874702d6d75242a285414f54c9..bf72f1f96274f2eb72669317b071b0511f105359 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/versioninfomanager/versioninfomanager/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/unittest/common/versioninfomanager/versioninfomanager/BUILD.gn @@ -22,8 +22,6 @@ config("module_private_config") { include_dirs = [ "include", "${utils_path}/include", - "${utils_path}/include/log", - "${utils_path}/include/eventbus", "${services_path}/distributedhardwarefwkservice/include", "${services_path}/distributedhardwarefwkservice/include/resourcemanager", "${services_path}/distributedhardwarefwkservice/include/utils", @@ -55,11 +53,6 @@ ohos_unittest("VersioninfoManagerTest") { "safwk:system_ability_fwk", ] - if (powermgr_power_manager_fwk) { - external_deps += [ "power_manager:powermgr_client" ] - defines = [ "POWER_MANAGER_ENABLE" ] - } - cflags = [ "-Wall", "-Werror", diff --git a/services/distributedhardwarefwkservice/test/unittest/common/versionmanager/BUILD.gn b/services/distributedhardwarefwkservice/test/unittest/common/versionmanager/BUILD.gn index b123e3b78748fde566ca5023fbdc7d97f2a31f9f..f77e3fc3db03309e0d0388742b3e09149acfb1aa 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/versionmanager/BUILD.gn +++ b/services/distributedhardwarefwkservice/test/unittest/common/versionmanager/BUILD.gn @@ -22,8 +22,6 @@ config("module_private_config") { include_dirs = [ "include", "${utils_path}/include", - "${utils_path}/include/eventbus", - "${utils_path}/include/log", "${services_path}/distributedhardwarefwkservice/include", "${services_path}/distributedhardwarefwkservice/include/componentloader", "${services_path}/distributedhardwarefwkservice/include/resourcemanager", diff --git a/utils/BUILD.gn b/utils/BUILD.gn index b7eb4db9ec00a8e45d06e3dbc2968165e8b4c16b..3c5285415fe179b18e47efd6336de1da91a35f68 100644 --- a/utils/BUILD.gn +++ b/utils/BUILD.gn @@ -38,7 +38,6 @@ ohos_shared_library("distributedhardwareutils") { "${common_path}/log/include", "${common_path}/utils/include", "include", - "include/log", ] sources = [ @@ -75,7 +74,6 @@ ohos_shared_library("distributedhardwareutils") { "hitrace:hitrace_meter", "init:libbegetutil", "openssl:libcrypto_shared", - "safwk:system_ability_fwk", "zlib:shared_libz", ] diff --git a/utils/include/log/dh_log.h b/utils/include/log/dh_log.h deleted file mode 100644 index 109cda7994cba1a7fb189164432730ee23f64af0..0000000000000000000000000000000000000000 --- a/utils/include/log/dh_log.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef OHOS_DH_LOG_H -#define OHOS_DH_LOG_H - -#include - -#include "hilog/log.h" - -namespace OHOS { -namespace DistributedHardware { -#undef LOG_TAG -#define LOG_TAG "DHFWK" - -#define ULOGD(fmt, ...) HILOG_DEBUG(LOG_CORE, \ - "[%{public}s][%{public}s]:" fmt, DH_LOG_TAG, __FUNCTION__, ##__VA_ARGS__) - -#define ULOGI(fmt, ...) HILOG_INFO(LOG_CORE, \ - "[%{public}s][%{public}s]:" fmt, DH_LOG_TAG, __FUNCTION__, ##__VA_ARGS__) - -#define ULOGW(fmt, ...) HILOG_WARN(LOG_CORE, \ - "[%{public}s][%{public}s]:" fmt, DH_LOG_TAG, __FUNCTION__, ##__VA_ARGS__) - -#define ULOGE(fmt, ...) HILOG_ERROR(LOG_CORE, \ - "[%{public}s][%{public}s]:" fmt, DH_LOG_TAG, __FUNCTION__, ##__VA_ARGS__) -} // namespace DistributedHardware -} // namespace OHOS -#endif diff --git a/utils/src/anonymous_string.cpp b/utils/src/anonymous_string.cpp index 8984f4a44fce3cb0dbdf12cb51a281a4d6cefbf1..0354188ee9c629fc78b844411cb987e66d7ee50f 100644 --- a/utils/src/anonymous_string.cpp +++ b/utils/src/anonymous_string.cpp @@ -16,7 +16,6 @@ #include "anonymous_string.h" #include -#include #include "constants.h" #include "dh_utils_tool.h" diff --git a/utils/src/histreamer_ability_parser.cpp b/utils/src/histreamer_ability_parser.cpp index 8243a2378969d156f28859d12a576b0ade5edf7b..173c9d74c699379f7f1e8a2247372d8d0751d1c4 100644 --- a/utils/src/histreamer_ability_parser.cpp +++ b/utils/src/histreamer_ability_parser.cpp @@ -14,6 +14,7 @@ */ #include "histreamer_ability_parser.h" + #include "dh_utils_tool.h" #include "distributed_hardware_log.h" diff --git a/utils/test/fuzztest/utils_fuzzer/BUILD.gn b/utils/test/fuzztest/utils_fuzzer/BUILD.gn index 798da868b2cdc324703737725be740a56896092a..fe1485b6f0295d642f335cc7b57cd12849322801 100644 --- a/utils/test/fuzztest/utils_fuzzer/BUILD.gn +++ b/utils/test/fuzztest/utils_fuzzer/BUILD.gn @@ -24,7 +24,6 @@ ohos_fuzztest("UtilsFuzzTest") { include_dirs = [ "${utils_path}/include", - "${utils_path}/include/log", "${common_path}/utils/include", ] cflags = [ diff --git a/utils/test/unittest/common/histreamer_ability_parser/BUILD.gn b/utils/test/unittest/common/histreamer_ability_parser/BUILD.gn index df83502f7afce11e23af01e18e65349acc9e1148..7d4fac6e31188889b11a9d30fabea8e88d803012 100644 --- a/utils/test/unittest/common/histreamer_ability_parser/BUILD.gn +++ b/utils/test/unittest/common/histreamer_ability_parser/BUILD.gn @@ -22,7 +22,6 @@ config("module_private_config") { include_dirs = [ "include", "${utils_path}/include", - "${utils_path}/include/log", ] } diff --git a/utils/test/unittest/common/utilstool/BUILD.gn b/utils/test/unittest/common/utilstool/BUILD.gn index 57f394185e9d6a3befeaa36eb32c071f70804a07..dd67adecb5707da705c7d356efdf2d8812f64e59 100644 --- a/utils/test/unittest/common/utilstool/BUILD.gn +++ b/utils/test/unittest/common/utilstool/BUILD.gn @@ -22,7 +22,6 @@ config("module_private_config") { include_dirs = [ "include", "${utils_path}/include", - "${utils_path}/include/log", "${common_path}/utils/include", ] }