From 078e7fafe93dd348bcde6d3bcf8279c102729a91 Mon Sep 17 00:00:00 2001 From: chenjiabao Date: Tue, 19 Dec 2023 10:03:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=80=9A=E7=9F=A5=E5=BC=B9?= =?UTF-8?q?=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chenjiabao Change-Id: Iad40018a279c21d063f640561635d8d7b7aef7cb --- .../entry/src/main/ets/pages/notificationDialog.ets | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/dialog_ui/enable_notification_dialog/entry/src/main/ets/pages/notificationDialog.ets b/services/dialog_ui/enable_notification_dialog/entry/src/main/ets/pages/notificationDialog.ets index 10da675e4..8645ed5bd 100644 --- a/services/dialog_ui/enable_notification_dialog/entry/src/main/ets/pages/notificationDialog.ets +++ b/services/dialog_ui/enable_notification_dialog/entry/src/main/ets/pages/notificationDialog.ets @@ -27,6 +27,7 @@ const permission: Record = { 'icon': $r('app.media.ic_public_ring'), 'reason': $r('app.string.reason'), }; +const moduleName = 'entry'; const bottomPopoverTypes = ['default', 'phone']; let storage = LocalStorage.getShared(); @@ -170,7 +171,7 @@ struct PermissionDialog { let applicationInfo = await bundleManager.getApplicationInfo(bundleName, bundleManager.ApplicationFlag.GET_APPLICATION_INFO_DEFAULT); let extensionContext = AppStorage.Get('context') as Context; - let context = extensionContext.createBundleContext(bundleName); + let context = extensionContext.createModuleContext(bundleName, moduleName); let appName = context.resourceManager.getStringSync(applicationInfo.labelId); this.appName = titleTrim(appName); console.info(TAG, `hap label: ${applicationInfo.label}, value ${this.appName}`); -- Gitee