diff --git a/bundle.json b/bundle.json index 85101bc..3de00a4 100644 --- a/bundle.json +++ b/bundle.json @@ -25,7 +25,7 @@ "hiviewdfx_hilog_native", "ipc", "samgr", - "utils_base" + "c_utils" ], "third_party": [ "libxml2" ] }, diff --git a/etc/profile/foundation.cfg b/etc/profile/foundation.cfg index 3c3b2db..68e4ef9 100644 --- a/etc/profile/foundation.cfg +++ b/etc/profile/foundation.cfg @@ -1,21 +1,5 @@ { "jobs" : [{ - "name" : "init", - "cmds" : [ - "mkdir /dev/memcg", - "mount cgroup none /dev/memcg memory", - "chown system system /dev/memcg", - "chown system system /dev/memcg/tasks", - "chown system system /dev/memcg/memory.oom_control", - "chown system system /dev/memcg/cgroup.event_control", - "chown system system /dev/memcg/memory.pressure_level", - "chmod 0755 /dev/memcg", - "chmod 0755 /dev/memcg/tasks", - "chmod 0755 /dev/memcg/memory.oom_control", - "chmod 0755 /dev/memcg/cgroup.event_control", - "chmod 0755 /dev/memcg/memory.pressure_level" - ] - }, { "name" : "services:foundation", "cmds" : [ "mkdir /data/service/el1/public/AbilityManagerService 0711 foundation system", @@ -29,6 +13,12 @@ "chown radio system /sys/power/wake_unlock", "chmod 0664 /sys/power/wakeup_count" ] + } , { + "name" : "services:restartfoundation", + "cmds" : [ + "reset appspawn", + "reset accountmgr" + ] } ], "services" : [{ @@ -40,13 +30,16 @@ "permission" : [ "ohos.permission.INPUT_MONITORING", "ohos.permission.PERMISSION_USED_STATS", + "ohos.permission.DISTRIBUTED_SOFTBUS_CENTER", + "ohos.permission.DISTRIBUTED_DATASYNC", "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", "ohos.permission.INSTALL_BUNDLE" ], "gid" : ["system"], "caps" : ["SYS_PTRACE", "KILL"], "jobs" : { - "on-start" : "services:foundation" + "on-start" : "services:foundation", + "on-restart" : "services:restartfoundation" }, "secon" : "u:r:foundation:s0" } diff --git a/etc/profile/foundation_permission_desc.json b/etc/profile/foundation_permission_desc.json index 344b0b1..e420164 100644 --- a/etc/profile/foundation_permission_desc.json +++ b/etc/profile/foundation_permission_desc.json @@ -9,6 +9,23 @@ "name" : "ohos.permission.INSTALL_BUNDLE", "said" : "401", "description" : "Permission required for BMS to install and uninstall bundle." + }, + { + "name" : "ohos.permission.PERMISSION_USED_STATS", + "said" : "3299", + "description" : "Invoke AccessToken::PrivacyKit::AddPermissionUsedRecord interface should have own this permission." + } + ], + "restart" : [ + { + "name" : "reset accountmgr", + "said" : "180", + "description" : "AMS requires accountmgr to restart" + }, + { + "name" : "reset appspawn", + "said" : "180", + "description" : "AMS requires all application to restart" } ] -} \ No newline at end of file +} diff --git a/interfaces/innerkits/safwk/BUILD.gn b/interfaces/innerkits/safwk/BUILD.gn index 0a72d6f..2c3c841 100755 --- a/interfaces/innerkits/safwk/BUILD.gn +++ b/interfaces/innerkits/safwk/BUILD.gn @@ -35,13 +35,13 @@ ohos_shared_library("system_ability_fwk") { if (is_standard_system) { external_deps = [ + "c_utils:utils", "hitrace_native:hitrace_meter", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "samgr:lsamgr", "samgr:samgr_common", "samgr:samgr_proxy", - "utils_base:utils", ] public_deps = [ "//third_party/libxml2:libxml2" ] } diff --git a/services/safwk/BUILD.gn b/services/safwk/BUILD.gn index 9aa802b..20bc506 100755 --- a/services/safwk/BUILD.gn +++ b/services/safwk/BUILD.gn @@ -34,13 +34,13 @@ ohos_executable("sa_main") { if (is_standard_system) { external_deps = [ + "c_utils:utils", "hitrace_native:hitrace_meter", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "samgr:lsamgr", "samgr:samgr_common", "samgr:samgr_proxy", - "utils_base:utils", ] } diff --git a/test/mock/common/audio_ability/BUILD.gn b/test/mock/common/audio_ability/BUILD.gn index d4381ae..79dfc45 100755 --- a/test/mock/common/audio_ability/BUILD.gn +++ b/test/mock/common/audio_ability/BUILD.gn @@ -33,9 +33,9 @@ ohos_shared_library("test_audio_ability") { deps = [ "//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk:system_ability_fwk" ] external_deps = [ + "c_utils:utils", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", - "utils_base:utils", ] part_name = "safwk" diff --git a/test/mock/common/ondemand_ability/BUILD.gn b/test/mock/common/ondemand_ability/BUILD.gn index cd23022..bac5b39 100755 --- a/test/mock/common/ondemand_ability/BUILD.gn +++ b/test/mock/common/ondemand_ability/BUILD.gn @@ -30,15 +30,12 @@ ohos_shared_library("test_ondemand_ability") { ] configs = [ ":ondemand_ability_config" ] - deps = [ - "//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk:system_ability_fwk", - "//utils/native/base:utils", - ] + deps = [ "//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk:system_ability_fwk" ] external_deps = [ + "c_utils:utils", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", - "utils_base:utils", ] part_name = "safwk" subsystem_name = "systemabilitymgr" diff --git a/test/services/safwk/unittest/BUILD.gn b/test/services/safwk/unittest/BUILD.gn index 2955550..4f8b049 100755 --- a/test/services/safwk/unittest/BUILD.gn +++ b/test/services/safwk/unittest/BUILD.gn @@ -39,12 +39,12 @@ ohos_unittest("LocalAbilityManagerTest") { } external_deps = [ + "c_utils:utils", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "samgr:lsamgr", "samgr:samgr_common", "samgr:samgr_proxy", - "utils_base:utils", ] } diff --git a/test/services/safwk/unittest/listen_ability/BUILD.gn b/test/services/safwk/unittest/listen_ability/BUILD.gn index f7caa97..18dd23d 100755 --- a/test/services/safwk/unittest/listen_ability/BUILD.gn +++ b/test/services/safwk/unittest/listen_ability/BUILD.gn @@ -27,10 +27,7 @@ ohos_shared_library("listen_test") { configs = [ ":listen_ability_config" ] - deps = [ - "//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk:system_ability_fwk", - "//utils/native/base:utils", - ] + deps = [ "//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk:system_ability_fwk" ] if (is_standard_system) { external_deps = [ "hiviewdfx_hilog_native:libhilog" ] @@ -39,9 +36,9 @@ ohos_shared_library("listen_test") { } external_deps += [ + "c_utils:utils", "ipc:ipc_core", "samgr:samgr_proxy", - "utils_base:utils", ] part_name = "safwk" subsystem_name = "systemabilitymgr" diff --git a/test/services/safwk/unittest/local_ability_manager_test.cpp b/test/services/safwk/unittest/local_ability_manager_test.cpp index 6819484..aaaa979 100644 --- a/test/services/safwk/unittest/local_ability_manager_test.cpp +++ b/test/services/safwk/unittest/local_ability_manager_test.cpp @@ -62,7 +62,6 @@ void LocalAbilityManagerTest::TearDown() * @tc.name: CheckTrustSa001 * @tc.desc: CheckTrustSa with not all allow * @tc.type: FUNC - * @tc.require: SR000GICST */ HWTEST_F(LocalAbilityManagerTest, CheckTrustSa001, TestSize.Level1) { @@ -89,7 +88,6 @@ HWTEST_F(LocalAbilityManagerTest, CheckTrustSa001, TestSize.Level1) * @tc.name: CheckTrustSa002 * @tc.desc: CheckTrustSa with all allow * @tc.type: FUNC - * @tc.require: SR000GICST */ HWTEST_F(LocalAbilityManagerTest, CheckTrustSa002, TestSize.Level1) { @@ -117,7 +115,6 @@ HWTEST_F(LocalAbilityManagerTest, CheckTrustSa002, TestSize.Level1) * @tc.name: DoStartSAProcess001 * @tc.desc: DoStartSAProcess001 * @tc.type: FUNC - * @tc.require: SR000GH56H */ HWTEST_F(LocalAbilityManagerTest, DoStartSAProcess001, TestSize.Level2) {