diff --git a/services/ans/src/advanced_notification_service.cpp b/services/ans/src/advanced_notification_service.cpp index 484f975bcc06bbe50399495425d8aae2334ec599..eb2b4d0c7a49502a06966bceec9221764cfd7499 100644 --- a/services/ans/src/advanced_notification_service.cpp +++ b/services/ans/src/advanced_notification_service.cpp @@ -1141,6 +1141,10 @@ ErrCode AdvancedNotificationService::RemoveFromNotificationList( return ERR_ANS_NOTIFICATION_IS_UNREMOVABLE; } notification = record->notification; + // delete or delete all, call the function + if (!isCancel) { + TriggerRemoveWantAgent(record->request); + } notificationList_.remove(record); return ERR_OK; }