mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-10-07 22:24:20 +00:00
去除低内存监控接口
Signed-off-by: shaoxianqiang <1018410944@qq.com>
This commit is contained in:
parent
85d008f35f
commit
32f51d5332
43
api/@ohos.app.ability.appManager.d.ts
vendored
43
api/@ohos.app.ability.appManager.d.ts
vendored
@ -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;
|
||||
|
34
api/application/LowMemoryObserver.d.ts
vendored
34
api/application/LowMemoryObserver.d.ts
vendored
@ -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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user