From 15d464d28e80015d6c3a4a94897c04e98001a821 Mon Sep 17 00:00:00 2001 From: njupthan Date: Fri, 11 Feb 2022 18:26:13 +0800 Subject: [PATCH] update d.ts file Signed-off-by: njupthan --- api/@ohos.application.Ability.d.ts | 24 +++++++++++++++++++++++ api/@ohos.application.AbilityStage.d.ts | 12 ++++++++++++ api/@ohos.application.StartOptions.d.ts | 10 ++++++++++ api/@ohos.application.abilityManager.d.ts | 3 +-- api/application/AbilityContext.d.ts | 10 ++++++++++ 5 files changed, 57 insertions(+), 2 deletions(-) diff --git a/api/@ohos.application.Ability.d.ts b/api/@ohos.application.Ability.d.ts index 130fd64dcd..4c576857f0 100644 --- a/api/@ohos.application.Ability.d.ts +++ b/api/@ohos.application.Ability.d.ts @@ -17,6 +17,7 @@ import AbilityConstant from "./@ohos.application.AbilityConstant"; import AbilityContext from "./application/AbilityContext"; import Want from './@ohos.application.Want'; import window from './@ohos.window'; +import { Configuration } from './@ohos.application.Configuration'; /** * The class of an ability. @@ -131,4 +132,27 @@ export default class Ability { * @StageModelOnly */ onContinue(wantParam : {[key: string]: any}): boolean; + + /** + * Called when the launch mode of an ability is set to singleton. + * This happens when you re-launch an ability that has been at the top of the ability stack. + * + * @devices phone, tablet, tv, wearable, car + * @since 9 + * @sysCap AAFwk + * @return - + * @StageModelOnly + */ + onNewWant(want: Want): void; + + /** + * Called when the system configuration is updated. + * + * @devices phone, tablet, tv, wearable, car + * @since 9 + * @sysCap AAFwk + * @return - + * @StageModelOnly + */ + onConfigurationUpdated(config: Configuration): void; } diff --git a/api/@ohos.application.AbilityStage.d.ts b/api/@ohos.application.AbilityStage.d.ts index 6d4c0d63ac..8857eb11d6 100644 --- a/api/@ohos.application.AbilityStage.d.ts +++ b/api/@ohos.application.AbilityStage.d.ts @@ -14,6 +14,7 @@ */ import AbilityStageContext from "./application/AbilityStageContext"; +import Want from './@ohos.application.Want'; /** * The class of an ability stage. @@ -44,4 +45,15 @@ export default class AbilityStage { * @StageModelOnly */ onCreate(): void; + + /** + * Called back when start specified ability. + * + * @devices phone, tablet, tv, wearable, car + * @since 9 + * @sysCap AAFwk + * @return - + * @StageModelOnly + */ + onAcceptWant(want: Want): string; } \ No newline at end of file diff --git a/api/@ohos.application.StartOptions.d.ts b/api/@ohos.application.StartOptions.d.ts index 41f6bd95d5..ac8f6570b4 100644 --- a/api/@ohos.application.StartOptions.d.ts +++ b/api/@ohos.application.StartOptions.d.ts @@ -33,4 +33,14 @@ export default class StartOptions { * @StageModelOnly */ windowMode?: number; + + /** + * displayId + * @default - + * @devices phone, tablet + * @since 9 + * @sysCap AAFwk + * @StageModelOnly + */ + displayId?: number; } \ No newline at end of file diff --git a/api/@ohos.application.abilityManager.d.ts b/api/@ohos.application.abilityManager.d.ts index 5f996d8366..c248195e16 100644 --- a/api/@ohos.application.abilityManager.d.ts +++ b/api/@ohos.application.abilityManager.d.ts @@ -62,7 +62,6 @@ declare namespace abilityManager { * @devices phone, tablet, tv, wearable, car * @since 8 * @SysCap AAFwk - * @param config Indicates the new configuration. * @systemapi Hide this for inner system use. * @return - */ @@ -75,7 +74,7 @@ declare namespace abilityManager { * @devices phone, tablet, tv, wearable, car * @since 8 * @SysCap AAFwk - * @param config Indicates the new configuration. + * @param upperLimit Get the maximum limit of the number of messages. * @systemapi Hide this for inner system use. * @return - */ diff --git a/api/application/AbilityContext.d.ts b/api/application/AbilityContext.d.ts index 1757c2c771..2f977ff28f 100644 --- a/api/application/AbilityContext.d.ts +++ b/api/application/AbilityContext.d.ts @@ -22,6 +22,7 @@ import Context from "./Context"; import Want from "../@ohos.application.Want"; import StartOptions from "../@ohos.application.StartOptions"; import PermissionRequestResult from "./PermissionRequestResult"; +import { Configuration } from '../@ohos.application.Configuration'; /** * The context of an ability. It allows access to ability-specific resources. @@ -51,6 +52,15 @@ export default class AbilityContext extends Context { */ currentHapModuleInfo: HapModuleInfo; + /** + * Indicates configuration information. + * + * @since 9 + * @sysCap AAFwk + * @StageModelOnly + */ + config: Configuration; + /** * Starts a new ability. * -- Gitee