diff --git a/common/log/include/distributed_hardware_log.h b/common/log/include/distributed_hardware_log.h index 9b02114ca7ed22687dbebc2241ff1f1b3b56d7f4..0a2bdfda67952e6ee30d5b8871d5aca936be75e1 100644 --- a/common/log/include/distributed_hardware_log.h +++ b/common/log/include/distributed_hardware_log.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 diff --git a/common/utils/include/constants.h b/common/utils/include/constants.h index 3aa1d18e12e704998b14488ec47da01e3795b8c9..a6aefea5389c4b6586c348a51e42e71deb9a1067 100644 --- a/common/utils/include/constants.h +++ b/common/utils/include/constants.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 @@ -37,7 +37,7 @@ namespace DistributedHardware { const std::string DH_ATTRS = "dh_attrs"; const std::string DH_LOG_TITLE_TAG = "DHFWK"; const std::string DH_TASK_NAME_PREFIX = "Task_"; - const std::string DH_FWK_PKG_NAME = "DBinderBus_" + std::to_string(getpid()); + const std::string DH_FWK_PKG_NAME = "ohos.dhardware"; const std::string DH_COMPONENT_VERSIONS = "componentVersions"; const std::string DH_COMPONENT_TYPE = "dhType"; const std::string DH_COMPONENT_SINK_VER = "version"; diff --git a/common/utils/include/single_instance.h b/common/utils/include/single_instance.h index 11a86f69b1a53a408f1052ea3001cc28a9f35697..5cf872555b7555fc07f6c645da55a92553ecea24 100644 --- a/common/utils/include/single_instance.h +++ b/common/utils/include/single_instance.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 diff --git a/sa_profile/4801.xml b/sa_profile/4801.xml index 87bbf2341ee3bd30ae81a2a3e6106569d4e5c48e..1c5961fa37ee97d01aa959cb1ed8b57acb3223d1 100644 --- a/sa_profile/4801.xml +++ b/sa_profile/4801.xml @@ -15,11 +15,11 @@ --> dhardware - + 4801 libdistributedhardwarefwksvr.z.so 4802 - 60000 + 60000 true true 1 diff --git a/services/distributedhardwarefwkservice/src/accessmanager/access_manager.cpp b/services/distributedhardwarefwkservice/src/accessmanager/access_manager.cpp index 190ea5b13f92ad89f9b65ec3ad9f99777d43a498..26a2e01209f1fd62b7cff7a926bb1a72563dae93 100644 --- a/services/distributedhardwarefwkservice/src/accessmanager/access_manager.cpp +++ b/services/distributedhardwarefwkservice/src/accessmanager/access_manager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 @@ -140,11 +140,13 @@ void AccessManager::OnDeviceOffline(const DmDeviceInfo &deviceInfo) void AccessManager::OnDeviceReady(const DmDeviceInfo &deviceInfo) { + (void)deviceInfo; return; } void AccessManager::OnDeviceChanged(const DmDeviceInfo &deviceInfo) { + (void)deviceInfo; return; } diff --git a/services/distributedhardwarefwkservice/src/distributed_hardware_service.cpp b/services/distributedhardwarefwkservice/src/distributed_hardware_service.cpp index 3c2351f7d184c3dfaaeed26ba787e443da8e1a60..cc28e1f8b0de5dc4558fb1a71d051c200fd17736 100644 --- a/services/distributedhardwarefwkservice/src/distributed_hardware_service.cpp +++ b/services/distributedhardwarefwkservice/src/distributed_hardware_service.cpp @@ -79,6 +79,7 @@ void DistributedHardwareService::OnStop() int32_t DistributedHardwareService::QuerySinkVersion(std::unordered_map &versionMap) { + (void)versionMap; return 0; } } diff --git a/services/distributedhardwarefwkservice/test/unittest/common/accessmanager/access_manager_test.cpp b/services/distributedhardwarefwkservice/test/unittest/common/accessmanager/access_manager_test.cpp index d8a15e4e09185f9e29b69996c9c6a5135b167087..c84f0a71e0320da0cf6bf0ab9230037fcbc4bd99 100644 --- a/services/distributedhardwarefwkservice/test/unittest/common/accessmanager/access_manager_test.cpp +++ b/services/distributedhardwarefwkservice/test/unittest/common/accessmanager/access_manager_test.cpp @@ -71,44 +71,6 @@ void AccessManagerTest::SetUpTestCase() {} void AccessManagerTest::TearDownTestCase() {} -/** - * @tc.name: Init_001 - * @tc.desc: Verify the sub function. - * @tc.type: FUNC - * @tc.require: AR000GHSJK - */ -HWTEST_F(AccessManagerTest, Init_001, TestSize.Level1) -{ - auto ret = AccessManager::GetInstance()->Init(); - EXPECT_EQ(DH_FWK_SUCCESS, ret); -} - -/** - * @tc.name: Uninit_001 - * @tc.desc: Verify the sub function. - * @tc.type: FUNC - * @tc.require: AR000GHSJK - */ -HWTEST_F(AccessManagerTest, UnInit_001, TestSize.Level1) -{ - auto ret = AccessManager::GetInstance()->UnInit(); - EXPECT_EQ(ERR_DH_FWK_ACCESS_UNINIT_DM_FAILED, ret); -} - -/** - * @tc.name: Uninit_001 - * @tc.desc: Verify the sub function. - * @tc.type: FUNC - * @tc.require: AR000GHSJK - */ -HWTEST_F(AccessManagerTest, UnInit_002, TestSize.Level1) -{ - auto ret = AccessManager::GetInstance()->Init(); - EXPECT_EQ(DH_FWK_SUCCESS, ret); - ret = AccessManager::GetInstance()->UnInit(); - EXPECT_EQ(DH_FWK_SUCCESS, ret); -} - /** * @tc.name: SendOnLineEvent_001 * @tc.desc: Verify the online success diff --git a/services/distributedhardwarefwkserviceimpl/src/componentloader/component_loader.cpp b/services/distributedhardwarefwkserviceimpl/src/componentloader/component_loader.cpp index 17881f2f303fe0f109b2945727fc71cc9eb89e1f..9d262bbb828b090002650d88e58e5bd3ea9e0253 100644 --- a/services/distributedhardwarefwkserviceimpl/src/componentloader/component_loader.cpp +++ b/services/distributedhardwarefwkserviceimpl/src/componentloader/component_loader.cpp @@ -127,7 +127,7 @@ int32_t ComponentLoader::GetLocalDHVersion(DHVersion &dhVersion) void *ComponentLoader::GetHandler(const std::string &soName) { if (soName.length() <= 0) { - DHLOGE("%s soName length is 0"); + DHLOGE("%s soName length is 0", soName.c_str()); return nullptr; } char path[PATH_MAX + 1] = {0x00}; diff --git a/utils/BUILD.gn b/utils/BUILD.gn index 4e68020d19270a60d4d46cb2a35f519fb6f33d74..27018ede10c82e79af10b933e093391fd97536a6 100644 --- a/utils/BUILD.gn +++ b/utils/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. +# Copyright (c) 2021-2022 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