From b89ca419552f2c57d151523bb77ec46d4a5168e2 Mon Sep 17 00:00:00 2001 From: wangdongdong Date: Thu, 10 Mar 2022 15:01:56 +0800 Subject: [PATCH] fixed 6baa072 from https://gitee.com/wangdd__zju/interface_sdk-js/pulls/1035 Signed-off-by: wangdongdong Change-Id: Ia220850ad5f9f0ac703143c3f9aa4a392993631b --- api/@ohos.application.Ability.d.ts | 6 +++--- api/@ohos.application.AbilityConstant.d.ts | 13 +++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/api/@ohos.application.Ability.d.ts b/api/@ohos.application.Ability.d.ts index f918c4e9b9..ffa692bf33 100755 --- a/api/@ohos.application.Ability.d.ts +++ b/api/@ohos.application.Ability.d.ts @@ -218,15 +218,15 @@ export default class Ability { onBackground(): void; /** - * Called back when an ability prepares to migrate. + * Called back when an ability prepares to continue. * * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @param wantParam Indicates the want parameter. - * @return true if ability agrees to migrate and saves data successfully, otherwise false. + * @return 0 if ability agrees to continue and saves data successfully, otherwise errcode. * @StageModelOnly */ - onContinue(wantParam : {[key: string]: any}): boolean; + onContinue(wantParam : {[key: string]: any}): AbilityConstant.OnContinueResult; /** * Called when the launch mode of an ability is set to singleton. diff --git a/api/@ohos.application.AbilityConstant.d.ts b/api/@ohos.application.AbilityConstant.d.ts index e43db61c8a..518bac32dc 100644 --- a/api/@ohos.application.AbilityConstant.d.ts +++ b/api/@ohos.application.AbilityConstant.d.ts @@ -75,6 +75,19 @@ declare namespace AbilityConstant { ABILITY_NOT_RESPONDING = 1, NORMAL = 2, } + + /** + * Type of onContinue result. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @StageModelOnly + */ + export enum OnContinueResult { + AGREE = 0, + REJECT = 1, + MISMATCH = 2, + } } export default AbilityConstant -- Gitee