From cb77f2c52c0ae1264ed2b88acc97c0f93971c694 Mon Sep 17 00:00:00 2001 From: hongjianfeng Date: Tue, 1 Jul 2025 16:01:14 +0800 Subject: [PATCH] =?UTF-8?q?backgroundprocessmanager=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=BC=94=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hongjianfeng --- ...urceschedule.backgroundProcessManager.d.ts | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/api/@ohos.resourceschedule.backgroundProcessManager.d.ts b/api/@ohos.resourceschedule.backgroundProcessManager.d.ts index 8e8c321e1d..cf7bd44fb1 100644 --- a/api/@ohos.resourceschedule.backgroundProcessManager.d.ts +++ b/api/@ohos.resourceschedule.backgroundProcessManager.d.ts @@ -16,6 +16,7 @@ /** * @file * @kit BackgroundTasksKit + * @arkts 1.1&1.2 */ /** @@ -23,22 +24,25 @@ * * @namespace backgroundProcessManager * @syscap SystemCapability.Resourceschedule.BackgroundProcessManager - * @since 15 + * @since arkts{ '1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace backgroundProcessManager { /** * Describes the level of BackgroundProcessManager priority. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Resourceschedule.BackgroundProcessManager - * @since 15 + * @since arkts{ '1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ export enum ProcessPriority { /** * Means the process has stopped working and in the background * * @syscap SystemCapability.Resourceschedule.BackgroundProcessManager - * @since 15 + * @since arkts{ '1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ PROCESS_BACKGROUND = 1, @@ -46,7 +50,8 @@ declare namespace backgroundProcessManager { * Means the process is working in the background * * @syscap SystemCapability.Resourceschedule.BackgroundProcessManager - * @since 15 + * @since arkts{ '1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ PROCESS_INACTIVE = 2, } @@ -54,26 +59,26 @@ declare namespace backgroundProcessManager { /** * Set the priority of process. * - * @param { number } pid - Indicates the pid of the process to be set. + * @param { int } pid - Indicates the pid of the process to be set. * @param { ProcessPriority } priority - Indicates the priority to set. Specific priority can be referenced ProcessPriority * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: priority is out of range. - * @throws { BusinessError } 31800001 - remote error. Possible causes: remote is not work. * @syscap SystemCapability.Resourceschedule.BackgroundProcessManager - * @since 15 + * @since arkts{ '1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ - function setProcessPriority(pid: number, priority: ProcessPriority): Promise; + function setProcessPriority(pid: int, priority: ProcessPriority): Promise; /** * Reset the priority of process. * - * @param { number } pid - Indicates the pid of the process to be reset. + * @param { int } pid - Indicates the pid of the process to be reset. * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 31800001 - remote error. Possible causes: remote is not work. * @syscap SystemCapability.Resourceschedule.BackgroundProcessManager - * @since 15 + * @since arkts{ '1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ - function resetProcessPriority(pid: number): Promise; + function resetProcessPriority(pid: int): Promise; } export default backgroundProcessManager; -- Gitee