From 0cf7c99c7c3051ccf4fdcaa55fdcd77e01a22537 Mon Sep 17 00:00:00 2001 From: wangbing Date: Fri, 8 Aug 2025 16:54:02 +0800 Subject: [PATCH] add getAutoStartupStatus Signed-off-by: wangbing --- api/@ohos.app.ability.autoStartupManager.d.ts | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/api/@ohos.app.ability.autoStartupManager.d.ts b/api/@ohos.app.ability.autoStartupManager.d.ts index 7efb74a216..2e500d252a 100644 --- a/api/@ohos.app.ability.autoStartupManager.d.ts +++ b/api/@ohos.app.ability.autoStartupManager.d.ts @@ -30,6 +30,14 @@ import type { AsyncCallback } from './@ohos.base'; * @systemapi * @since 11 */ +/** + * The class of auto startup manager. + * + * @namespace autoStartupManager + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @since 21 + * @arkts 1.1&1.2 + */ declare namespace autoStartupManager { /** * Register the listener that watches for all applications auto startup state. @@ -189,6 +197,21 @@ declare namespace autoStartupManager { * @since 11 */ function queryAllAutoStartupApplications(): Promise>; + + /** + * Retrieves the auto-start status of the current application. + * + * @returns { Promise } Returns {@code true} if the current application has been enabled for + * auto-start on boot by the user; returns {@code false} otherwise. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 16000050 - Internal error. Possible causes: 1. Connect to system service failed; + * 2.System service failed to communicate with dependency module. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @since 21 + * @arkts 1.1&1.2 + */ + function getAutoStartupStatusForSelf(): Promise; } export default autoStartupManager; -- Gitee