From ff96dbab1d002e1afd587d768fad4580fd3d18b9 Mon Sep 17 00:00:00 2001 From: wanghang Date: Thu, 25 Aug 2022 20:32:49 +0800 Subject: [PATCH] IssueNo:#I5O5U7 Description:add getApplicationInfoSync getBundleInfoSync Sig:SIG_ApplicaitonFramework Feature or Bugfix:Feature Binary Source:No Signed-off-by: wanghang Change-Id: Ie78914283b720a627794b4fb4490b013625105c5 --- api/@ohos.bundle.d.ts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts index 11ebcb70bd..9d2bfd75d3 100644 --- a/api/@ohos.bundle.d.ts +++ b/api/@ohos.bundle.d.ts @@ -929,6 +929,36 @@ declare namespace bundle { function getDisposedStatus(bundleName: string, callback: AsyncCallback): void; function getDisposedStatus(bundleName: string): Promise; + /** + * Obtains based on a given bundleName and bundleFlags. + * + * @since 9 + * @syscap SystemCapability.BundleManager.BundleFramework + * @param bundleName Indicates the application bundle name to be queried. + * @param bundleFlags Indicates the flag used to specify information contained in the ApplicationInfo object + * that will be returned. + * @param userId Indicates the user ID or do not pass user ID. + * @return Returns the ApplicationInfo object. + * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO + */ + function getApplicationInfoSync(bundleName: string, bundleFlags: number, userId: number) : ApplicationInfo; + function getApplicationInfoSync(bundleName: string, bundleFlags: number) : ApplicationInfo; + + /** + * Obtains bundleInfo based on bundleName, bundleFlags and options. + * + * @since 9 + * @syscap SystemCapability.BundleManager.BundleFramework + * @param bundleName Indicates the application bundle name to be queried. + * @param bundleFlags Indicates the flag used to specify information contained in the BundleInfo object + * that will be returned. + * @param options Indicates the bundle options object. + * @return Returns the BundleInfo object. + * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO + */ + function getBundleInfoSync(bundleName: string, bundleFlags: number, options: BundleOptions): BundleInfo; + function getBundleInfoSync(bundleName: string, bundleFlags: number): BundleInfo; + /** * Obtains configuration information about an application. * -- Gitee