diff --git a/api/@ohos.ability.wantConstant.d.ts b/api/@ohos.ability.wantConstant.d.ts index 5a858dbad2758da173e1d9fd58634d0f7f672373..c0b1cc914c9152cf9a6000715cd2366be197dabc 100644 --- a/api/@ohos.ability.wantConstant.d.ts +++ b/api/@ohos.ability.wantConstant.d.ts @@ -230,7 +230,47 @@ declare namespace wantConstant { * @since 9 * @systemapi Hide this for inner system use. */ - ACTION_MARKET_CROWDTEST = "ohos.want.action.marketCrowdTest" + ACTION_MARKET_CROWDTEST = "ohos.want.action.marketCrowdTest", + + /** + * Indicates the param of sandbox flag. + * + * @since 9 + * @systemapi Hide this for inner system use. + */ + DLP_PARAMS_SANDBOX = "ohos.dlp.params.sandbox", + + /** + * Indicates the param of dlp bundle name. + * + * @since 9 + * @systemapi Hide this for inner system use. + */ + DLP_PARAMS_BUNDLE_NAME = "ohos.dlp.params.bundleName", + + /** + * Indicates the param of dlp module name. + * + * @since 9 + * @systemapi Hide this for inner system use. + */ + DLP_PARAMS_MODULE_NAME = "ohos.dlp.params.moduleName", + + /** + * Indicates the param of dlp ability name. + * + * @since 9 + * @systemapi Hide this for inner system use. + */ + DLP_PARAMS_ABILITY_NAME = "ohos.dlp.params.abilityName", + + /** + * Indicates the param of dlp bundle index. + * + * @since 9 + * @systemapi Hide this for inner system use. + */ + DLP_PARAMS_INDEX = "ohos.dlp.params.index" } /** diff --git a/api/@ohos.application.appManager.d.ts b/api/@ohos.application.appManager.d.ts index 8cc1d9a98ccdb0b7105fa96e8b49e149702e337d..2f6aeeeb94db3f448f8a9f8b01c4b36188084aec 100644 --- a/api/@ohos.application.appManager.d.ts +++ b/api/@ohos.application.appManager.d.ts @@ -29,6 +29,36 @@ import { ProcessRunningInformation as _ProcessRunningInformation } from './appli * @permission N/A */ declare namespace appManager { + /** + * @name ApplicationState + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi Hide this for inner system use. + * @permission N/A + */ + export enum ApplicationState { + STATE_CREATE, + STATE_FOREGROUND, + STATE_ACTIVE, + STATE_BACKGROUND, + STATE_DESTROY + } + + /** + * @name ProcessState + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi Hide this for inner system use. + * @permission N/A + */ + export enum ProcessState { + STATE_CREATE, + STATE_FOREGROUND, + STATE_ACTIVE, + STATE_BACKGROUND, + STATE_DESTROY + } + /** * Register application state observer. * diff --git a/api/application/ApplicationStateObserver.d.ts b/api/application/ApplicationStateObserver.d.ts index 320238f2cadf66d4561a10c75860925bb53098fd..71cab9a6b377e4695fd7af99c284b0ec5b970f0c 100644 --- a/api/application/ApplicationStateObserver.d.ts +++ b/api/application/ApplicationStateObserver.d.ts @@ -69,6 +69,17 @@ export default class ApplicationStateObserver { * @return - */ onProcessDied(processData: ProcessData): void; + + /** + * Called when process state changes. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @param processData Process info. + * @systemapi hide for inner use. + * @return - + */ + onProcessStateChanged(processData: ProcessData): void; } /** diff --git a/api/application/ProcessData.d.ts b/api/application/ProcessData.d.ts index e96fe473aeb76300f0dc17f7c8fed921f104fadf..9244839db546ab8f1248a7f19d5286c3ec437290 100644 --- a/api/application/ProcessData.d.ts +++ b/api/application/ProcessData.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"), * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -48,4 +48,31 @@ export default class ProcessData { * @systemapi hide for inner use. */ uid: number; + + /** + * The process state. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi hide for inner use. + */ + state: number; + + /** + * Whether the process is continuous task. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi hide for inner use. + */ + isContinuousTask: boolean; + + /** + * Whether the process is keep alive. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi hide for inner use. + */ + isKeepAlive: boolean; } \ No newline at end of file