diff --git a/api/@ohos.app.ability.autoStartupManager.d.ts b/api/@ohos.app.ability.autoStartupManager.d.ts index 7efb74a216233c0853a99461c5081979dc0fa28b..07a40c363238e835dc5566941ccb104de236c101 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 - The specified SystemCapability name was not found. + * @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;