Fix update hide logic 35/203635/1
authorhyunho <hhstark.kang@samsung.com>
Tue, 16 Apr 2019 09:53:56 +0000 (18:53 +0900)
committerhyunho <hhstark.kang@samsung.com>
Tue, 16 Apr 2019 09:53:56 +0000 (18:53 +0900)
Without this patch, DPMReporter will unintentionally skip event
which hide viewer list is empty

Change-Id: I1216dd6e5be63cec9aa78c851d8ff71151f8d929
Signed-off-by: hyunho <hhstark.kang@samsung.com>
src/notification_ex_service.cc

index a1d94f0..34670a2 100755 (executable)
@@ -143,6 +143,9 @@ class DPMReporter : public Reporter {
     int ret;
     string hide_list;
     int uid = static_pointer_cast<IItemInfoInternal>(updatedItem->GetInfo())->GetUid();
+    DBG("try update hide app_id(%s) sender(%s) uid(%s)",
+      updatedItem->GetId().c_str(),
+      updatedItem->GetSenderAppId().c_str(), string(to_string(uid)).c_str());
     string map_key = updatedItem->GetId() + updatedItem->GetSenderAppId() + string(to_string(uid));
     list<string> updated_hide_list = static_pointer_cast<IItemInfoInternal>(updatedItem->GetInfo())->GetHideViewerList();
 
@@ -159,6 +162,9 @@ class DPMReporter : public Reporter {
 
         facade_->hide_map_[map_key] = hide_list;
         return ERROR_NONE;
+      } else {
+        DBG("Empty hide viewer list");
+        return ERROR_NOT_EXIST_ID;
       }
     }