From 02d7884882e6469a0591db28d6c73b029c9bf422 Mon Sep 17 00:00:00 2001 From: wangtiantian Date: Wed, 18 Jun 2025 10:57:42 +0800 Subject: [PATCH] IssueNo:#ICFZBR Description:fix enableDynamicIcon Sig:SIG_ApplicaitonFramework Feature or Bugfix:Bugfix Binary Source:No Signed-off-by: wangtiantian --- api/@ohos.bundle.bundleManager.d.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/api/@ohos.bundle.bundleManager.d.ts b/api/@ohos.bundle.bundleManager.d.ts index 1f1b72f188..45bba75f0f 100644 --- a/api/@ohos.bundle.bundleManager.d.ts +++ b/api/@ohos.bundle.bundleManager.d.ts @@ -3762,6 +3762,24 @@ declare namespace bundleManager { * @systemapi * @since 12 */ + /** + * Enable dynamic icon. + * + * @permission ohos.permission.ACCESS_DYNAMIC_ICON + * @param { string } bundleName - Indicates the bundleName. + * @param { string } moduleName - Indicates the moduleName for extend resource. + * @returns { Promise } Returns enableDynamicIcon result. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Permission denied, non-system app called system api. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. + * @throws { BusinessError } 17700001 - The specified bundleName is not found. + * @throws { BusinessError } 17700002 - The specified moduleName is not found. + * @throws { BusinessError } 17700304 - Failed to enable the dynamic icon. + * @throws { BusinessError } 17700307 - Dynamic icons cannot take effect due to existing custom themes. + * @syscap SystemCapability.BundleManager.BundleFramework.Core + * @systemapi + * @since 20 + */ function enableDynamicIcon(bundleName: string, moduleName: string): Promise; /** @@ -3783,6 +3801,7 @@ declare namespace bundleManager { * @throws { BusinessError } 17700004 - The specified user ID is not found. * @throws { BusinessError } 17700061 - AppIndex not in valid range. * @throws { BusinessError } 17700304 - Failed to enable the dynamic icon. + * @throws { BusinessError } 17700307 - Dynamic icons cannot take effect due to existing custom themes. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 -- Gitee