From 3e464a25e300a1d857ca281e6ec94c41e8a2d98e Mon Sep 17 00:00:00 2001 From: zt147369 Date: Fri, 27 Oct 2023 06:49:55 +0000 Subject: [PATCH] =?UTF-8?q?resource=5Fmanager=5Fimpl=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E9=80=82=E9=85=8Dmock?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zt147369 --- .../unittest/mock/include/mock_resource_manager_impl.h | 10 ++++++++++ .../ans/test/unittest/mock/mock_resource_manager.cpp | 2 ++ 2 files changed, 12 insertions(+) diff --git a/frameworks/ans/test/unittest/mock/include/mock_resource_manager_impl.h b/frameworks/ans/test/unittest/mock/include/mock_resource_manager_impl.h index add8c7226..f738f3b1e 100644 --- a/frameworks/ans/test/unittest/mock/include/mock_resource_manager_impl.h +++ b/frameworks/ans/test/unittest/mock/include/mock_resource_manager_impl.h @@ -521,6 +521,16 @@ public: */ virtual RState GetResId(const std::string &resTypeName, uint32_t &resId); + /** + * Get locale list + * + * @param outValue the locales write to, the locale string is divided into three parts: language, + * script (optional), and region (optional), concatenated by the connector (-). + * @param includeSystem the parameter controls whether to include system resources, + * the default value is false, it has no effect when only system resources query the locales list. + */ + virtual void GetLocales(std::vector &outValue, bool includeSystem = false); + private: std::map resources_; }; diff --git a/frameworks/ans/test/unittest/mock/mock_resource_manager.cpp b/frameworks/ans/test/unittest/mock/mock_resource_manager.cpp index fc7ed534c..a99940176 100644 --- a/frameworks/ans/test/unittest/mock/mock_resource_manager.cpp +++ b/frameworks/ans/test/unittest/mock/mock_resource_manager.cpp @@ -334,6 +334,8 @@ RState ResourceManagerImpl::GetResId(const std::string &resTypeName, uint32_t &r { return SUCCESS; } + +void ResourceManagerImpl::GetLocales(std::vector &outValue, bool includeSystem) {} } // namespace Resource } // namespace Global } // namespace OHOS \ No newline at end of file -- Gitee