From 4b030d137fec5ed01ca0102dc134e56b93aa10ef Mon Sep 17 00:00:00 2001 From: wangtiantian Date: Thu, 14 Apr 2022 19:25:11 +0800 Subject: [PATCH] IssueNo: #I52SKP:delete mock bms interface Description:delete mock bms interface Sig:SIG_ApplicaitonFramework Feature or Bugfix:BugFix Binary Source:No Signed-off-by: wangtiantian --- .../mock/include/mock_bundle_manager.h | 20 ------------------- .../moduletest/mock/mock_bundle_mgr_proxy.cpp | 10 ---------- .../mock/include/mock_bundle_manager.h | 10 ---------- .../moduletest/mock/mock_bundle_mgr_proxy.cpp | 10 ---------- 4 files changed, 50 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 3f04edd54..ef8c340aa 100644 --- a/frameworks/ans/test/moduletest/mock/include/mock_bundle_manager.h +++ b/frameworks/ans/test/moduletest/mock/include/mock_bundle_manager.h @@ -205,16 +205,6 @@ public: { return true; }; - /** - * @brief Obtains the label of a specified ability. - * @param bundleName Indicates the bundle name. - * @param className Indicates the ability class name. - * @return Returns the label of the ability if exist; returns empty string otherwise. - */ - virtual std::string GetAbilityLabel(const std::string &bundleName, const std::string &className) override - { - return ""; - } /** * @brief Obtains information about an application bundle contained in a ohos Ability Package (HAP). * @param hapFilePath Indicates the absolute file path of the HAP. @@ -479,16 +469,6 @@ public: { return true; } - /** - * @brief Obtains the icon of a specified ability. - * @param bundleName Indicates the bundle name. - * @param className Indicates the ability class name. - * @return Returns the icon resource string of the ability if exist; returns empty string otherwise. - */ - virtual std::string GetAbilityIcon(const std::string &bundleName, const std::string &className) override - { - return "abilityicon"; - } /** * @brief Obtains the interface used to install and uninstall bundles. * @return Returns a pointer to IBundleInstaller class if exist; returns nullptr otherwise. 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 3e5817f3e..33f47e020 100644 --- a/frameworks/ans/test/moduletest/mock/mock_bundle_mgr_proxy.cpp +++ b/frameworks/ans/test/moduletest/mock/mock_bundle_mgr_proxy.cpp @@ -124,11 +124,6 @@ bool BundleMgrProxy::QueryKeepAliveBundleInfos(std::vector &bundleIn return true; } -std::string BundleMgrProxy::GetAbilityLabel(const std::string &bundleName, const std::string &className) -{ - return "reply.ReadString()"; -} - bool BundleMgrProxy::GetBundleArchiveInfo(const std::string &hapFilePath, const BundleFlag flag, BundleInfo &bundleInfo) { return true; @@ -220,11 +215,6 @@ bool BundleMgrProxy::IsAbilityEnabled(const AbilityInfo &abilityInfo) return true; } -std::string BundleMgrProxy::GetAbilityIcon(const std::string &bundleName, const std::string &className) -{ - return "AbilityIcon"; -} - bool BundleMgrProxy::CanRequestPermission( const std::string &bundleName, const std::string &permissionName, const int userId) { diff --git a/services/test/moduletest/mock/include/mock_bundle_manager.h b/services/test/moduletest/mock/include/mock_bundle_manager.h index feedce914..fce122935 100644 --- a/services/test/moduletest/mock/include/mock_bundle_manager.h +++ b/services/test/moduletest/mock/include/mock_bundle_manager.h @@ -175,16 +175,6 @@ public: { return true; }; - /** - * @brief Obtains the label of a specified ability. - * @param bundleName Indicates the bundle name. - * @param className Indicates the ability class name. - * @return Returns the label of the ability if exist; returns empty string otherwise. - */ - virtual std::string GetAbilityLabel(const std::string &bundleName, const std::string &className) override - { - return ""; - } /** * @brief Obtains information about an application bundle contained in a ohos Ability Package (HAP). * @param hapFilePath Indicates the absolute file path of the HAP. diff --git a/services/test/moduletest/mock/mock_bundle_mgr_proxy.cpp b/services/test/moduletest/mock/mock_bundle_mgr_proxy.cpp index f40336c90..fb865c55d 100644 --- a/services/test/moduletest/mock/mock_bundle_mgr_proxy.cpp +++ b/services/test/moduletest/mock/mock_bundle_mgr_proxy.cpp @@ -115,11 +115,6 @@ bool BundleMgrProxy::QueryKeepAliveBundleInfos(std::vector &bundleIn return true; } -std::string BundleMgrProxy::GetAbilityLabel(const std::string &bundleName, const std::string &className) -{ - return "reply.ReadString()"; -} - bool BundleMgrProxy::GetBundleArchiveInfo(const std::string &hapFilePath, const BundleFlag flag, BundleInfo &bundleInfo) { return true; @@ -213,11 +208,6 @@ bool BundleMgrProxy::IsAbilityEnabled(const AbilityInfo &abilityInfo) return true; } -std::string BundleMgrProxy::GetAbilityIcon(const std::string &bundleName, const std::string &className) -{ - return "AbilityIcon"; -} - bool BundleMgrProxy::CanRequestPermission( const std::string &bundleName, const std::string &permissionName, const int userId) { -- Gitee