From 6d5bd03d44d19a348bdb1713bfacec442e8b2507 Mon Sep 17 00:00:00 2001 From: shuaiyutao Date: Mon, 21 Feb 2022 19:54:32 +0800 Subject: [PATCH] add getNameForUid function Signed-off-by: shuaiyutao --- api/@ohos.bundle.d.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts index f141e049df..fed71c7724 100644 --- a/api/@ohos.bundle.d.ts +++ b/api/@ohos.bundle.d.ts @@ -457,6 +457,17 @@ declare namespace bundle { function getAllApplicationInfo(bundleFlags: number, userId: number, callback: AsyncCallback>) : void; function getAllApplicationInfo(bundleFlags: number, userId: number) : Promise>; + /** + * Obtains bundle name by the given uid. + * + * @since 8 + * @syscap SystemCapability.BundleManager.BundleFramework + * @param uid Indicates the UID of an application. + * @return Returns the bundle name. + */ + function getNameForUid(uid: number, callback: AsyncCallback) : void + function getNameForUid(uid: number) : Promise; + /** * Obtains information about an application bundle contained in an ohos Ability Package (HAP). * -- Gitee