Signed-off-by: wangdongdong <wangdongdong14@huawei.com>

Change-Id: Ia220850ad5f9f0ac703143c3f9aa4a392993631b
This commit is contained in:
wangdongdong 2022-03-10 15:01:56 +08:00
parent 02803caacc
commit 6baa072e53
2 changed files with 16 additions and 3 deletions

View File

@ -257,15 +257,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.

View File

@ -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