From 916b5393377dc1d0f596e014315e3f50065b844e Mon Sep 17 00:00:00 2001 From: wangtiantian Date: Mon, 18 Apr 2022 19:27:16 +0800 Subject: [PATCH] IssueNo: #I53COF:add moduleName interface Description: add moduleName interface Sig:SIG_ApplicaitonFramework Feature or Bugfix:BugFix Binary Source:No Signed-off-by: wangtiantian --- api/@ohos.bundle.d.ts | 44 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts index 8a45e0a354..37390fd178 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; -- Gitee