From 0b8b754bf94b2470325606eca431fc8642480547 Mon Sep 17 00:00:00 2001 From: songbao1 Date: Wed, 25 Sep 2024 11:45:32 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=B8=9C=E6=B9=96=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: songbao1 --- services/ans/src/advanced_notification_utils.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/services/ans/src/advanced_notification_utils.cpp b/services/ans/src/advanced_notification_utils.cpp index 89ae1e538..6c01927d3 100644 --- a/services/ans/src/advanced_notification_utils.cpp +++ b/services/ans/src/advanced_notification_utils.cpp @@ -68,6 +68,7 @@ namespace { constexpr char DISTRIBUTED_NOTIFICATION_OPTION[] = "distributed"; #endif constexpr int32_t HOURS_IN_ONE_DAY = 24; +constexpr int32_t BROKER_UID = 5557; constexpr char FOUNDATION_BUNDLE_NAME[] = "ohos.global.systemres"; constexpr char ACTIVE_NOTIFICATION_OPTION[] = "active"; constexpr char SET_RECENT_COUNT_OPTION[] = "setRecentCount"; @@ -1700,6 +1701,12 @@ ErrCode AdvancedNotificationService::PrePublishNotificationBySa(const sptrGetCreatorBundleName(); + } else { + bundle = bundleManager->GetBundleNameByUid(uid); + } bundle = bundleManager->GetBundleNameByUid(uid); ErrCode result = SetRequestBundleInfo(request, uid, bundle); if (result != ERR_OK) { -- Gitee From ccbbe9e025e9f9b6cb64421c6fb653b80a8cb84b Mon Sep 17 00:00:00 2001 From: songbao1 Date: Wed, 25 Sep 2024 14:13:43 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=A1=A5=E5=85=85=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: songbao1 --- services/ans/src/advanced_notification_live_view_service.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/ans/src/advanced_notification_live_view_service.cpp b/services/ans/src/advanced_notification_live_view_service.cpp index e614cb808..65994251f 100644 --- a/services/ans/src/advanced_notification_live_view_service.cpp +++ b/services/ans/src/advanced_notification_live_view_service.cpp @@ -651,6 +651,8 @@ void AdvancedNotificationService::UpdateRecordByOwner( } StartFinishTimerForUpdate(record, process); timerId = record->notification->GetFinishTimer(); + ANS_LOGI("TimerForUpdate,oldTimeId:${public},newTimeId:${public}d", + oldRecord->notification->GetFinishTimer(), timerId); } record->notification = new (std::nothrow) Notification(record->request); if (record->notification == nullptr) { -- Gitee From ff67ddacf2bf53f0dd847a30b7557c26bc53a54f Mon Sep 17 00:00:00 2001 From: songbao1 Date: Wed, 25 Sep 2024 15:14:21 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=A1=A5=E5=85=85=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: songbao1 --- services/ans/src/advanced_notification_live_view_service.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/ans/src/advanced_notification_live_view_service.cpp b/services/ans/src/advanced_notification_live_view_service.cpp index 65994251f..c4ae77339 100644 --- a/services/ans/src/advanced_notification_live_view_service.cpp +++ b/services/ans/src/advanced_notification_live_view_service.cpp @@ -651,8 +651,8 @@ void AdvancedNotificationService::UpdateRecordByOwner( } StartFinishTimerForUpdate(record, process); timerId = record->notification->GetFinishTimer(); - ANS_LOGI("TimerForUpdate,oldTimeId:${public},newTimeId:${public}d", - oldRecord->notification->GetFinishTimer(), timerId); + ANS_LOGI("TimerForUpdate,oldTimeId:%{public}d,newTimeId:%{public}d", + (int)(oldRecord->notification->GetFinishTimer()), (int)timerId); } record->notification = new (std::nothrow) Notification(record->request); if (record->notification == nullptr) { -- Gitee