diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts index 8a45e0a3543f847dd05525930676268e21c42158..37390fd1788595c4f61a03fe88964b0e4b5b6f29 100644 --- a/api/@ohos.bundle.d.ts +++ b/api/@ohos.bundle.d.ts @@ -417,7 +417,7 @@ declare namespace bundle { */ function getBundleInstaller(callback: AsyncCallback): void; function getBundleInstaller(): Promise; - + /** * Obtains information about the current ability. * @@ -679,6 +679,48 @@ declare namespace bundle { */ function isModuleRemovable(bundleName: string, moduleName: string, callback: AsyncCallback): void; function isModuleRemovable(bundleName: string, moduleName: string): Promise; + + /** + * Obtains information about the current ability. + * + * @since 9 + * @syscap SystemCapability.BundleManager.BundleFramework + * @param bundleName Indicates the application bundle name to be queried. + * @param moduleName Indicates the module name. + * @param abilityName Indicates the ability name. + * @return Returns the AbilityInfo object for the current ability. + * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO + */ + function getAbilityInfo(bundleName: string, moduleName: string, abilityName: string, callback: AsyncCallback): void; + function getAbilityInfo(bundleName: string, moduleName: string, abilityName: string): Promise; + + /** + * Obtains the label of a specified ability. + * + * @since 9 + * @syscap SystemCapability.BundleManager.BundleFramework + * @param bundleName Indicates the bundle name of the application to which the ability belongs. + * @param moduleName Indicates the module name. + * @param abilityName Indicates the ability name. + * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO + * @return Returns the label representing the label of the specified ability. + */ + function getAbilityLabel(bundleName: string, moduleName: string, abilityName: string, callback: AsyncCallback): void; + function getAbilityLabel(bundleName: string, moduleName: string, abilityName: string): Promise; + + /** + * Obtains the icon of a specified ability. + * + * @since 9 + * @syscap SystemCapability.BundleManager.BundleFramework + * @param bundleName Indicates the bundle name of the application to which the ability belongs. + * @param moduleName Indicates the module name. + * @param abilityName Indicates the ability name. + * @return Returns the PixelMap object representing the icon of the specified ability. + * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO + */ + function getAbilityIcon(bundleName: string, moduleName: string, abilityName: string, callback: AsyncCallback): void; + function getAbilityIcon(bundleName: string, moduleName: string, abilityName: string): Promise; } export default bundle;