diff --git a/services/distributedhardwarefwkservice/src/componentloader/component_loader.cpp b/services/distributedhardwarefwkservice/src/componentloader/component_loader.cpp index 8566f51b38e2bb50cb85d346d4c4cab534e4186e..5e9584e1ea4ff3b9b6af77d5031117612349a00c 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 768146006f06b583000eb881fab5dc82fab31f0f..420f48e95fa8a9554a82f02c56bed7d48faf7d9f 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 f47c5944b4e1e1420e6629f037412c5ae5ac0f35..492542574eb380aebd2cc4f1785b7d1ccc8cde93 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",