From f16ec19dfdb1187ce275a4fd3c8c521bdea73453 Mon Sep 17 00:00:00 2001 From: dy_study Date: Tue, 16 Aug 2022 21:43:52 +0800 Subject: [PATCH] =?UTF-8?q?fixed=2066bcdcc=20from=20https://gitee.com/dy?= =?UTF-8?q?=5Fstudy/interface=5Fsdk-js/pulls/2443=20IssueNo:#I5MMG7=20Desc?= =?UTF-8?q?ription:=E6=96=B0=E5=A2=9E=E5=BA=94=E7=94=A8=E4=BD=8E=E5=86=85?= =?UTF-8?q?=E5=AD=98=E7=9B=91=E5=90=AC=E5=9B=9E=E8=B0=83=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=20Sig:SIG=5FApplicaitonFramework=20Feature=20or=20Bugfix:Featu?= =?UTF-8?q?re=20Binary=20Source:No?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dy_study Change-Id: Ia9bc6bddcb18f23778def51b7eada8453a27862d --- api/@ohos.application.EnvironmentCallback.d.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/api/@ohos.application.EnvironmentCallback.d.ts b/api/@ohos.application.EnvironmentCallback.d.ts index b19bd5792e..2b9d8dfe1e 100755 --- a/api/@ohos.application.EnvironmentCallback.d.ts +++ b/api/@ohos.application.EnvironmentCallback.d.ts @@ -13,6 +13,7 @@ * limitations under the License. */ +import AbilityConstant from "./@ohos.application.AbilityConstant"; import { Configuration } from './@ohos.application.Configuration'; /** @@ -31,5 +32,16 @@ export default class EnvironmentCallback { * @param config: Indicates the updated configuration. * @StageModelOnly */ - onConfigurationUpdated(config: Configuration): void; + onConfigurationUpdated(config: Configuration): void; + + /** + * 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. + * @StageModelOnly + */ + onMemoryLevel(level: AbilityConstant.MemoryLevel): void; } -- Gitee