From 319ec3fd0e5d5cd9a650134fdf34f8a3552484a1 Mon Sep 17 00:00:00 2001 From: "mk5004.lee" Date: Fri, 13 Mar 2020 17:58:25 +0900 Subject: [PATCH] Add delete by appid func Change-Id: I0d58d173371ac4d9ffb96f1396f6db6b5118817b Signed-off-by: mk5004.lee --- src/notification_ex_service.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/notification_ex_service.cc b/src/notification_ex_service.cc index 51b04fe..5603c2b 100644 --- a/src/notification_ex_service.cc +++ b/src/notification_ex_service.cc @@ -366,8 +366,13 @@ class DPMReporter : public Reporter { shared_ptr deletedItem) { DBG("Delete !!!"); if (info.GetEventType() == IEventInfo::EventType::DeleteAll) { - list> noti_list = - DBManager::GetNotificationList(facade_->GetUid(info), info.GetChannel()); + list> noti_list; + if(!info.GetItemId().empty()) /* The item_id is actually an app_id. */ + noti_list = DBManager::GetNotificationList( + info.GetItemId(), facade_->GetUid(info), ""); + else + noti_list = DBManager::GetNotificationList( + facade_->GetUid(info), info.GetChannel()); for (auto& i : noti_list) { DoDelete(info, i); } -- 2.7.4