From 776043669956ebf498df6aef58f997c413f04ea8 Mon Sep 17 00:00:00 2001 From: songbao1 Date: Fri, 13 Sep 2024 17:04:08 +0800 Subject: [PATCH] =?UTF-8?q?cherry=20pick=202203b2d=20from=20https://gitee.?= =?UTF-8?q?com/songbao1/notification=5Fdistributed=5Fnotification=5Fservic?= =?UTF-8?q?e/pulls/2223=20cherry=20pick=20077996a=20from=20https://gitee.c?= =?UTF-8?q?om/songbao1/notification=5Fdistributed=5Fnotification=5Fservice?= =?UTF-8?q?/pulls/2192=20=E5=9B=BE=E7=89=87=E8=BD=AC=E6=8D=A2=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: songbao1 --- frameworks/ans/src/notification_request.cpp | 2 ++ frameworks/core/src/ans_subscriber_proxy.cpp | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/frameworks/ans/src/notification_request.cpp b/frameworks/ans/src/notification_request.cpp index 1d7a5b445..5245001ec 100644 --- a/frameworks/ans/src/notification_request.cpp +++ b/frameworks/ans/src/notification_request.cpp @@ -304,6 +304,8 @@ void NotificationRequest::SetLittleIcon(const std::shared_ptr & Media::ImageInfo outImageInfo; littleIcon->GetImageInfo(outImageInfo); littleIconType_ = outImageInfo.encodedFormat; + } else { + littleIconType_ = ""; } } diff --git a/frameworks/core/src/ans_subscriber_proxy.cpp b/frameworks/core/src/ans_subscriber_proxy.cpp index 53e283ab9..941f8d779 100644 --- a/frameworks/core/src/ans_subscriber_proxy.cpp +++ b/frameworks/core/src/ans_subscriber_proxy.cpp @@ -241,8 +241,9 @@ void AnsSubscriberProxy::OnCanceledList(const std::vector> &n for (size_t i = 0; i < notifications.size(); i ++) { sptr notification = notifications[i]; - notification->GetNotificationRequest().SetBigIcon(nullptr); - notification->GetNotificationRequest().SetLittleIcon(nullptr); + notification->GetNotificationRequestPoint()->SetBigIcon(nullptr); + notification->GetNotificationRequestPoint()->SetLittleIcon(nullptr); + notification->GetNotificationRequestPoint()->SetOverlayIcon(nullptr); } if (!WriteParcelableVector(notifications, data)) { ANS_LOGE("Write notifications failed"); -- Gitee