Home
last modified time | relevance | path

Searched refs:resConfig (Results 1 - 25 of 53) sorted by relevance

123

/foundation/ability/ability_runtime/frameworks/native/ability/native/
H A Dresource_config_helper.cpp78 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in UpdateResConfig()
79 if (resConfig == nullptr) { in UpdateResConfig()
80 TAG_LOGE(AAFwkTag::ABILITY, "create resConfig failed"); in UpdateResConfig()
83 resourceManager->GetResConfig(*resConfig); in UpdateResConfig()
91 resConfig->SetLocaleInfo(locale); in UpdateResConfig()
93 resConfig->SetPreferredLocaleInfo(locale); in UpdateResConfig()
95 const icu::Locale *localeInfo = resConfig->GetLocaleInfo(); in UpdateResConfig()
102 UpdateResConfig(resConfig); in UpdateResConfig()
104 Global::Resource::RState ret = resourceManager->UpdateResConfig(*resConfig); in UpdateResConfig()
106 TAG_LOGE(AAFwkTag::ABILITY, "update resConfig faile in UpdateResConfig()
113 UpdateResConfig(std::unique_ptr<Global::Resource::ResConfig> &resConfig) UpdateResConfig() argument
[all...]
H A Dui_ability.cpp868 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in OnDisplayInfoChange()
869 if (resConfig != nullptr) { in OnDisplayInfoChange()
872 resourceManager->GetResConfig(*resConfig); in OnDisplayInfoChange()
873 resConfig->SetScreenDensity(density); in OnDisplayInfoChange()
874 resConfig->SetDirection(AppExecFwk::ConvertDirection(height, width)); in OnDisplayInfoChange()
875 resourceManager->UpdateResConfig(*resConfig); in OnDisplayInfoChange()
877 resConfig->GetScreenDensity(), resConfig->GetDirection()); in OnDisplayInfoChange()
911 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in OnChange()
912 if (resConfig ! in OnChange()
[all...]
H A Dconfiguration_utils.cpp197 TAG_LOGD(AAFwkTag::ABILITY, "update resConfig, density: %{public}f, direction: %{public}s", in UpdateDisplayResConfig()
199 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in UpdateDisplayResConfig()
200 if (resConfig == nullptr) { in UpdateDisplayResConfig()
201 TAG_LOGE(AAFwkTag::ABILITY, "create resConfig failed"); in UpdateDisplayResConfig()
205 resourceManager->GetResConfig(*resConfig); in UpdateDisplayResConfig()
206 resConfig->SetScreenDensity(density); in UpdateDisplayResConfig()
207 resConfig->SetDirection(ConvertDirection(direction)); in UpdateDisplayResConfig()
208 resourceManager->UpdateResConfig(*resConfig); in UpdateDisplayResConfig()
209 TAG_LOGD(AAFwkTag::ABILITY, "update resConfig finished, density: %{public}f, direction: %{public}d", in UpdateDisplayResConfig()
210 resConfig in UpdateDisplayResConfig()
[all...]
H A Dability.cpp489 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in OnConfigurationUpdatedNotify()
490 if (resConfig == nullptr) { in OnConfigurationUpdatedNotify()
491 TAG_LOGE(AAFwkTag::ABILITY, "null resConfig"); in OnConfigurationUpdatedNotify()
496 resourceManager->GetResConfig(*resConfig); in OnConfigurationUpdatedNotify()
503 resConfig->SetLocaleInfo(locale); in OnConfigurationUpdatedNotify()
508 resConfig->SetColorMode(ConvertColorMode(colormode)); in OnConfigurationUpdatedNotify()
511 resConfig->SetInputDevice(ConvertHasPointerDevice(hasPointerDevice)); in OnConfigurationUpdatedNotify()
513 resourceManager->UpdateResConfig(*resConfig); in OnConfigurationUpdatedNotify()
516 resConfig->GetColorMode(), resConfig in OnConfigurationUpdatedNotify()
[all...]
/foundation/bundlemanager/bundle_framework/services/bundlemgr/src/bundle_resource/
H A Dbundle_resource_configuration.cpp40 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in InitResourceGlobalConfig()
41 if (resConfig == nullptr) { in InitResourceGlobalConfig()
42 APP_LOGE("resConfig is nullptr"); in InitResourceGlobalConfig()
49 resConfig->SetLocaleInfo(locale.GetLanguage().c_str(), locale.GetScript().c_str(), locale.GetRegion().c_str()); in InitResourceGlobalConfig()
51 resConfig->SetScreenDensityDpi(Global::Resource::ScreenDensity::SCREEN_DENSITY_XXXLDPI); in InitResourceGlobalConfig()
53 Global::Resource::RState ret = resourceManager->UpdateResConfig(*resConfig); in InitResourceGlobalConfig()
75 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in InitResourceGlobalConfig()
76 if (resConfig == nullptr) { in InitResourceGlobalConfig()
77 APP_LOGE("resConfig is nullptr"); in InitResourceGlobalConfig()
84 resConfig in InitResourceGlobalConfig()
[all...]
H A Dbundle_resource_callback.cpp187 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in SetThemeIdForThemeChanged()
188 if (resConfig == nullptr) { in SetThemeIdForThemeChanged()
189 APP_LOGE("resConfig is nullptr, themeId %{public}d", themeId); in SetThemeIdForThemeChanged()
192 resConfig->SetThemeId(themeId); in SetThemeIdForThemeChanged()
193 Global::Resource::RState ret = resourcePtr->UpdateResConfig(*resConfig); // no need to process ret in SetThemeIdForThemeChanged()
H A Dbundle_resource_parser.cpp77 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in GetBadgeResource()
78 if (resConfig == nullptr) { in GetBadgeResource()
79 APP_LOGE("resConfig is nullptr"); in GetBadgeResource()
82 resMgr->UpdateResConfig(*resConfig); in GetBadgeResource()
146 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in ParseResourceInfos()
147 if (resConfig == nullptr) { in ParseResourceInfos()
148 APP_LOGE("resConfig is nullptr"); in ParseResourceInfos()
154 resourceInfos[index].hapPath_, resourceInfos[index].overlayHapPaths_, *resConfig, 0, userId)); in ParseResourceInfos()
206 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in ParseResourceInfoWithSameHap()
207 if (resConfig in ParseResourceInfoWithSameHap()
[all...]
/foundation/arkui/ace_engine/frameworks/base/resource/
H A Dace_res_config.cpp36 std::string ComputeScript(const AceResConfig& resConfig) in ComputeScript() argument
38 return Localization::ComputeScript(resConfig.language_, resConfig.region_); in ComputeScript()
60 bool IsPseudoLocale(const AceResConfig& resConfig) in IsPseudoLocale() argument
62 return (resConfig.language_ == "en" && resConfig.region_ == "XA") || in IsPseudoLocale()
63 (resConfig.language_ == "ar" && resConfig.region_ == "XB"); in IsPseudoLocale()
863 AceResConfig resConfig = ConvertDeclarativeResTagToConfig(folder); in MatchAndSortDeclarativeResConfigs() local
864 if (folder == ConvertDeclarativeResConfigToTag(resConfig)) { in MatchAndSortDeclarativeResConfigs()
974 AceResConfig resConfig; ConvertResTagToConfig() local
985 AceResConfig resConfig; ConvertDeclarativeResTagToConfig() local
1029 ConvertResConfigToTag(const AceResConfig& resConfig, bool styleRes) ConvertResConfigToTag() argument
1062 ConvertDeclarativeResConfigToTag(const AceResConfig& resConfig) ConvertDeclarativeResConfigToTag() argument
[all...]
/foundation/ability/ability_runtime/test/unittest/configuration_test/
H A Dconfiguration_test.cpp59 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in InitResourceManager()
60 if (resConfig == nullptr) { in InitResourceManager()
70 resConfig->SetLocaleInfo(locale); in InitResourceManager()
72 Global::Resource::RState updateRet = resourceManager->UpdateResConfig(*resConfig); in InitResourceManager()
505 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in HWTEST_F()
506 ASSERT_NE(resConfig, nullptr); in HWTEST_F()
514 resConfig->SetLocaleInfo(locale); in HWTEST_F()
516 resConfig->SetColorMode(ConvertColorMode("light")); in HWTEST_F()
517 resConfig->SetInputDevice(ConvertHasPointerDevice("true")); in HWTEST_F()
518 Global::Resource::RState updateRet = resourceManager->UpdateResConfig(*resConfig); in HWTEST_F()
[all...]
/foundation/arkui/ace_engine/adapter/preview/entrance/
H A Dace_application_info.cpp44 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in ChangeLocale()
45 resourceManager_->GetResConfig(*resConfig); in ChangeLocale()
47 auto localeInfo = resConfig->GetLocaleInfo(); in ChangeLocale()
54 resConfig->SetLocaleInfo(languageLower.c_str(), script.c_str(), countryOrRegionUpper.c_str()); in ChangeLocale()
55 resourceManager_->UpdateResConfig(*resConfig); in ChangeLocale()
H A Dace_container.cpp536 auto resConfig = resourceInfo_.GetResourceConfiguration(); in UpdateResourceConfiguration() local
537 if (!resConfig.UpdateFromJsonString(jsonStr, updateFlags) || !updateFlags) { in UpdateResourceConfiguration()
540 resourceInfo_.SetResourceConfiguration(resConfig); in UpdateResourceConfiguration()
542 SystemProperties::SetColorMode(resConfig.GetColorMode()); in UpdateResourceConfiguration()
544 frontend_->SetColorMode(resConfig.GetColorMode()); in UpdateResourceConfiguration()
554 themeManager->UpdateConfig(resConfig); in UpdateResourceConfiguration()
556 ResourceManager::GetInstance().UpdateResourceConfig(resConfig); in UpdateResourceConfiguration()
559 [weakThemeManager = WeakPtr<ThemeManager>(themeManager), colorScheme = colorScheme_, config = resConfig, in UpdateResourceConfiguration()
736 auto resConfig = container->resourceInfo_.GetResourceConfiguration(); in SetResourcesPathAndThemeStyle() local
737 resConfig in SetResourcesPathAndThemeStyle()
754 auto resConfig = resourceInfo_.GetResourceConfiguration(); UpdateDeviceConfig() local
[all...]
/foundation/arkui/ace_engine/adapter/ohos/entrance/
H A Dace_application_info.cpp48 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in ChangeLocale()
49 resourceManager_->GetResConfig(*resConfig); in ChangeLocale()
51 auto localeInfo = resConfig->GetLocaleInfo(); in ChangeLocale()
54 resConfig->SetLocaleInfo(languageLower.c_str(), script.c_str(), countryOrRegionUpper.c_str()); in ChangeLocale()
55 resourceManager_->UpdateResConfig(*resConfig); in ChangeLocale()
/foundation/ability/ability_runtime/frameworks/native/appkit/app/
H A Dcontext_container.cpp292 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in InitResourceManager()
307 bundleInfo.name, moduleName, hapPath, overlayPaths, *resConfig, appType)); in InitResourceManager()
317 bundleInfo.name, moduleName, hapPath, overlayPaths, *resConfig, appType)); in InitResourceManager()
322 LoadResources(bundleInfo, resourceManager, resConfig, deal); in InitResourceManager()
327 std::unique_ptr<Global::Resource::ResConfig> &resConfig, std::shared_ptr<ContextDeal> &deal) in LoadResources()
331 if (resConfig == nullptr) { in LoadResources()
332 TAG_LOGE(AAFwkTag::APPKIT, "resConfig is nullptr"); in LoadResources()
353 resConfig->SetLocaleInfo("zh", "Hans", "CN"); in LoadResources()
355 if (resConfig->GetLocaleInfo() != nullptr) { in LoadResources()
358 resConfig in LoadResources()
325 LoadResources(BundleInfo &bundleInfo, std::shared_ptr<Global::Resource::ResourceManager> &resourceManager, std::unique_ptr<Global::Resource::ResConfig> &resConfig, std::shared_ptr<ContextDeal> &deal) LoadResources() argument
[all...]
/foundation/arkui/ace_engine/adapter/ohos/osal/
H A Dresource_adapter_impl.cpp138 auto resConfig = ConvertConfigToGlobal(resourceInfo.GetResourceConfiguration()); in Init() local
143 if (resConfig != nullptr) { in Init()
144 auto configRet = newResMgr->UpdateResConfig(*resConfig); in Init()
147 resRet, configRet, resConfig->GetDirection(), resConfig->GetScreenDensity(), resConfig->GetDeviceType(), in Init()
148 resConfig->GetColorMode(), resConfig->GetInputDevice()); in Init()
156 resConfig_ = resConfig; in Init()
161 auto resConfig in UpdateConfig() local
[all...]
H A Dresource_adapter_impl_v2.cpp116 auto resConfig = aceContainer->GetResourceConfiguration(); in CreateNewResourceAdapter() local
120 resConfig.SetColorMode(localColorMode); in CreateNewResourceAdapter()
122 newResourceAdapter->UpdateConfig(resConfig); in CreateNewResourceAdapter()
140 auto resConfig = ConvertConfigToGlobal(resourceInfo.GetResourceConfiguration()); in ResourceAdapterImplV2() local
142 if (resConfig != nullptr) { in ResourceAdapterImplV2()
143 sysResourceManager_->UpdateResConfig(*resConfig); in ResourceAdapterImplV2()
145 resConfig_ = resConfig; in ResourceAdapterImplV2()
153 auto resConfig = ConvertConfigToGlobal(resourceInfo.GetResourceConfiguration()); in Init() local
157 if (resConfig != nullptr) { in Init()
158 newResMgr->UpdateResConfig(*resConfig); in Init()
195 auto resConfig = ConvertConfigToGlobal(config); UpdateConfig() local
844 auto resConfig = aceContainer->GetResourceConfiguration(); UpdateColorMode() local
[all...]
/foundation/arkui/ace_engine/adapter/preview/osal/
H A Dresource_adapter_impl_standard.cpp137 auto resConfig = ConvertConfigToGlobal(resourceInfo.GetResourceConfiguration()); in Init() local
150 if (resConfig != nullptr) { in Init()
151 auto configRet = newResMgr->UpdateResConfig(*resConfig); in Init()
154 appResRet, sysResRet, configRet, resConfig->GetDirection(), resConfig->GetScreenDensity(), in Init()
155 resConfig->GetDeviceType()); in Init()
175 auto resConfig = ConvertConfigToGlobal(config); in UpdateConfig() local
176 LOGI("UpdateConfig ori=%{public}d, dpi=%{public}f, device=%{public}d", resConfig->GetDirection(), in UpdateConfig()
177 resConfig->GetScreenDensity(), resConfig in UpdateConfig()
[all...]
/foundation/ability/ability_runtime/test/unittest/js_service_extension_test/
H A Djs_service_extension_test.cpp105 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in CreateJsServiceExtension()
111 resConfig->SetLocaleInfo(locale); in CreateJsServiceExtension()
113 Global::Resource::RState updateRet = resourceManager->UpdateResConfig(*resConfig); in CreateJsServiceExtension()
211 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in HWTEST_F()
212 resourceManager->GetResConfig(*resConfig); in HWTEST_F()
213 EXPECT_EQ(originDensity, resConfig->GetScreenDensity()); in HWTEST_F()
214 EXPECT_EQ(ConvertDirection(originDirection), resConfig->GetDirection()); in HWTEST_F()
306 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in HWTEST_F()
307 resourceManager->GetResConfig(*resConfig); in HWTEST_F()
308 EXPECT_EQ(originDensity, resConfig in HWTEST_F()
[all...]
/foundation/bundlemanager/bundle_framework/interfaces/kits/js/bundle_resource/
H A Dbundle_resource_drawable_utils.cpp33 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in InitResourceManager()
34 if (resConfig == nullptr) { in InitResourceManager()
39 "bundleName", "moduleName", "", std::vector<std::string>(), *resConfig)); in InitResourceManager()
/foundation/communication/netmanager_ext/test/vpnmanager/unittest/sys_vpn_manager_test/
H A Dnetworkvpn_client_test.cpp183 sptr<SysVpnConfig> resConfig = nullptr; in HWTEST_F() local
184 EXPECT_EQ(networkVpnClient_.GetSysVpnConfig(resConfig, id), NETMANAGER_EXT_ERR_OPERATION_FAILED); in HWTEST_F()
191 sptr<SysVpnConfig> resConfig = nullptr; in HWTEST_F() local
192 EXPECT_EQ(networkVpnClient_.GetSysVpnConfig(resConfig, id), NETMANAGER_EXT_ERR_PARAMETER_ERROR); in HWTEST_F()
198 sptr<SysVpnConfig> resConfig = nullptr; in HWTEST_F() local
199 EXPECT_EQ(networkVpnClient_.GetConnectedSysVpnConfig(resConfig), NETMANAGER_EXT_SUCCESS); in HWTEST_F()
H A Dl2tp_vpn_ctl_test.cpp81 sptr<SysVpnConfig> resConfig = nullptr; in HWTEST_F() local
82 int32_t ret = l2tpControl_->GetConnectedSysVpnConfig(resConfig); in HWTEST_F()
85 ret = l2tpControl_->GetConnectedSysVpnConfig(resConfig); in HWTEST_F()
89 ret = l2tpControl_->GetConnectedSysVpnConfig(resConfig); in HWTEST_F()
H A Dipsec_vpn_ctl_test.cpp84 sptr<SysVpnConfig> resConfig = nullptr; in HWTEST_F() local
85 int32_t ret = ipsecControl_->GetConnectedSysVpnConfig(resConfig); in HWTEST_F()
88 ret = ipsecControl_->GetConnectedSysVpnConfig(resConfig); in HWTEST_F()
92 ret = ipsecControl_->GetConnectedSysVpnConfig(resConfig); in HWTEST_F()
H A Dopen_vpn_ctl_test.cpp85 sptr<SysVpnConfig> resConfig = nullptr; in HWTEST_F() local
86 EXPECT_EQ(openvpnControl_->GetConnectedSysVpnConfig(resConfig), NETMANAGER_EXT_SUCCESS); in HWTEST_F()
89 EXPECT_EQ(openvpnControl_->GetConnectedSysVpnConfig(resConfig), NETMANAGER_EXT_SUCCESS); in HWTEST_F()
90 ASSERT_NE(resConfig, nullptr); in HWTEST_F()
/foundation/ability/ability_runtime/frameworks/native/appkit/ability_runtime/context/
H A Dcontext_impl.cpp831 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in InitOthersResourceManagerInner()
843 bundleInfo.name, moduleName, hapPath, overlayPaths, *resConfig, appType)); in InitOthersResourceManagerInner()
988 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in UpdateResConfig()
989 if (resConfig == nullptr) { in UpdateResConfig()
1004 currentResMgr->GetResConfig(*resConfig); in UpdateResConfig()
1011 resConfig->SetLocaleInfo(locale); in UpdateResConfig()
1012 if (resConfig->GetLocaleInfo() != nullptr) { in UpdateResConfig()
1015 resConfig->GetLocaleInfo()->getLanguage(), resConfig->GetLocaleInfo()->getScript(), in UpdateResConfig()
1016 resConfig in UpdateResConfig()
[all...]
/foundation/ability/ability_runtime/test/unittest/js_auto_fill_extension_test/
H A Djs_auto_fill_extension_test.cpp103 std::unique_ptr<Global::Resource::ResConfig> resConfig(Global::Resource::CreateResConfig()); in CreateJsAutoFillExtension()
109 resConfig->SetLocaleInfo(locale); in CreateJsAutoFillExtension()
111 Global::Resource::RState updateRet = resourceManager->UpdateResConfig(*resConfig); in CreateJsAutoFillExtension()
/foundation/ability/ability_runtime/test/mock/frameworks_kits_ability_native_test/include/
H A Dmock_resourceManager_interface1.h35 virtual RState UpdateResConfig(ResConfig& resConfig) = 0;
37 virtual void GetResConfig(ResConfig& resConfig) = 0;

Completed in 20 milliseconds

123