!17821 merge master into master

回退多用户修改

Created-by: yliupy
Commit-by: LY
Merged-by: openharmony_ci
Description: **IssueNo**:
https://gitcode.com/openharmony/global_i18n/issues/1036
**Description**:

**稳定性自检:**
| 自检项                                                       | 自检结果  |
| ------------------------------------------------------------ | -------- |
| 涉及跨进程调用的相关操作需要抛至主线程或加锁防止并发              |      Y    |
| 成员变量进行赋值或创建需要排查并发                               |     Y     |
| 谨慎在lambda表达式中使用引用捕获                                |    Y      |
| 谨慎在未经拷贝的情况下使用外部传入的string、C字符串               |     Y     |
| map\vector\list\set等stl模板类使用时需要排查并发                |      Y    |
| 谨慎考虑加锁范围                                               |      Y    |
| 在IPC通信中谨慎使用同步通信方式                                 |       Y   |
| 禁止传递this指针至其他模块或线程(特别是eventhandler任务)        |       Y   |
| 禁止将外部传入的裸指针在内部直接构造智能指针                      |    Y      |
| 禁止多个独立创建的智能指针管理同一地址                           |       Y   |
| 禁止在析构函数中抛异步任务                                      |      Y    |
| 禁止js对象在非js线程(例如在IPC线程)创建、使用或销毁             | Y         |
| 禁止在对外接口中未经判空直接使用外部传入的指针                    |     Y     |
| 禁止接口返回局部变量引用                                        |      Y    |
| 禁止在信号函数中加锁                                            |        Y  |
| 禁止在关键流程(SA启动、应用启动等主流程)执行耗时的操作           |     Y     |
| 禁止将同一个cpp编译在不同的so中                                 |      Y   |

**安全编码自检:**
| 自检项                                                          | 自检结果 |
| -------------------------------------------------------------- | -------- |
| 裸指针避免通过隐式转换构造为sptr                                 |      Y    |
| json对象在取值之前必须先判断类型,避免类型不匹配                   |   Y       |
| 序列化时必须对传入的数组大小进行校验,避免出现超大数组              |      Y    |
| 避免使用未明确位宽的整型,选择使用int8_t、uint8_t等类型            |     Y     |
| 外部传入的路径要做规范化校验,对路径中的.、..、../等特殊字符严格校验 |   Y       |
| 指针变量、表示资源描述符的变量、bool变量必须赋初值                  |     Y     |
| readParcelable获取的对象使用前需要判空                            |     Y     |
| 分配和释放内存的函数需要成对出现                                   |     Y     |
| 申请内存后异常退出前需要及时进行内存释放                            |  Y        |
| 内存申请前必须对内存大小进行合法性校验                              |    Y      |
| 内存分配后必须判断是否成功                                         |   Y       |
| 禁止使用realloc、alloca函数                                       |      Y    |
| 禁止打印文件路径、口令等敏感信息,如有需要,使用private修饰          |    Y      |
| 禁止打印内存地址                                                  |     Y     |
| 整数之间运算时必须严格检查,确保不会出现溢出、反转、除0               |     Y     |
| 禁止对有符号整数进行位操作符运算                                    |      Y    |
| 禁止对指针进行逻辑或位运算                                         |   Y       |
| 循环次数如果收外部数据控制,需要检验其合法性                         |    Y      |
| 禁止使用内存操作类危险函数,需要使用安全函数                         |    Y      |
| 谨慎使用不可重入函数                                               |    Y      |
| 必须检查安全函数的返回值,并进行正确处理                             |    Y      |
| 禁止仅通过TokenType类型判断绕过权限校验                             |    Y      |

**TDD Result**:

**XTS Result**:

### 是否已执行L0用例
- [ ] 已验证
- [ ] 不涉及。如不涉及,请写明理由


See merge request: openharmony/ability_ability_runtime!17821
This commit is contained in:
openharmony_ci
2025-12-25 19:51:42 +08:00
13 changed files with 14 additions and 19 deletions
+1 -1
View File
@@ -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",
@@ -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);
}
@@ -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",
]
}
@@ -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",
@@ -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",
@@ -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",
@@ -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",
@@ -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",
@@ -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",
]
@@ -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",
@@ -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",
]
@@ -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",
@@ -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",
]