From ac204b44d9b125ab02f7d00a5d9b41eff5fc7d45 Mon Sep 17 00:00:00 2001 From: xinking129 Date: Wed, 29 Mar 2023 10:52:34 +0800 Subject: [PATCH] recovery content split Signed-off-by: xinking129 --- .../dfx/apprecovery-guidelines.md | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/zh-cn/application-dev/dfx/apprecovery-guidelines.md b/zh-cn/application-dev/dfx/apprecovery-guidelines.md index 59478207ae..79097f0f4c 100644 --- a/zh-cn/application-dev/dfx/apprecovery-guidelines.md +++ b/zh-cn/application-dev/dfx/apprecovery-guidelines.md @@ -221,20 +221,3 @@ export default class EntryAbility extends Ability { } } ``` - -#### 故障Ability的重启恢复标记 - -发生故障的Ability再次重新启动时,在调度onCreate生命周期里,参数want的parameters成员会有[ABILITY_BACK_TO_OTHER_MISSION_STACK](../reference/apis/js-apis-app-ability-wantConstant.md#wantConstant.Params)标记数据,并且值为true。 - -```ts -import UIAbility from '@ohos.app.ability.UIAbility'; -export default class EntryAbility extends UIAbility { - onCreate(want, launchParam) { - if (want.parameters[ABILITY_BACK_TO_OTHER_MISSION_STACK] != undefined && - want.parameters[ABILITY_BACK_TO_OTHER_MISSION_STACK] == true) { - console.log("This ability need to recovery"); - } - } -} -``` - -- GitLab