From 9ddf768d8c288655748bb320be806612342c3ab2 Mon Sep 17 00:00:00 2001 From: li-tiangang4 Date: Mon, 11 Aug 2025 19:42:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E5=B8=83=E5=BC=8FAI=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: li-tiangang4 --- .../src/componentloader/component_loader.cpp | 6 ++++-- .../src/componentmanager/component_manager.cpp | 7 ++++++- .../distributedhardwarefwkservice/src/task/online_task.cpp | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/services/distributedhardwarefwkservice/src/componentloader/component_loader.cpp b/services/distributedhardwarefwkservice/src/componentloader/component_loader.cpp index 8566f51b..5e9584e1 100644 --- a/services/distributedhardwarefwkservice/src/componentloader/component_loader.cpp +++ b/services/distributedhardwarefwkservice/src/componentloader/component_loader.cpp @@ -446,9 +446,11 @@ int32_t ComponentLoader::ParseConfig() std::map dhtypeMap; int32_t ret; DHLOGI("ParseConfig start"); - char buf[MAX_PATH_LEN] = {0}; + // char buf[MAX_PATH_LEN] = {0}; char path[PATH_MAX + 1] = {0x00}; - char *profilePath = GetOneCfgFile(COMPONENTSLOAD_PROFILE_PATH, buf, MAX_PATH_LEN); + // char *profilePath = GetOneCfgFile(COMPONENTSLOAD_PROFILE_PATH, buf, MAX_PATH_LEN); + const char *profilePath = + "/sys_prod/variant/region_comm/china/etc/distributedhardware/distributed_hardware_components_cfg.json"; if (profilePath == nullptr) { DHLOGE("profilePath is null."); return ERR_DH_FWK_LOADER_PROFILE_PATH_IS_NULL; diff --git a/services/distributedhardwarefwkservice/src/componentmanager/component_manager.cpp b/services/distributedhardwarefwkservice/src/componentmanager/component_manager.cpp index 76814600..420f48e9 100644 --- a/services/distributedhardwarefwkservice/src/componentmanager/component_manager.cpp +++ b/services/distributedhardwarefwkservice/src/componentmanager/component_manager.cpp @@ -297,6 +297,8 @@ int32_t ComponentManager::Enable(const std::string &networkId, const std::string int32_t ComponentManager::CheckSubtypeResource(const std::string &subtype, const std::string &networkId) { + DHLOGI("no check same account, return ok"); + return DH_FWK_SUCCESS; #ifdef DHARDWARE_CHECK_RESOURCE std::map resourceDesc = ComponentLoader::GetInstance().GetCompResourceDesc(); if (resourceDesc.find(subtype) == resourceDesc.end()) { @@ -805,6 +807,8 @@ std::shared_ptr ComponentManager int32_t ComponentManager::CheckSinkConfigStart(const DHType dhType, bool &enableSink) { DHLOGI("CheckSinkConfigStart the dhType: %{public}#X configuration start.", dhType); + enableSink = true + return DH_FWK_SUCCESS; DHVersion localDhVersion; auto ret = ComponentLoader::GetInstance().GetLocalDHVersion(localDhVersion); if (ret != DH_FWK_SUCCESS) { @@ -831,7 +835,8 @@ int32_t ComponentManager::CheckSinkConfigStart(const DHType dhType, bool &enable int32_t ComponentManager::CheckDemandStart(const std::string &uuid, const DHType dhType, bool &enableSource) { DHLOGI("CheckDemandStart the dhType: %{public}#X configuration start.", dhType); - enableSource = false; + enableSource = true; + return DH_FWK_SUCCESS; CompVersion compVersion; auto ret = GetRemoteVerInfo(compVersion, uuid, dhType); diff --git a/services/distributedhardwarefwkservice/src/task/online_task.cpp b/services/distributedhardwarefwkservice/src/task/online_task.cpp index f47c5944..49254257 100644 --- a/services/distributedhardwarefwkservice/src/task/online_task.cpp +++ b/services/distributedhardwarefwkservice/src/task/online_task.cpp @@ -95,6 +95,8 @@ void OnLineTask::DoSyncInfo() GetAnonyString(deviceId).c_str(), GetAnonyString(GetUUID()).c_str(), GetAnonyString(GetUDID()).c_str(), GetAnonyString(udidHash).c_str()); + DHLOGI("active sync CapabilityInfoManager"); + CapabilityInfoManager::GetInstance()->SyncDeviceInfoFromDB(deviceId); auto ret = LocalCapabilityInfoManager::GetInstance()->SyncDeviceInfoFromDB(deviceId); if (ret != DH_FWK_SUCCESS) { DHLOGE("SyncLocalCapabilityInfoFromDB failed, deviceId = %{public}s, errCode = %{public}d", -- Gitee