diff --git a/frameworks/test/moduletest/mock/include/mock_bundle_manager.h b/frameworks/test/moduletest/mock/include/mock_bundle_manager.h index 564eef74cc0f1d581b0f9a4c66e6a44f72403e1f..681256d7fd354881c41fcfec9d3a6f3660c6c7dd 100644 --- a/frameworks/test/moduletest/mock/include/mock_bundle_manager.h +++ b/frameworks/test/moduletest/mock/include/mock_bundle_manager.h @@ -433,9 +433,10 @@ public: * @brief Checks whether a specified application is enabled. * * @param bundleName Indicates the bundle name of the application. + * @param isEnable Indicates the application status is enabled. * @return Returns true if the application is enabled; returns false otherwise. */ - virtual bool IsApplicationEnabled(const std::string &bundleName) override + virtual bool IsApplicationEnabled(const std::string &bundleName, bool &isEnable) override { return true; } @@ -444,9 +445,10 @@ public: * @brief Sets whether to enable a specified ability. * * @param abilityInfo Indicates information about the ability to check. + * @param isEnable Indicates the ability status is enabled. * @return Returns true if the ability is enabled; returns false otherwise. */ - virtual bool IsAbilityEnabled(const AbilityInfo &abilityInfo) override + virtual bool IsAbilityEnabled(const AbilityInfo &abilityInfo, bool &isEnable) override { return true; } diff --git a/frameworks/test/moduletest/mock/mock_bundle_mgr_proxy.cpp b/frameworks/test/moduletest/mock/mock_bundle_mgr_proxy.cpp index 6c15c081d414daa00843e0712d68cf94a8e13f6c..65c19a6f86d481cbbdb65ef0d05b427b7a2aa607 100644 --- a/frameworks/test/moduletest/mock/mock_bundle_mgr_proxy.cpp +++ b/frameworks/test/moduletest/mock/mock_bundle_mgr_proxy.cpp @@ -189,12 +189,12 @@ bool BundleMgrProxy::DumpInfos(const DumpFlag flag, const std::string &bundleNam return true; } -bool BundleMgrProxy::IsApplicationEnabled(const std::string &bundleName) +bool BundleMgrProxy::IsApplicationEnabled(const std::string &bundleName, bool &isEnable) { return true; } -bool BundleMgrProxy::IsAbilityEnabled(const AbilityInfo &abilityInfo) +bool BundleMgrProxy::IsAbilityEnabled(const AbilityInfo &abilityInfo, bool &isEnable) { 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 56f641cba8e33850b0c090f19f71e03f4c47f436..83cecfd471de26fd5aec60304ea5cfc265574168 100644 --- a/services/test/moduletest/mock/include/mock_bundle_manager.h +++ b/services/test/moduletest/mock/include/mock_bundle_manager.h @@ -333,11 +333,12 @@ public: * @brief Checks whether a specified application is enabled. * * @param bundleName Indicates the bundle name of the application. - * @return Returns true if the application is enabled; returns false otherwise. + * @param isEnable Indicates the application status is enabled. + * @return Returns result of the operation. */ - virtual bool IsApplicationEnabled(const std::string &bundleName) override + virtual ErrCode IsApplicationEnabled(const std::string &bundleName, bool& isEnable) override { - return true; + return ERR_OK; } /** * @brief Obtains the interface used to install and uninstall bundles. diff --git a/services/test/moduletest/mock/mock_bundle_mgr_proxy.cpp b/services/test/moduletest/mock/mock_bundle_mgr_proxy.cpp index d38187389baf578f7cfb7e6de2151a7728048e59..f64b680a09fccfdeb607ec612150ba9b86d55334 100644 --- a/services/test/moduletest/mock/mock_bundle_mgr_proxy.cpp +++ b/services/test/moduletest/mock/mock_bundle_mgr_proxy.cpp @@ -181,15 +181,15 @@ bool BundleMgrProxy::DumpInfos( return true; } -bool BundleMgrProxy::IsApplicationEnabled(const std::string &bundleName) +ErrCode BundleMgrProxy::IsApplicationEnabled(const std::string &bundleName, bool &isEnable) { - return true; + return ERR_OK; } -bool BundleMgrProxy::IsAbilityEnabled(const AbilityInfo &abilityInfo) +ErrCode BundleMgrProxy::IsAbilityEnabled(const AbilityInfo &abilityInfo, bool &isEnable) { - return true; + return ERR_OK; } template