From ff03391f35321aa940b4a93e210dfcc441850716 Mon Sep 17 00:00:00 2001 From: zhaoyuan17 Date: Wed, 8 Dec 2021 10:43:02 +0000 Subject: [PATCH 1/3] Application clone compilation error modification Signed-off-by: zhaoyuan17 --- .../ans/test/moduletest/mock/include/mock_bundle_manager.h | 2 +- frameworks/ans/test/moduletest/mock/mock_bundle_mgr_proxy.cpp | 3 ++- services/test/moduletest/mock/include/mock_bundle_manager.h | 2 +- services/test/moduletest/mock/mock_bundle_mgr_proxy.cpp | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/frameworks/ans/test/moduletest/mock/include/mock_bundle_manager.h b/frameworks/ans/test/moduletest/mock/include/mock_bundle_manager.h index fd4ac0f63..cc102a735 100644 --- a/frameworks/ans/test/moduletest/mock/include/mock_bundle_manager.h +++ b/frameworks/ans/test/moduletest/mock/include/mock_bundle_manager.h @@ -425,7 +425,7 @@ public: * @param bundleName Indicates the bundle name of the application whose data is to be cleared. * @return Returns true if the data cleared successfully; returns false otherwise. */ - virtual bool CleanBundleDataFiles(const std::string &bundleName) override + virtual bool CleanBundleDataFiles(const std::string &bundleName, const int userId) override { return true; } diff --git a/frameworks/ans/test/moduletest/mock/mock_bundle_mgr_proxy.cpp b/frameworks/ans/test/moduletest/mock/mock_bundle_mgr_proxy.cpp index cd58a4838..eef4bd30b 100644 --- a/frameworks/ans/test/moduletest/mock/mock_bundle_mgr_proxy.cpp +++ b/frameworks/ans/test/moduletest/mock/mock_bundle_mgr_proxy.cpp @@ -47,6 +47,7 @@ bool BundleMgrProxy::GetApplicationInfos( bool BundleMgrProxy::GetBundleInfo(const std::string &bundleName, const BundleFlag flag, BundleInfo &bundleInfo) { + bundleInfo.uid = 1; return true; } @@ -183,7 +184,7 @@ bool BundleMgrProxy::CleanBundleCacheFiles( return true; } -bool BundleMgrProxy::CleanBundleDataFiles(const std::string &bundleName) +bool BundleMgrProxy::CleanBundleDataFiles(const std::string &bundleName, const int userId) { return true; } diff --git a/services/test/moduletest/mock/include/mock_bundle_manager.h b/services/test/moduletest/mock/include/mock_bundle_manager.h index 960b2aa7b..6a550d69c 100644 --- a/services/test/moduletest/mock/include/mock_bundle_manager.h +++ b/services/test/moduletest/mock/include/mock_bundle_manager.h @@ -331,7 +331,7 @@ public: * @param bundleName Indicates the bundle name of the application whose data is to be cleared. * @return Returns true if the data cleared successfully; returns false otherwise. */ - virtual bool CleanBundleDataFiles(const std::string &bundleName) override + virtual bool CleanBundleDataFiles(const std::string &bundleName, const int userId) override { return true; } diff --git a/services/test/moduletest/mock/mock_bundle_mgr_proxy.cpp b/services/test/moduletest/mock/mock_bundle_mgr_proxy.cpp index 5738fc881..efccb1f48 100644 --- a/services/test/moduletest/mock/mock_bundle_mgr_proxy.cpp +++ b/services/test/moduletest/mock/mock_bundle_mgr_proxy.cpp @@ -180,7 +180,7 @@ bool BundleMgrProxy::CleanBundleCacheFiles( return true; } -bool BundleMgrProxy::CleanBundleDataFiles(const std::string &bundleName) +bool BundleMgrProxy::CleanBundleDataFiles(const std::string &bundleName, const int userId) { return true; } -- Gitee From b5dbb21e5c8bcff8645b774c1f1b8a96855c1842 Mon Sep 17 00:00:00 2001 From: zhaoyuan17 Date: Wed, 8 Dec 2021 14:21:14 +0000 Subject: [PATCH 2/3] Fix code Signed-off-by: zhaoyuan17 --- services/test/moduletest/mock/mock_bundle_mgr_proxy.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/services/test/moduletest/mock/mock_bundle_mgr_proxy.cpp b/services/test/moduletest/mock/mock_bundle_mgr_proxy.cpp index efccb1f48..232efcf27 100644 --- a/services/test/moduletest/mock/mock_bundle_mgr_proxy.cpp +++ b/services/test/moduletest/mock/mock_bundle_mgr_proxy.cpp @@ -274,6 +274,5 @@ bool BundleMgrProxy::SendTransactCmd(IBundleMgr::Message code, MessageParcel &da { return true; } - } // namespace AppExecFwk } // namespace OHOS -- Gitee From 48d2dececbadfaf09dfd2c84685c66936e06858c Mon Sep 17 00:00:00 2001 From: zhaoyuan17 Date: Wed, 8 Dec 2021 15:31:03 +0000 Subject: [PATCH 3/3] Fix codex Signed-off-by: zhaoyuan17 --- frameworks/ans/test/moduletest/mock/mock_bundle_mgr_proxy.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/frameworks/ans/test/moduletest/mock/mock_bundle_mgr_proxy.cpp b/frameworks/ans/test/moduletest/mock/mock_bundle_mgr_proxy.cpp index eef4bd30b..5f1674281 100644 --- a/frameworks/ans/test/moduletest/mock/mock_bundle_mgr_proxy.cpp +++ b/frameworks/ans/test/moduletest/mock/mock_bundle_mgr_proxy.cpp @@ -24,7 +24,6 @@ namespace OHOS { namespace AppExecFwk { - BundleMgrProxy::BundleMgrProxy(const sptr &impl) : IRemoteProxy(impl) { } @@ -278,6 +277,5 @@ bool BundleMgrProxy::SendTransactCmd(IBundleMgr::Message code, MessageParcel &da { return true; } - } // namespace AppExecFwk } // namespace OHOS -- Gitee