From 2c4084a8a901c82e68ffe6459a5a314b773e5f39 Mon Sep 17 00:00:00 2001 From: fangJinliang1 Date: Wed, 23 Feb 2022 11:30:34 +0800 Subject: [PATCH] Comment add permission Signed-off-by: fangJinliang1 Change-Id: I00436ef3dd9f7d21b760d0b0d2d3af4140d17a59 Signed-off-by: fangJinliang1 --- api/@ohos.notification.d.ts | 14 ++++++++++++++ api/notification/notificationRequest.d.ts | 1 + 2 files changed, 15 insertions(+) diff --git a/api/@ohos.notification.d.ts b/api/@ohos.notification.d.ts index 4bee96a628..7583b96949 100644 --- a/api/@ohos.notification.d.ts +++ b/api/@ohos.notification.d.ts @@ -55,6 +55,8 @@ declare namespace notification { * @since 8 * @param Publishes a notification. * @param userId of subscriber receiving the notification + * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER * */ function publish(request: NotificationRequest, userId: number, callback: AsyncCallback): void; @@ -91,6 +93,7 @@ declare namespace notification { * This parameter must be specified. * @param callback callback function * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function addSlot(slot: NotificationSlot, callback: AsyncCallback): void; @@ -101,6 +104,7 @@ declare namespace notification { * This parameter must be specified. * * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function addSlot(slot: NotificationSlot): Promise; @@ -130,6 +134,7 @@ declare namespace notification { * This parameter must be specified. * * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function addSlots(slots: Array): Promise; @@ -339,6 +344,7 @@ declare namespace notification { * isNotificationEnabled * * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function isNotificationEnabled(callback: AsyncCallback): void; @@ -347,6 +353,7 @@ declare namespace notification { * * since 8 * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function isNotificationEnabled(userId: number, callback: AsyncCallback): void; function isNotificationEnabled(userId: number): Promise; @@ -355,6 +362,7 @@ declare namespace notification { * isNotificationEnabled * * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function isNotificationEnabled(): Promise; @@ -362,6 +370,7 @@ declare namespace notification { * displayBadge * * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function displayBadge(bundle: BundleOption, enable: boolean, callback: AsyncCallback): void; @@ -369,6 +378,7 @@ declare namespace notification { * displayBadge * * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function displayBadge(bundle: BundleOption, enable: boolean): Promise; @@ -376,6 +386,7 @@ declare namespace notification { * isBadgeDisplayed * * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function isBadgeDisplayed(bundle: BundleOption, callback: AsyncCallback): void; @@ -383,6 +394,7 @@ declare namespace notification { * isBadgeDisplayed * * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function isBadgeDisplayed(bundle: BundleOption): Promise; @@ -422,6 +434,7 @@ declare namespace notification { * getSlotNumByBundle * * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function getSlotNumByBundle(bundle: BundleOption, callback: AsyncCallback): void; @@ -429,6 +442,7 @@ declare namespace notification { * getSlotNumByBundle * * @systemapi Hide this for inner system use. + * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function getSlotNumByBundle(bundle: BundleOption): Promise; diff --git a/api/notification/notificationRequest.d.ts b/api/notification/notificationRequest.d.ts index f707426293..baed6e5467 100644 --- a/api/notification/notificationRequest.d.ts +++ b/api/notification/notificationRequest.d.ts @@ -163,6 +163,7 @@ export interface NotificationRequest { readonly creatorPid?: number; /** + * @since 8 * Read-only UserId of the notification creator. */ readonly creatorUserId?: number; -- Gitee