diff --git a/api/@ohos.ability.wantConstant.d.ts b/api/@ohos.ability.wantConstant.d.ts index c90f0e36abd91dd24651386d90c80dcea0dd41d6..df1fd3a2a5725e1b8bf320d22b7556da055af2bd 100644 --- a/api/@ohos.ability.wantConstant.d.ts +++ b/api/@ohos.ability.wantConstant.d.ts @@ -130,14 +130,14 @@ declare namespace wantConstant { * * @since 8 */ - ACTION_IMAGE_CAPTURE = "ohos.want.action.imageCapture", + ACTION_IMAGE_CAPTURE = "ohos.want.action.imageCapture", /** * Indicates the action of starting a Page ability for Take a video. * * @since 8 */ - ACTION_VIDEO_CAPTURE = "ohos.want.action.videoCapture", + ACTION_VIDEO_CAPTURE = "ohos.want.action.videoCapture", /** * Indicates the action of showing the application selection dialog box. @@ -217,17 +217,33 @@ declare namespace wantConstant { ACTION_APP_ACCOUNT_OAUTH = "ohos.account.appAccount.action.oauth", /** - * Indicates the action of downloading application from application market. + * Indicates the action of an application downloaded from the application market. * * @since 9 * @systemapi Hide this for inner system use. */ - ACTION_MARKER_DOWNLOAD = "ohos.want.action.marketDownload" + ACTION_MARKET_DOWNLOAD = "ohos.want.action.marketDownload", + + /** + * Indicates the action of an application disposed from the application market. + * + * @since 9 + * @systemapi Hide this for inner system use. + */ + ACTION_MARKET_DISPOSED = "ohos.want.action.marketDisposed", + + /** + * Indicates the action of an application crowdtested from the application market. + * + * @since 9 + * @systemapi Hide this for inner system use. + */ + ACTION_MARKET_CROWDTEST = "ohos.want.action.marketCrowdTest" } /** * the constant for Entity of the want - * @name Action + * @name Entity * @since 6 * @syscap SystemCapability.Ability.AbilityBase * @permission N/A @@ -267,6 +283,86 @@ declare namespace wantConstant { ENTITY_VIDEO = "entity.system.video" } + /** + * the constant for Param of the want + * @name Param + * @since 9 + * @syscap SystemCapability.Ability.AbilityBase + */ + export enum Param { + /** + * Indicates the key of the window mode parameter. + * + * @since 9 + * @systemapi Hide this for inner system use. + */ + PARAM_WINDOW_MODE = "ohos.ability.param.windowMode", + + /** + * Indicates the key of the display id parameter. + * + * @since 9 + * @systemapi Hide this for inner system use. + */ + PARAM_DISPLAY_ID = "ohos.ability.param.displayId", + + /** + * Indicates the key of the caller token parameter. + * + * @since 9 + * @systemapi Hide this for inner system use. + */ + PARAM_CALLER_TOKEN = "ohos.ability.param.callerToken", + + /** + * Indicates the key of the caller uid parameter. + * + * @since 9 + * @systemapi Hide this for inner system use. + */ + PARAM_CALLER_UID = "ohos.ability.param.callerUid", + + /** + * Indicates the key of the caller pid parameter. + * + * @since 9 + * @systemapi Hide this for inner system use. + */ + PARAM_CALLER_PID = "ohos.ability.param.callerPid", + + /** + * Indicates the key of the start ability for result parameter. + * + * @since 9 + * @systemapi Hide this for inner system use. + */ + PARAM_FOR_RESULT = "ohos.ability.param.startAbilityForResult", + + /** + * Indicates the key of the free install calling appId parameter. + * + * @since 9 + * @systemapi Hide this for inner system use. + */ + PARAM_FREEINSTALL_APPID = "ohos.freeinstall.params.callingAppId", + + /** + * Indicates the key of the free install calling bundleNames parameter. + * + * @since 9 + * @systemapi Hide this for inner system use. + */ + PARAM_FREEINSTALL_BUNDLENAMES = "ohos.freeinstall.params.callingBundleNames", + + /** + * Indicates the key of the free install calling uid parameter. + * + * @since 9 + * @systemapi Hide this for inner system use. + */ + PARAM_FREEINSTALL_UID = "ohos.freeinstall.params.callingUid" + } + export enum Flags { /** * Indicates the grant to perform read operations on the URI. diff --git a/api/@ohos.application.AbilityLifecycleCallback.d.ts b/api/@ohos.application.AbilityLifecycleCallback.d.ts index 77e747eb78d62338fe0fd3fe9a778b2edc55914d..33db234da5362cd83e943d739ec29e5eb86d02dd 100644 --- a/api/@ohos.application.AbilityLifecycleCallback.d.ts +++ b/api/@ohos.application.AbilityLifecycleCallback.d.ts @@ -14,6 +14,8 @@ */ import Ability from "./@ohos.application.Ability"; +import dataAbility from "./@ohos.data.dataAbility"; +import window from './@ohos.window'; /** * The ability lifecycle callback. @@ -34,24 +36,48 @@ export default class AbilityLifecycleCallback { onAbilityCreate(ability: Ability): void; /** - * Called back when an ability window stage is created. + * Called back when a window stage is created. * * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @param ability: Indicates the ability to register for listening. + * @param windowStage window stage to create * @StageModelOnly */ - onAbilityWindowStageCreate(ability: Ability): void; + onWindowStageCreate(ability: Ability, windowStage: window.WindowStage): void; /** - * Called back when an ability window stage is destroyed. + * Called back when a window stage is actived. * * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @param ability: Indicates the ability to register for listening. + * @param windowStage window stage to active * @StageModelOnly */ - onAbilityWindowStageDestroy(ability: Ability): void; + onWindowStageActive(ability: Ability, windowStage: window.WindowStage): void; + + /** + * Called back when a window stage is inactived. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @param ability: Indicates the ability to register for listening. + * @param windowStage window stage to inactive + * @StageModelOnly + */ + onWindowStageInactive(ability: Ability, windowStage: window.WindowStage): void; + + /** + * Called back when a window stage is destroyed. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @param ability: Indicates the ability to register for listening. + * @param windowStage window stage to destroy + * @StageModelOnly + */ + onWindowStageDestroy(ability: Ability, windowStage: window.WindowStage): void; /** * Called back when an ability is destroyed. diff --git a/api/application/ApplicationContext.d.ts b/api/application/ApplicationContext.d.ts index 2f605c61cf00e4bfa78422ab766a12527bcc5db8..462c3ed8f24341e47a02fb4e4ae24a31d66b6648 100755 --- a/api/application/ApplicationContext.d.ts +++ b/api/application/ApplicationContext.d.ts @@ -17,6 +17,7 @@ import { AsyncCallback } from "../basic"; import Context from "./Context"; import AbilityLifecycleCallback from "../@ohos.application.AbilityLifecycleCallback"; import EnvironmentCallback from "../@ohos.application.EnvironmentCallback"; +import AbilityStage from "../@ohos.application.AbilityStage"; /** * The context of an application. It allows access to application-specific resources. @@ -72,4 +73,15 @@ export default class ApplicationContext extends Context { */ unregisterEnvironmentCallback(callbackId: number, callback: AsyncCallback): void; unregisterEnvironmentCallback(callbackId: number): Promise; + + /** + * Obtains the Ability Stage. + * + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @param moduleName Indicates the module name. + * @return Returns the Ability Stage. + * @since 9 + * @StageModelOnly + */ + getAbilityStage(moduleName: string): AbilityStage; } diff --git a/api/application/abilityDelegator.d.ts b/api/application/abilityDelegator.d.ts index 156c222b32410b171b7085f14a30e416f77cfc68..ea5e190ce61ae83ee4f11e0e1e73b2a75a66bae9 100644 --- a/api/application/abilityDelegator.d.ts +++ b/api/application/abilityDelegator.d.ts @@ -16,7 +16,7 @@ import { AsyncCallback } from '../basic'; import Ability from '../@ohos.application.Ability'; import { AbilityMonitor } from './abilityMonitor'; -import { Context } from './Context'; +import { ApplicationContext } from "./ApplicationContext"; import Want from "../@ohos.application.Want"; import { ShellCmdResult } from './shellCmdResult'; @@ -67,9 +67,9 @@ export interface AbilityDelegator { * * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @return App Context + * @return Returns the Application Context. */ - getAppContext(): Context; + getAppContext(): ApplicationContext; /** * Obtain the lifecycle state of a specified ability.