mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2025-02-22 10:17:51 +00:00
Signed-off-by: caochunlei <caochunlei1@huawei.com>
This commit is contained in:
parent
942f18bfd3
commit
6cdbf00810
12
api/@ohos.application.Ability.d.ts
vendored
12
api/@ohos.application.Ability.d.ts
vendored
@ -302,4 +302,16 @@ export default class Ability {
|
||||
* @StageModelOnly
|
||||
*/
|
||||
dump(params: Array<string>): Array<string>;
|
||||
|
||||
/**
|
||||
* Called when the system has determined to trim the memory, for example, when the ability is running in the
|
||||
* background and there is no enough memory for running as many background processes as possible.
|
||||
*
|
||||
* @since 9
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
|
||||
* @param level Indicates the memory trim level, which shows the current memory usage status.
|
||||
* @return -
|
||||
* @StageModelOnly
|
||||
*/
|
||||
onMemoryLevel(level: AbilityConstant.MemoryLevel): void;
|
||||
}
|
||||
|
13
api/@ohos.application.AbilityConstant.d.ts
vendored
13
api/@ohos.application.AbilityConstant.d.ts
vendored
@ -89,6 +89,19 @@ declare namespace AbilityConstant {
|
||||
MISMATCH = 2,
|
||||
}
|
||||
|
||||
/**
|
||||
* Type of memory level.
|
||||
*
|
||||
* @since 9
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.Core
|
||||
* @StageModelOnly
|
||||
*/
|
||||
export enum MemoryLevel {
|
||||
MEMORY_LEVEL_MODERATE = 0,
|
||||
MEMORY_LEVEL_LOW = 1,
|
||||
MEMORY_LEVEL_CRITICAL = 2,
|
||||
}
|
||||
|
||||
/**
|
||||
* Type of window mode.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user