diff --git a/api/@ohos.app.ability.appManager.d.ts b/api/@ohos.app.ability.appManager.d.ts index 2907825cb..2f9578420 100644 --- a/api/@ohos.app.ability.appManager.d.ts +++ b/api/@ohos.app.ability.appManager.d.ts @@ -18,7 +18,6 @@ import * as _ApplicationStateObserver from './application/ApplicationStateObserv import * as _AbilityStateData from './application/AbilityStateData'; import * as _AppStateData from './application/AppStateData'; import { ProcessInformation as _ProcessInformation } from './application/ProcessInformation'; -import { LowMemoryObserver as _LowMemoryObserver } from './application/LowMemoryObserver'; /** * This module provides the function of app manager service. @@ -457,30 +456,6 @@ declare namespace appManager { */ function isSharedBundleRunning(bundleName: string, versionCode: number, callback: AsyncCallback): void; - /** - * Register system low memory state observer. - * @param { 'lowMemory' } type - lowMemory. - * @param { LowMemoryObserver } observer - Indicates the LowMemoryObserver to be registered. - * @throws { BusinessError } 202 - Not system application. - * @throws { BusinessError } 401 - If the input parameter is not valid parameter. - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @systemapi - * @since 10 - */ - function on(type: 'lowMemory', observer: LowMemoryObserver): void; - - /** - * Unregister system low memory state observer. - * @param { 'lowMemory' } type - lowMemory. - * @param { LowMemoryObserver } observer - Indicates the observer to be unregistered. - * @throws { BusinessError } 202 - Not system application. - * @throws { BusinessError } 401 - If the input parameter is not valid parameter. - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @systemapi - * @since 10 - */ - function off(type: 'lowMemory', observer: LowMemoryObserver): void; - /** * Obtains memory usage of one process by its pid. * @@ -499,7 +474,7 @@ declare namespace appManager { * Obtains memory usage of one process by its pid. * * @param { number } pid - Indicates the pid of the process. - * @param { AsyncCallback } - Indicates the callback of getting process memory by pid result. + * @param { AsyncCallback } callback - Indicates the callback of getting process memory by pid result. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 16000050 - Internal error. @@ -513,7 +488,7 @@ declare namespace appManager { * Obtains the process information list of running processes that belong to a specific bundle of current user. * * @param { string } bundleName - Indicates the bundle name of the application to which the processes belong to. - * @param { AsyncCallback> } - Indicates the callback of getting process information by bundleName result. + * @param { AsyncCallback> } callback - Indicates the callback of getting process information by bundleName result. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 16000050 - Internal error. @@ -528,7 +503,7 @@ declare namespace appManager { * * @param { string } bundleName - Indicates the bundle name of the application to which the processes belong to. * @param { number } userId - Indicates the user ID of the application to which the processes belong to. - * @param { AsyncCallback> } - Indicates the callback of getting process information by bundleName result. + * @param { AsyncCallback> } callback - Indicates the callback of getting process information by bundleName result. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 16000050 - Internal error. @@ -542,7 +517,7 @@ declare namespace appManager { * Obtains the process information list of running processes that belong to a specific bundle of current user. * * @param { string } bundleName - Indicates the bundle name of the application to which the processes belong to. - * @returns { Promise> } - Returns a list of process information. + * @returns { Promise> } Returns a list of process information. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 16000050 - Internal error. @@ -557,7 +532,7 @@ declare namespace appManager { * * @param { string } bundleName - Indicates the bundle name of the application to which the processes belong to. * @param { number } userId - Indicates the user ID of the application to which the processes belong to. - * @returns { Promise> } - Returns a list of process information. + * @returns { Promise> } Returns a list of process information. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 16000050 - Internal error. @@ -601,14 +576,6 @@ declare namespace appManager { * @since 9 */ export type ProcessInformation = _ProcessInformation; - - /** - * The system low memory state observer. - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @systemapi - * @since 10 - */ - export type LowMemoryObserver = _LowMemoryObserver; } export default appManager; diff --git a/api/application/LowMemoryObserver.d.ts b/api/application/LowMemoryObserver.d.ts deleted file mode 100644 index 826e39aba..000000000 --- a/api/application/LowMemoryObserver.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2023 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * The system low memory state observer. - * - * @interface LowMemoryObserver - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @systemapi - * @since 10 - */ -export interface LowMemoryObserver { - - /** - * Will be called when system low memory state is notified. - * - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @systemapi - * @since 10 - */ - onLowMemoryNotified(): void; -} \ No newline at end of file