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 add8c722644e6dd170c9e7b98dd3abb823c41d54..f738f3b1e7fe706767e39050eafe8a476bd644e0 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 fc7ed534cb971324ddbc3bcb845d7ba053d74e2e..a99940176f8a3c45a1b673706b8658b0cff21b05 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