未验证 提交 0b9228e7 编写于 作者: X xinking129 提交者: Gitee

update zh-cn/application-dev/dfx/apprecovery-guidelines.md.

sample code modification
Signed-off-by: Nxinking129 <xinxin13@huawei.com>
上级 b2af20ca
......@@ -228,10 +228,11 @@ export default class EntryAbility extends Ability {
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
import wantConstant from '@ohos.app.ability.wantConstant';
export default class EntryAbility extends UIAbility {
onCreate(want, launchParam) {
if (want.parameters[ABILITY_RECOVERY_RESTART] != undefined &&
want.parameters[ABILITY_RECOVERY_RESTART] == true) {
if (want.parameters[wantConstant.Params.ABILITY_RECOVERY_RESTART] != undefined &&
want.parameters[wantConstant.Params.ABILITY_RECOVERY_RESTART] == true) {
console.log("This ability need to recovery");
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册