diff --git a/api/@ohos.bundle.bundleManager.d.ts b/api/@ohos.bundle.bundleManager.d.ts index 1f1b72f18896a08915e72f5939bfc43d2cb86845..45bba75f0f4a78aa0426dea28831ccf18138b4c7 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