diff --git a/frameworks/ans/src/notification_request.cpp b/frameworks/ans/src/notification_request.cpp index 1d7a5b445e668605561e4de79912b55e7243e382..5245001ec3f3c068e02bb45af97b6935235952ef 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 53e283ab9e7838b75515bf843fe14806d81bf3bf..941f8d7799ed67f679fcf979c3c728e34f1a25ac 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");