diff --git a/etc/init/asset_service.cfg b/etc/init/asset_service.cfg index 8def57e..f0b91ef 100755 --- a/etc/init/asset_service.cfg +++ b/etc/init/asset_service.cfg @@ -20,7 +20,8 @@ "ohos.permission.UPDATE_MIGRATE", "ohos.permission.USE_CLOUD_DRIVE_SERVICE", "ohos.permission.ATTEST_KEY", - "ohos.permission.USE_TRUSTED_RING" + "ohos.permission.USE_TRUSTED_RING", + "ohos.permission.START_RESTORE_NOTIFICATION" ], "start-mode" : "condition", "secon" : "u:r:asset_service:s0" diff --git a/sa_profile/8100.json b/sa_profile/8100.json index 2d02029..bb8b873 100644 --- a/sa_profile/8100.json +++ b/sa_profile/8100.json @@ -15,7 +15,7 @@ { "name": "usual.event.USER_REMOVED" }, { "name": "usual.event.CHARGING" }, { "name": "usual.event.USER_UNLOCKED" }, - { "name": "COMMON_EVENT_RESTORE_START" }, + { "name": "usual.event.RESTORE_START" }, { "name": "USER_PIN_CREATED_EVENT" } ], "timedevent": [ diff --git a/services/core_service/src/common_event/start_event.rs b/services/core_service/src/common_event/start_event.rs index f063494..61a74c9 100644 --- a/services/core_service/src/common_event/start_event.rs +++ b/services/core_service/src/common_event/start_event.rs @@ -85,7 +85,7 @@ pub(crate) fn handle_common_event(reason: SystemAbilityOnDemandReason) { let _ = delete_user_de_dir(reason.extra_data.code); } else if reason_name == "usual.event.CHARGING" { listener::backup_db(); - } else if reason_name == "COMMON_EVENT_RESTORE_START" { + } else if reason_name == "usual.event.RESTORE_START" { let want = reason.extra_data.want(); let user_id = match want.get(USER_ID) { Some(v) => match v.parse::() { diff --git a/services/os_dependency/src/system_event_wrapper.cpp b/services/os_dependency/src/system_event_wrapper.cpp index a30db21..c2e2b68 100644 --- a/services/os_dependency/src/system_event_wrapper.cpp +++ b/services/os_dependency/src/system_event_wrapper.cpp @@ -29,7 +29,7 @@ using namespace OHOS::AppExecFwk::Constants; using namespace OHOS::EventFwk; const char * const APP_ID = "appId"; -const char * const COMMON_EVENT_RESTORE_START = "COMMON_EVENT_RESTORE_START"; +const char * const COMMON_EVENT_RESTORE_START = "usual.event.RESTORE_START"; const char * const COMMON_EVENT_USER_PIN_CREATED = "USER_PIN_CREATED_EVENT"; const char * const BUNDLE_NAME = "bundleName"; const char * const PERMISSION_MANAGE_USER_IDM = "ohos.permission.MANAGE_USER_IDM";