去除低内存监控接口

Signed-off-by: shaoxianqiang <1018410944@qq.com>
This commit is contained in:
shaoxianqiang 2023-06-26 00:07:47 +08:00
parent 85d008f35f
commit 32f51d5332
2 changed files with 5 additions and 72 deletions

View File

@ -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<boolean>): 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<number> } - Indicates the callback of getting process memory by pid result.
* @param { AsyncCallback<number> } 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<Array<ProcessInformation>> } - Indicates the callback of getting process information by bundleName result.
* @param { AsyncCallback<Array<ProcessInformation>> } 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<Array<ProcessInformation>> } - Indicates the callback of getting process information by bundleName result.
* @param { AsyncCallback<Array<ProcessInformation>> } 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<Array<ProcessInformation>> } - Returns a list of process information.
* @returns { Promise<Array<ProcessInformation>> } 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<Array<ProcessInformation>> } - Returns a list of process information.
* @returns { Promise<Array<ProcessInformation>> } 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;

View File

@ -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;
}