diff --git a/common/include/interfaces/distributed_device_profile_enums.h b/common/include/interfaces/distributed_device_profile_enums.h index 5709732b85e8357a1edf46ad52d93f5dfd15d2bd..75d2e15183f5730585ee81b5ccddde862e074153 100644 --- a/common/include/interfaces/distributed_device_profile_enums.h +++ b/common/include/interfaces/distributed_device_profile_enums.h @@ -86,7 +86,8 @@ enum class DPInterfaceCode : uint32_t { GET_LOCAL_SERVICE_INFO_BY_BINDLE_AND_PINTYPE = 68, DELETE_LOCAL_SERVICE_INFO = 69, GET_ALL_ACL_INCLUDE_LNN_ACL = 70, - MAX = 71 + ON_ACCESS_CONTROL_PROFILE_DELETE = 71, + MAX = 72 }; enum class DeviceIdType : uint32_t { @@ -174,7 +175,8 @@ enum ProfileChangeType { CHAR_PROFILE_DELETE = 12, TRUST_DEVICE_PROFILE_ACTIVE = 13, TRUST_DEVICE_PROFILE_INACTIVE = 14, - PROFILE_CHANGE_TYPE_MAX = 15 + ACCESS_CONTROL_PROFILE_DELETE = 15, + PROFILE_CHANGE_TYPE_MAX = 16 }; enum StaticCapabilityFlag { CAPABILITY_FLAG_MIN = -1, diff --git a/common/include/interfaces/i_profile_change_listener.h b/common/include/interfaces/i_profile_change_listener.h index a6db922b9ab68f068036b22d4044600f99ff4b50..244ad2ad61e758946e4b6cd0f87a9ef22e19cc60 100644 --- a/common/include/interfaces/i_profile_change_listener.h +++ b/common/include/interfaces/i_profile_change_listener.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -16,6 +16,7 @@ #ifndef OHOS_DP_ISUBSCRIBE_PROFILE_LISTENER_H #define OHOS_DP_ISUBSCRIBE_PROFILE_LISTENER_H +#include "access_control_profile.h" #include "trust_device_profile.h" #include "device_profile.h" #include "service_profile.h" @@ -35,6 +36,7 @@ public: const TrustDeviceProfile& newProfile) = 0; virtual int32_t OnTrustDeviceProfileActive(const TrustDeviceProfile& profile); virtual int32_t OnTrustDeviceProfileInactive(const TrustDeviceProfile& profile); + virtual int32_t OnAccessControlProfileDelete(const AccessControlProfile& profile); virtual int32_t OnDeviceProfileAdd(const DeviceProfile& profile) = 0; virtual int32_t OnDeviceProfileDelete(const DeviceProfile& profile) = 0; virtual int32_t OnDeviceProfileUpdate(const DeviceProfile& oldProfile, const DeviceProfile& newProfile) = 0; diff --git a/common/include/interfaces/profile_change_listener_proxy.h b/common/include/interfaces/profile_change_listener_proxy.h index 0acfed489a0908d7bdf264ccd5bc04f67a438356..0f2f1c90a37f04094863f3305bb6d47e92820673 100644 --- a/common/include/interfaces/profile_change_listener_proxy.h +++ b/common/include/interfaces/profile_change_listener_proxy.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -34,6 +34,7 @@ public: const TrustDeviceProfile& newProfile) override; int32_t OnTrustDeviceProfileActive(const TrustDeviceProfile& profile) override; int32_t OnTrustDeviceProfileInactive(const TrustDeviceProfile& profile) override; + int32_t OnAccessControlProfileDelete(const AccessControlProfile& profile) override; int32_t OnDeviceProfileAdd(const DeviceProfile& profile) override; int32_t OnDeviceProfileDelete(const DeviceProfile& profile) override; int32_t OnDeviceProfileUpdate(const DeviceProfile& oldProfile, const DeviceProfile& newProfile) override; diff --git a/common/include/interfaces/profile_change_listener_stub.h b/common/include/interfaces/profile_change_listener_stub.h index 669a41fdd947bdcc9d1924bc3eb0120af50e9639..9aa089a667380c19bf3a3a5aa4d1ea667f23bdac 100644 --- a/common/include/interfaces/profile_change_listener_stub.h +++ b/common/include/interfaces/profile_change_listener_stub.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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,6 +37,7 @@ public: int32_t OnTrustDeviceProfileUpdateInner(MessageParcel& data, MessageParcel& reply); int32_t OnTrustDeviceProfileActiveInner(MessageParcel& data, MessageParcel& reply); int32_t OnTrustDeviceProfileInactiveInner(MessageParcel& data, MessageParcel& reply); + int32_t OnAccessControlProfileDeleteInner(MessageParcel& data, MessageParcel& reply); int32_t OnDeviceProfileAddInner(MessageParcel& data, MessageParcel& reply); int32_t OnDeviceProfileDeleteInner(MessageParcel& data, MessageParcel& reply); int32_t OnDeviceProfileUpdateInner(MessageParcel& data, MessageParcel& reply); @@ -48,6 +49,7 @@ public: int32_t OnCharacteristicProfileUpdateInner(MessageParcel& data, MessageParcel& reply); int32_t OnTrustDeviceProfileActive(const TrustDeviceProfile& profile) override; int32_t OnTrustDeviceProfileInactive(const TrustDeviceProfile& profile) override; + int32_t OnAccessControlProfileDelete(const AccessControlProfile& profile) override; private: using Func = int32_t(ProfileChangeListenerStub::*)(MessageParcel& data, MessageParcel& reply); diff --git a/common/src/interfaces/i_profile_change_listener.cpp b/common/src/interfaces/i_profile_change_listener.cpp index b754cac6e0f1fd755aaf26d855f4f43b00405033..f215fa089dd250be528db226da1e369f569d16ca 100644 --- a/common/src/interfaces/i_profile_change_listener.cpp +++ b/common/src/interfaces/i_profile_change_listener.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -33,5 +33,11 @@ int32_t IProfileChangeListener::OnTrustDeviceProfileInactive(const TrustDevicePr (void)profile; return DP_SUCCESS; } + +int32_t IProfileChangeListener::OnAccessControlProfileDelete(const AccessControlProfile& profile) +{ + (void)profile; + return 0; +} } // namespace DistributedDeviceProfile } // namespace OHOS \ No newline at end of file diff --git a/common/src/interfaces/profile_change_listener_proxy.cpp b/common/src/interfaces/profile_change_listener_proxy.cpp index 740957ae2ead233f83dc7ee13e890a46c30cc3cb..a6143a90455edf76cc24c7009caa1decf0a91774 100644 --- a/common/src/interfaces/profile_change_listener_proxy.cpp +++ b/common/src/interfaces/profile_change_listener_proxy.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -104,6 +104,21 @@ int32_t ProfileListenerProxy::OnTrustDeviceProfileInactive(const TrustDeviceProf return DP_SUCCESS; } +int32_t ProfileListenerProxy::OnAccessControlProfileDelete(const AccessControlProfile& profile) +{ + sptr remote = nullptr; + GET_REMOTE_OBJECT(remote); + MessageParcel data; + WRITE_CHANGE_LISTENER_TOKEN(data); + if (!profile.Marshalling(data)) { + HILOGE("write reply failed!"); + return ERR_FLATTEN_OBJECT; + } + MessageParcel reply; + SEND_REQUEST(remote, static_cast(DPInterfaceCode::ON_ACCESS_CONTROL_PROFILE_DELETE), data, reply); + return DP_SUCCESS; +} + int32_t ProfileListenerProxy::OnDeviceProfileAdd(const DeviceProfile& profile) { sptr remote = nullptr; diff --git a/common/src/interfaces/profile_change_listener_stub.cpp b/common/src/interfaces/profile_change_listener_stub.cpp index 16bd8d30fcef2f24aa29b29ca06e11ce1cce1513..b68971378fdcd0b32f9014a4d3f887fa8db8a29e 100644 --- a/common/src/interfaces/profile_change_listener_stub.cpp +++ b/common/src/interfaces/profile_change_listener_stub.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -42,6 +42,8 @@ ProfileChangeListenerStub::ProfileChangeListenerStub() &ProfileChangeListenerStub::OnTrustDeviceProfileActiveInner; funcsMap_[static_cast(DPInterfaceCode::ON_TRUST_DEVICE_PROFILE_INACTIVE)] = &ProfileChangeListenerStub::OnTrustDeviceProfileInactiveInner; + funcsMap_[static_cast(DPInterfaceCode::ON_ACCESS_CONTROL_PROFILE_DELETE)] = + &ProfileChangeListenerStub::OnAccessControlProfileDeleteInner; funcsMap_[static_cast(DPInterfaceCode::ON_DEVICE_PROFILE_ADD)] = &ProfileChangeListenerStub::OnDeviceProfileAddInner; funcsMap_[static_cast(DPInterfaceCode::ON_DEVICE_PROFILE_DELETE)] = @@ -92,6 +94,8 @@ int32_t ProfileChangeListenerStub::OnRemoteRequest(uint32_t code, MessageParcel& return ProfileChangeListenerStub::OnTrustDeviceProfileActiveInner(data, reply); case static_cast(DPInterfaceCode::ON_TRUST_DEVICE_PROFILE_INACTIVE): return ProfileChangeListenerStub::OnTrustDeviceProfileInactiveInner(data, reply); + case static_cast(DPInterfaceCode::ON_ACCESS_CONTROL_PROFILE_DELETE): + return ProfileChangeListenerStub::OnAccessControlProfileDeleteInner(data, reply); case static_cast(DPInterfaceCode::ON_DEVICE_PROFILE_ADD): return ProfileChangeListenerStub::OnDeviceProfileAddInner(data, reply); case static_cast(DPInterfaceCode::ON_DEVICE_PROFILE_DELETE): @@ -201,6 +205,22 @@ int32_t ProfileChangeListenerStub::OnTrustDeviceProfileInactiveInner(MessageParc return DP_SUCCESS; } +int32_t ProfileChangeListenerStub::OnAccessControlProfileDeleteInner(MessageParcel &data, MessageParcel &reply) +{ + HILOGI("called"); + AccessControlProfile aclProfile; + if (!aclProfile.UnMarshalling(data)) { + HILOGE("Read reply failed"); + return ERR_FLATTEN_OBJECT; + } + OnAccessControlProfileDelete(aclProfile); + if (!reply.WriteInt32(DP_SUCCESS)) { + HILOGE("Read reply failed"); + return ERR_FLATTEN_OBJECT; + } + return DP_SUCCESS; +} + int32_t ProfileChangeListenerStub::OnDeviceProfileAddInner(MessageParcel& data, MessageParcel& reply) { HILOGI("called"); @@ -371,5 +391,11 @@ int32_t ProfileChangeListenerStub::OnTrustDeviceProfileInactive(const TrustDevic (void)profile; return DP_SUCCESS; } + +int32_t ProfileChangeListenerStub::OnAccessControlProfileDelete(const AccessControlProfile& profile) +{ + (void)profile; + return 0; +} } // namespace DistributedDeviceProfile } // namespace OHOS diff --git a/common/test/profilechangelistenerstubunittest/profile_change_listener_stub_test.cpp b/common/test/profilechangelistenerstubunittest/profile_change_listener_stub_test.cpp index 65fdea5cc13d3a76682dfe033a5a948f483d44a0..a4d3d348981ab66ce2e57fd233a84a9adfa0cbdb 100644 --- a/common/test/profilechangelistenerstubunittest/profile_change_listener_stub_test.cpp +++ b/common/test/profilechangelistenerstubunittest/profile_change_listener_stub_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -73,6 +73,12 @@ int32_t MockProfileChangeListenerStub::OnTrustDeviceProfileActive(const TrustDev return 0; } +int32_t MockProfileChangeListenerStub::OnAccessControlProfileDelete(const AccessControlProfile& profile) +{ + (void)profile; + return 0; +} + int32_t MockProfileChangeListenerStub::OnDeviceProfileAdd(const DeviceProfile& profile) { (void)profile; @@ -185,6 +191,15 @@ HWTEST_F(ProfileChangeListenerStubTest, OnTrustDeviceProfileUpdateInner_001, Tes EXPECT_EQ(ERR_FLATTEN_OBJECT, ret); } +HWTEST_F(ProfileChangeListenerStubTest, OnAccessControlProfileDeleteInner_001, TestSize.Level0) +{ + MessageParcel data; + MessageParcel reply; + ASSERT_NE(listenerStub_, nullptr); + int32_t ret = listenerStub_->OnAccessControlProfileDeleteInner(data, reply); + EXPECT_EQ(ERR_FLATTEN_OBJECT, ret); +} + HWTEST_F(ProfileChangeListenerStubTest, OnDeviceProfileAddInner_001, TestSize.Level0) { MessageParcel data; diff --git a/common/test/profilechangelistenerstubunittest/profile_change_listener_stub_test.h b/common/test/profilechangelistenerstubunittest/profile_change_listener_stub_test.h index 5d710c78f9dbbed2ff9ba04790b54f0dc740b0f3..5e89d5d8b737e6fc9ed027de75da2e80dc582fe1 100644 --- a/common/test/profilechangelistenerstubunittest/profile_change_listener_stub_test.h +++ b/common/test/profilechangelistenerstubunittest/profile_change_listener_stub_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 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 @@ -43,6 +43,7 @@ public: const TrustDeviceProfile& newProfile) override; int32_t OnTrustDeviceProfileInactive(const TrustDeviceProfile& profile) override; int32_t OnTrustDeviceProfileActive(const TrustDeviceProfile& profile) override; + int32_t OnAccessControlProfileDelete(const AccessControlProfile& profile) override; int32_t OnDeviceProfileAdd(const DeviceProfile& profile) override; int32_t OnDeviceProfileDelete(const DeviceProfile& profile) override; int32_t OnDeviceProfileUpdate(const DeviceProfile& oldProfile, const DeviceProfile& newProfile) override; diff --git a/services/core/include/subscribeprofilemanager/subscribe_profile_manager.h b/services/core/include/subscribeprofilemanager/subscribe_profile_manager.h index 9fe776331dfbde5653b89c7aa91e839bcaf5ec3a..dc957de56c720a55dd4230b9365164935f3918e0 100644 --- a/services/core/include/subscribeprofilemanager/subscribe_profile_manager.h +++ b/services/core/include/subscribeprofilemanager/subscribe_profile_manager.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -41,6 +41,7 @@ public: int32_t NotifyTrustDeviceProfileDelete(const TrustDeviceProfile& trustDeviceProfile); int32_t NotifyTrustDeviceProfileActive(const TrustDeviceProfile& trustDeviceProfile); int32_t NotifyTrustDeviceProfileInactive(const TrustDeviceProfile& trustDeviceProfile); + int32_t NotifyAccessControlProfileDelete(const AccessControlProfile& aclProfile); int32_t SubscribeDeviceProfile(const SubscribeInfo& subscribeInfo); int32_t SubscribeDeviceProfile(std::map subscribeInfos); int32_t UnSubscribeDeviceProfile(const SubscribeInfo& subscribeInfo); diff --git a/services/core/src/subscribeprofilemanager/subscribe_profile_manager.cpp b/services/core/src/subscribeprofilemanager/subscribe_profile_manager.cpp index 06cebceb1520c2029b1969af382304e3e10060a8..15c008aea1be26d9a9af84c3ec1d8083a5723e23 100644 --- a/services/core/src/subscribeprofilemanager/subscribe_profile_manager.cpp +++ b/services/core/src/subscribeprofilemanager/subscribe_profile_manager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -199,6 +199,26 @@ int32_t SubscribeProfileManager::NotifyTrustDeviceProfileInactive(const TrustDev return DP_SUCCESS; } +int32_t SubscribeProfileManager::NotifyAccessControlProfileDelete(const AccessControlProfile& aclProfile) +{ + auto subscriberInfos = GetSubscribeInfos(SUBSCRIBE_TRUST_DEVICE_PROFILE); + if (subscriberInfos.empty()) { + return DP_SUCCESS; + } + HILOGI("%{public}s!", aclProfile.dump().c_str()); + for (const auto& subscriberInfo : subscriberInfos) { + sptr listenerProxy = iface_cast(subscriberInfo.GetListener()); + if (listenerProxy == nullptr) { + HILOGE("Cast to IProfileChangeListener failed!"); + continue; + } + if (subscriberInfo.GetProfileChangeTypes().count(ProfileChangeType::ACCESS_CONTROL_PROFILE_DELETE) != 0) { + listenerProxy->OnAccessControlProfileDelete(aclProfile); + } + } + return DP_SUCCESS; +} + int32_t SubscribeProfileManager::SubscribeDeviceProfile(const SubscribeInfo& subscribeInfo) { HILOGI("saId: %{public}d!, subscribeKey: %{public}s", subscribeInfo.GetSaId(), diff --git a/services/core/src/trustprofilemanager/trust_profile_manager.cpp b/services/core/src/trustprofilemanager/trust_profile_manager.cpp index 93b5dee38245c772212ee5e0ca99b493b3f1d2e7..bda3bf1181a099a7202fc10b46c27d80dd2caa67 100644 --- a/services/core/src/trustprofilemanager/trust_profile_manager.cpp +++ b/services/core/src/trustprofilemanager/trust_profile_manager.cpp @@ -518,6 +518,11 @@ void TrustProfileManager::GetAclByAcerTokenId(const QueryProfile& queryProfile, aclProfile.GetTrustDeviceId() != queryProfile.GetAccesserDeviceId()) { continue; } + if (aclProfile.GetBindType() == static_cast(BindType::SHARE) && + CheckForWardByAcer(queryProfile, aclProfile)) { + profile.emplace_back(aclProfile); + continue; + } if (CheckForWardByAcer(queryProfile, aclProfile) || CheckReverseByAcer(queryProfile, aclProfile)) { profile.emplace_back(aclProfile); } @@ -533,6 +538,11 @@ void TrustProfileManager::GetAclByAcerAndAceeTokenId(const QueryProfile& queryPr aclProfile.GetTrustDeviceId() != queryProfile.GetAccesserDeviceId()) { continue; } + if (aclProfile.GetBindType() == static_cast(BindType::SHARE) && + CheckForWardByAcerAndAcee(queryProfile, aclProfile)) { + profile.emplace_back(aclProfile); + continue; + } if (CheckForWardByAcerAndAcee(queryProfile, aclProfile) || CheckReverseByAcerAndAcee(queryProfile, aclProfile)) { profile.emplace_back(aclProfile); @@ -1561,25 +1571,31 @@ int32_t TrustProfileManager::DeleteAccessControlProfileCheck(AccessControlProfil HILOGE("DeleteAccesserCheck failed"); return ret; } - { - std::lock_guard lock(rdbMutex_); - if (rdbStore_ == nullptr) { - HILOGE("rdbStore_ is nullptr"); - return DP_GET_RDBSTORE_FAIL; - } - int32_t deleteRows = DELETEROWS_INIT; - ret = rdbStore_->Delete(deleteRows, ACCESS_CONTROL_TABLE, ACCESSCONTROLID_EQUAL_CONDITION, - std::vector{ ValueObject(profile.GetAccessControlId()) }); - if (ret != DP_SUCCESS) { - HILOGE("delete access_control_table failed"); - return DP_DELETE_ACCESS_CONTROL_PROFILE_FAIL; - } + std::lock_guard lock(rdbMutex_); + if (rdbStore_ == nullptr) { + HILOGE("rdbStore_ is nullptr"); + return DP_GET_RDBSTORE_FAIL; + } + int32_t deleteRows = DELETEROWS_INIT; + ret = rdbStore_->Delete(deleteRows, ACCESS_CONTROL_TABLE, ACCESSCONTROLID_EQUAL_CONDITION, + std::vector{ ValueObject(profile.GetAccessControlId()) }); + if (ret != DP_SUCCESS) { + HILOGE("delete access_control_table failed"); + return DP_DELETE_ACCESS_CONTROL_PROFILE_FAIL; } HILOGI("DeleteAclProfile : %{public}s", profile.dump().c_str()); AccessControlProfile resultProfile(profile); resultProfile.SetAccesser(accesser); resultProfile.SetAccessee(accessee); profile = resultProfile; + if (IsLnnAcl(profile)) { + HILOGE("this acl is Lnn acl"); + return DP_SUCCESS; + } + if (SubscribeProfileManager::GetInstance().NotifyAccessControlProfileDelete(profile) != DP_SUCCESS) { + HILOGE("NotifyAccessControlProfileDelete failed"); + return DP_NOTIFY_TRUST_DEVICE_FAIL; + } return DP_SUCCESS; } diff --git a/services/core/test/unittest/distributed_device_profile_client_kv_test.cpp b/services/core/test/unittest/distributed_device_profile_client_kv_test.cpp index 8330252c94ad6c4c29a00e1485e858f27a05a29d..01bdc7b01725363f480f9d6e4bd03933ce5723bc 100644 --- a/services/core/test/unittest/distributed_device_profile_client_kv_test.cpp +++ b/services/core/test/unittest/distributed_device_profile_client_kv_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -81,6 +81,18 @@ public: { return 0; } + int32_t OnTrustDeviceProfileActive(const TrustDeviceProfile &profile) + { + return 0; + } + int32_t OnTrustDeviceProfileInactive(const TrustDeviceProfile &profile) + { + return 0; + } + int32_t OnAccessControlProfileDelete(const AccessControlProfile &profile) + { + return 0; + } int32_t OnDeviceProfileAdd(const DeviceProfile &profile) { return 0; diff --git a/services/core/test/unittest/distributed_device_profile_client_rdb_test.cpp b/services/core/test/unittest/distributed_device_profile_client_rdb_test.cpp index 8fe8e11bb551d9cd9691f6dffa7410acc6f168a4..7d912e4269e3cfe04cc1c68b132e113bfb4b71ef 100644 --- a/services/core/test/unittest/distributed_device_profile_client_rdb_test.cpp +++ b/services/core/test/unittest/distributed_device_profile_client_rdb_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 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 @@ -71,6 +71,18 @@ public: cout << "OnTrustDeviceProfileUpdate: newProfile " << newProfile.dump() <