From 757eccbb746f3e5049a55dd1a9e401ba71dd5817 Mon Sep 17 00:00:00 2001 From: xuchenghua Date: Sat, 5 Mar 2022 15:11:43 +0800 Subject: [PATCH] fixed caada4e from https://gitee.com/uniquexch/interface_sdk-js/pulls/932 xuchenghua09@huawei.com Signed-off-by: xuchenghua --- api/@ohos.app.abilityManager.d.ts | 103 -------------------------- api/@ohos.application.appManager.d.ts | 20 ++++- 2 files changed, 19 insertions(+), 104 deletions(-) delete mode 100644 api/@ohos.app.abilityManager.d.ts diff --git a/api/@ohos.app.abilityManager.d.ts b/api/@ohos.app.abilityManager.d.ts deleted file mode 100644 index 8dc9575ac0..0000000000 --- a/api/@ohos.app.abilityManager.d.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2021 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. - */ - -import { AsyncCallback } from './basic'; -import { AbilityMissionInfo } from './app/abilityMissionInfo'; -import { ActiveProcessInfo } from './app/activeProcessInfo'; -import { MissionSnapshot } from './app/missionSnapshot'; - -/** - * This module provides the capability to manage abilities and obtaining system task information. - * - * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @import import abilityManager from '@ohos.app.abilityManager' - * @permission N/A - */ -declare namespace abilityManager { - - enum ProcessErrCode { - NO_ERROR = 0, - CRASHED, - NO_RESPONSE, - } - - - /** - * Get information about running processes - * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @return a list of ActiveProcessInfo records describing each process. - * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION - * @systemapi hide this for inner system use - */ - function getActiveProcessInfos(): Promise>; - function getActiveProcessInfos(callback: AsyncCallback>): void; - - /** - * Get information about the running ability missions - * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param upperLimit The maximum number of mission infos to return in the array. - * @return an array of AbilityMissionInfo records describing each active mission. - * @permission ohos.permission.ACCESS_MISSIONS - * @systemapi hide this for inner system use - */ - function getActiveAbilityMissionInfos(upperLimit: number): Promise>; - function getActiveAbilityMissionInfos(upperLimit: number, callback: AsyncCallback>): void; - - /** - * Get information about recently run missions - * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param upperLimit The maximum number of previous mission infos to return in the array. - * @return an array of AbilityMissionInfo records describing each of the previous mission. - * @permission ohos.permission.ACCESS_MISSIONS_EXTRA - * @systemapi hide this for inner system use - */ - function getPreviousAbilityMissionInfos(upperLimit: number): Promise>; - function getPreviousAbilityMissionInfos(upperLimit: number, callback: AsyncCallback>): void; - - /** - * Delete the specified missions - * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param missionIds An array of missions, representing the missions that need to be deleted. - * @permission ohos.permission.DELETE_MISSIONS - * @systemapi hide this for inner system use - */ - function deleteMissions(missionIds: Array): Promise; - function deleteMissions(missionIds: Array, callback: AsyncCallback): void; - - /** - * Is it a ram-constrained device - * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @return whether a ram-constrained device. - */ - function isRamConstrainedDevice(): Promise; - function isRamConstrainedDevice(callback: AsyncCallback): void; - - /** - * Get the memory size of the application - * @since 7 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @return application memory size. - */ - function getAppMemorySize(): Promise; - function getAppMemorySize(callback: AsyncCallback): void; -} - -export default abilityManager; diff --git a/api/@ohos.application.appManager.d.ts b/api/@ohos.application.appManager.d.ts index b6956e4857..7794e86189 100644 --- a/api/@ohos.application.appManager.d.ts +++ b/api/@ohos.application.appManager.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 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 @@ -117,6 +117,24 @@ declare namespace appManager { */ function clearUpApplicationData(bundleName: string): Promise; function clearUpApplicationData(bundleName: string, callback: AsyncCallback); + + /** + * Is it a ram-constrained device + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @return whether a ram-constrained device. + */ + function isRamConstrainedDevice(): Promise; + function isRamConstrainedDevice(callback: AsyncCallback): void; + + /** + * Get the memory size of the application + * @since 7 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @return application memory size. + */ + function getAppMemorySize(): Promise; + function getAppMemorySize(callback: AsyncCallback): void; } export default appManager; -- Gitee