From f39feab052a93b95ffbaef808bf649b04b053ddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E4=BC=9F?= Date: Thu, 27 Mar 2025 11:32:20 +0000 Subject: [PATCH] update api/@ohos.resourceschedule.backgroundTaskManager.d.ts. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 胡伟 --- ...esourceschedule.backgroundTaskManager.d.ts | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/api/@ohos.resourceschedule.backgroundTaskManager.d.ts b/api/@ohos.resourceschedule.backgroundTaskManager.d.ts index 30b520de7a..91891d9cd2 100644 --- a/api/@ohos.resourceschedule.backgroundTaskManager.d.ts +++ b/api/@ohos.resourceschedule.backgroundTaskManager.d.ts @@ -390,6 +390,23 @@ declare namespace backgroundTaskManager { * @atomicservice * @since 12 */ + /** + * Service ability uses this method to request stop running in background. + * + * @param { Context } context - App running context. + * @param { AsyncCallback } callback - The callback of the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * @throws { BusinessError } 9800001 - Memory operation failed. + * @throws { BusinessError } 9800002 - Parcel operation failed. + * @throws { BusinessError } 9800003 - Internal transaction failed. + * @throws { BusinessError } 9800004 - System service operation failed. + * @throws { BusinessError } 9800005 - Continuous task verification failed. + * @throws { BusinessError } 9800006 - Notification verification failed for a continuous task. + * @throws { BusinessError } 9800007 - Continuous task storage failed. + * @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask + * @atomicservice + * @since 17 + */ function stopBackgroundRunning(context: Context, callback: AsyncCallback): void; /** @@ -427,6 +444,23 @@ declare namespace backgroundTaskManager { * @atomicservice * @since 12 */ + /** + * Service ability uses this method to request stop running in background. + * + * @param { Context } context - App running context. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * @throws { BusinessError } 9800001 - Memory operation failed. + * @throws { BusinessError } 9800002 - Parcel operation failed. + * @throws { BusinessError } 9800003 - Internal transaction failed. + * @throws { BusinessError } 9800004 - System service operation failed. + * @throws { BusinessError } 9800005 - Continuous task verification failed. + * @throws { BusinessError } 9800006 - Notification verification failed for a continuous task. + * @throws { BusinessError } 9800007 - Continuous task storage failed. + * @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask + * @atomicservice + * @since 17 + */ function stopBackgroundRunning(context: Context): Promise; /**