From b20962f6642198eb5ae4ac3077c43e2c368b13b2 Mon Sep 17 00:00:00 2001 From: dy_study Date: Thu, 14 Jul 2022 16:30:18 +0800 Subject: [PATCH] =?UTF-8?q?IssueNo:#I5H40A=20Description:=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=BA=94=E7=94=A8=E4=B8=8A=E4=B8=8B=E6=96=87=E7=9B=91?= =?UTF-8?q?=E5=90=AC=E7=AA=97=E5=8F=A3=E7=8A=B6=E6=80=81=E5=8F=98=E5=8C=96?= =?UTF-8?q?=E7=9B=91=E5=90=AC=E6=8E=A5=E5=8F=A3=20Sig:SIG=5FApplicationFra?= =?UTF-8?q?mework=20Feature=20or=20Bugfix:=20Feature=20Binary=20Source:=20?= =?UTF-8?q?No?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dy_study Change-Id: I1566a48f14bba413c9a518dfdf52dbd72c883323 --- api/@ohos.ability.wantConstant.d.ts | 106 +++++++++++++++++- ....application.AbilityLifecycleCallback.d.ts | 34 +++++- api/application/ApplicationContext.d.ts | 12 ++ api/application/abilityDelegator.d.ts | 6 +- 4 files changed, 146 insertions(+), 12 deletions(-) diff --git a/api/@ohos.ability.wantConstant.d.ts b/api/@ohos.ability.wantConstant.d.ts index c90f0e36ab..df1fd3a2a5 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 77e747eb78..33db234da5 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 2f605c61cf..462c3ed8f2 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 156c222b32..ea5e190ce6 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. -- Gitee