From c37b7a7065f9736845139aa7ae9b2638c59e3ca5 Mon Sep 17 00:00:00 2001 From: LY Date: Tue, 23 Dec 2025 16:29:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=80=80=E5=A4=9A=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: LY --- services/appmgr/BUILD.gn | 2 +- services/appmgr/src/multi_user_config_mgr.cpp | 4 ++-- test/fuzztest/multiuserconfigmgr_fuzzer/BUILD.gn | 3 +-- test/unittest/ams_ability_running_record_test/BUILD.gn | 2 +- test/unittest/ams_service_load_ability_process_test/BUILD.gn | 3 +-- test/unittest/ams_service_startup_test/BUILD.gn | 3 +-- test/unittest/app_mgr_service_event_handler_test/BUILD.gn | 3 +-- test/unittest/app_mgr_service_inner_eighth_test/BUILD.gn | 2 +- test/unittest/app_mgr_service_inner_ninth_test/BUILD.gn | 2 +- test/unittest/app_mgr_service_inner_seventh_test/BUILD.gn | 2 +- test/unittest/app_mgr_service_inner_tenth_test/BUILD.gn | 2 +- test/unittest/cache_process_manager_second_test/BUILD.gn | 2 +- test/unittest/multi_user_config_mgr_test/BUILD.gn | 3 +-- 13 files changed, 14 insertions(+), 19 deletions(-) diff --git a/services/appmgr/BUILD.gn b/services/appmgr/BUILD.gn index 97d1d9b045..542d175d7b 100644 --- a/services/appmgr/BUILD.gn +++ b/services/appmgr/BUILD.gn @@ -135,6 +135,7 @@ ohos_shared_library("libappms") { "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", + "i18n:i18n_sa_client", "init:libbeget_proxy", "init:libbegetutil", "ipc:ipc_core", @@ -174,7 +175,6 @@ ohos_shared_library("libappms") { deps += [] external_deps += [ "i18n:intl_util", - "preferences:native_preferences", "window_manager:libdm", "window_manager:libwm", "window_manager:libwsutils", diff --git a/services/appmgr/src/multi_user_config_mgr.cpp b/services/appmgr/src/multi_user_config_mgr.cpp index 6353ca3c45..d13258a515 100644 --- a/services/appmgr/src/multi_user_config_mgr.cpp +++ b/services/appmgr/src/multi_user_config_mgr.cpp @@ -16,7 +16,7 @@ #include "multi_user_config_mgr.h" #include "hilog_tag_wrapper.h" #include "hitrace_meter.h" -#include "multi_users.h" +#include "i18n_service_ability_client.h" #include "os_account_manager.h" namespace OHOS { @@ -78,7 +78,7 @@ void MultiUserConfigurationMgr::SetOrUpdateConfigByUserId( return; } Configuration userConfig = *globalConfiguration_; - std::string language = OHOS::Global::I18n::MultiUsers::GetLanguageFromUserId(userId); + std::string language = OHOS::Global::I18n::I18nServiceAbilityClient::GetLanguageFromUserId(userId); if (!language.empty()) { userConfig.AddItem(AAFwk::GlobalConfigurationKey::SYSTEM_LANGUAGE, language); } diff --git a/test/fuzztest/multiuserconfigmgr_fuzzer/BUILD.gn b/test/fuzztest/multiuserconfigmgr_fuzzer/BUILD.gn index 9c741234ec..dc0c18eeb1 100644 --- a/test/fuzztest/multiuserconfigmgr_fuzzer/BUILD.gn +++ b/test/fuzztest/multiuserconfigmgr_fuzzer/BUILD.gn @@ -44,10 +44,9 @@ ohos_fuzztest("MultiUserConfigMgrFuzzTest") { "c_utils:utils", "hilog:libhilog", "hitrace:hitrace_meter", - "i18n:intl_util", + "i18n:i18n_sa_client", "os_account:libaccountkits", "os_account:os_account_innerkits", - "preferences:native_preferences", ] } diff --git a/test/unittest/ams_ability_running_record_test/BUILD.gn b/test/unittest/ams_ability_running_record_test/BUILD.gn index 9cc39f1a99..82303ff9dd 100644 --- a/test/unittest/ams_ability_running_record_test/BUILD.gn +++ b/test/unittest/ams_ability_running_record_test/BUILD.gn @@ -81,6 +81,7 @@ ohos_unittest("AmsAbilityRunningRecordTest") { "hisysevent:libhisysevent", "hitrace:hitrace_meter", "i18n:intl_util", + "i18n:i18n_sa_client", "init:libbeget_proxy", "init:libbegetutil", "ipc:ipc_core", @@ -88,7 +89,6 @@ ohos_unittest("AmsAbilityRunningRecordTest") { "memmgr:memmgrclient", "memory_utils:libmeminfo", "os_account:os_account_innerkits", - "preferences:native_preferences", "resource_schedule_service:ressched_client", "samgr:samgr_proxy", "json:nlohmann_json_static", diff --git a/test/unittest/ams_service_load_ability_process_test/BUILD.gn b/test/unittest/ams_service_load_ability_process_test/BUILD.gn index be23f2d1be..94b3af53f0 100644 --- a/test/unittest/ams_service_load_ability_process_test/BUILD.gn +++ b/test/unittest/ams_service_load_ability_process_test/BUILD.gn @@ -94,7 +94,7 @@ ohos_unittest("AmsServiceLoadAbilityProcessTest") { "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", - "i18n:intl_util", + "i18n:i18n_sa_client", "init:libbeget_proxy", "init:libbegetutil", "ipc:ipc_core", @@ -103,7 +103,6 @@ ohos_unittest("AmsServiceLoadAbilityProcessTest") { "memmgr:memmgrclient", "memory_utils:libmeminfo", "os_account:os_account_innerkits", - "preferences:native_preferences", "resource_schedule_service:ressched_client", "safwk:system_ability_fwk", "samgr:samgr_proxy", diff --git a/test/unittest/ams_service_startup_test/BUILD.gn b/test/unittest/ams_service_startup_test/BUILD.gn index 702d513c71..e341158cc5 100644 --- a/test/unittest/ams_service_startup_test/BUILD.gn +++ b/test/unittest/ams_service_startup_test/BUILD.gn @@ -83,7 +83,7 @@ ohos_unittest("AmsServiceStartupTest") { "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", - "i18n:intl_util", + "i18n:i18n_sa_client", "init:libbeget_proxy", "init:libbegetutil", "ipc:ipc_core", @@ -91,7 +91,6 @@ ohos_unittest("AmsServiceStartupTest") { "memmgr:memmgrclient", "memory_utils:libmeminfo", "os_account:os_account_innerkits", - "preferences:native_preferences", "resource_schedule_service:ressched_client", "safwk:api_cache_manager", "safwk:system_ability_fwk", diff --git a/test/unittest/app_mgr_service_event_handler_test/BUILD.gn b/test/unittest/app_mgr_service_event_handler_test/BUILD.gn index 4dc7e7947a..3da6471c2b 100644 --- a/test/unittest/app_mgr_service_event_handler_test/BUILD.gn +++ b/test/unittest/app_mgr_service_event_handler_test/BUILD.gn @@ -90,7 +90,7 @@ ohos_unittest("AMSEventHandlerTest") { "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", - "i18n:intl_util", + "i18n:i18n_sa_client", "init:libbeget_proxy", "init:libbegetutil", "ipc:ipc_core", @@ -99,7 +99,6 @@ ohos_unittest("AMSEventHandlerTest") { "memmgr:memmgrclient", "memory_utils:libmeminfo", "os_account:os_account_innerkits", - "preferences:native_preferences", "resource_schedule_service:ressched_client", "safwk:system_ability_fwk", "samgr:samgr_proxy", diff --git a/test/unittest/app_mgr_service_inner_eighth_test/BUILD.gn b/test/unittest/app_mgr_service_inner_eighth_test/BUILD.gn index c078168432..03ba8ff7c0 100644 --- a/test/unittest/app_mgr_service_inner_eighth_test/BUILD.gn +++ b/test/unittest/app_mgr_service_inner_eighth_test/BUILD.gn @@ -124,6 +124,7 @@ ohos_unittest("app_mgr_service_inner_eighth_test") { "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", + "i18n:i18n_sa_client", "image_framework:image_native", "init:libbeget_proxy", "init:libbegetutil", @@ -149,7 +150,6 @@ ohos_unittest("app_mgr_service_inner_eighth_test") { defines += [ "SUPPORT_GRAPHICS" ] external_deps += [ "i18n:intl_util", - "preferences:native_preferences", "window_manager:libdm", "window_manager:libwm", "window_manager:libwsutils", diff --git a/test/unittest/app_mgr_service_inner_ninth_test/BUILD.gn b/test/unittest/app_mgr_service_inner_ninth_test/BUILD.gn index 7816a6ecd6..f8a0705205 100644 --- a/test/unittest/app_mgr_service_inner_ninth_test/BUILD.gn +++ b/test/unittest/app_mgr_service_inner_ninth_test/BUILD.gn @@ -124,6 +124,7 @@ ohos_unittest("app_mgr_service_inner_ninth_test") { "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", + "i18n:i18n_sa_client", "image_framework:image_native", "init:libbeget_proxy", "init:libbegetutil", @@ -150,7 +151,6 @@ ohos_unittest("app_mgr_service_inner_ninth_test") { defines += [ "SUPPORT_GRAPHICS" ] external_deps += [ "i18n:intl_util", - "preferences:native_preferences", "window_manager:libwm", "window_manager:libwsutils", ] diff --git a/test/unittest/app_mgr_service_inner_seventh_test/BUILD.gn b/test/unittest/app_mgr_service_inner_seventh_test/BUILD.gn index 93da277179..d52cef2d3e 100644 --- a/test/unittest/app_mgr_service_inner_seventh_test/BUILD.gn +++ b/test/unittest/app_mgr_service_inner_seventh_test/BUILD.gn @@ -123,6 +123,7 @@ ohos_unittest("app_mgr_service_inner_seventh_test") { "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", + "i18n:i18n_sa_client", "image_framework:image_native", "init:libbeget_proxy", "init:libbegetutil", @@ -147,7 +148,6 @@ ohos_unittest("app_mgr_service_inner_seventh_test") { defines += [ "SUPPORT_GRAPHICS" ] external_deps += [ "i18n:intl_util", - "preferences:native_preferences", "window_manager:libdm", "window_manager:libwm", "window_manager:libwsutils", diff --git a/test/unittest/app_mgr_service_inner_tenth_test/BUILD.gn b/test/unittest/app_mgr_service_inner_tenth_test/BUILD.gn index a0c9e497e7..b6845c797e 100644 --- a/test/unittest/app_mgr_service_inner_tenth_test/BUILD.gn +++ b/test/unittest/app_mgr_service_inner_tenth_test/BUILD.gn @@ -128,6 +128,7 @@ ohos_unittest("app_mgr_service_inner_tenth_test") { "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", + "i18n:i18n_sa_client", "image_framework:image_native", "init:libbeget_proxy", "init:libbegetutil", @@ -154,7 +155,6 @@ ohos_unittest("app_mgr_service_inner_tenth_test") { defines += [ "SUPPORT_GRAPHICS" ] external_deps += [ "i18n:intl_util", - "preferences:native_preferences", "window_manager:libwm", "window_manager:libwsutils", ] diff --git a/test/unittest/cache_process_manager_second_test/BUILD.gn b/test/unittest/cache_process_manager_second_test/BUILD.gn index 5f3a768b96..e4186cbcc6 100644 --- a/test/unittest/cache_process_manager_second_test/BUILD.gn +++ b/test/unittest/cache_process_manager_second_test/BUILD.gn @@ -179,8 +179,8 @@ ohos_unittest("cache_process_manager_second_test") { deps += [] external_deps += [ + "i18n:i18n_sa_client", "i18n:intl_util", - "preferences:native_preferences", "window_manager:libdm", "window_manager:libwm", "window_manager:libwsutils", diff --git a/test/unittest/multi_user_config_mgr_test/BUILD.gn b/test/unittest/multi_user_config_mgr_test/BUILD.gn index 8ba44c53d8..11234200c2 100644 --- a/test/unittest/multi_user_config_mgr_test/BUILD.gn +++ b/test/unittest/multi_user_config_mgr_test/BUILD.gn @@ -47,12 +47,11 @@ ohos_unittest("multi_user_config_mgr_test") { "googletest:gtest_main", "hilog:libhilog", "hitrace:hitrace_meter", - "i18n:intl_util", + "i18n:i18n_sa_client", "init:libbegetutil", "ipc:ipc_core", "os_account:libaccountkits", "os_account:os_account_innerkits", - "preferences:native_preferences", "window_manager:libwm", "window_manager:libwsutils", ]