send-event for Web engine 86/131186/1 submit/tizen/20170530.041414 submit/tizen/20170607.055817 submit/tizen_unified_tpk/20170607.054947
authorjin0.kim <jin0.kim@samsung.com>
Fri, 26 May 2017 00:53:40 +0000 (09:23 +0830)
committerjin0.kim <jin0.kim@samsung.com>
Fri, 26 May 2017 00:54:14 +0000 (09:24 +0830)
Change-Id: I67adde0acad5fa4545fb4d494e81bf2e5332d572

src/notifications/noti.c

index a26ae23..cb9041f 100755 (executable)
@@ -205,7 +205,7 @@ static int _do_noti_delete(notification_h noti)
        int flags = 0, priv_id = 0, flag_delete = 0;
        notification_type_e type = NOTIFICATION_TYPE_NONE;
        int ret = NOTIFICATION_ERROR_INVALID_PARAMETER;
-
+       int ret_event = NOTIFICATION_ERROR_INVALID_PARAMETER;
        quickpanel_media_play_feedback();
 
        retif(noti == NULL, NOTIFICATION_ERROR_INVALID_PARAMETER, "Invalid parameter!");
@@ -224,15 +224,21 @@ static int _do_noti_delete(notification_h noti)
        else
                flag_delete = 1;
 
-       if (flag_delete == 1 && (type == NOTIFICATION_TYPE_NOTI || _is_item_deletable(noti)))
+       if (flag_delete == 1 && (type == NOTIFICATION_TYPE_NOTI || _is_item_deletable(noti))) {
+               ret_event = notification_send_event(noti, NOTIFICATION_EVENT_TYPE_DELETED);
+               if (ret_event != NOTIFICATION_ERROR_NONE) {
+                       DBG("notification_send_event is failed [%d]", ret_event);
+               }
+
                ret = notification_delete_by_priv_id(caller_pkgname, NOTIFICATION_TYPE_NOTI, priv_id);
+       }
 
        return ret;
 }
 
 static void _do_noti_press(notification_h noti, int pressed_area)
 {
-       DBG("launch app");
+       DBG("");
        int ret = APP_CONTROL_ERROR_NONE;
        char *pkgname = NULL;
        char *caller_pkgname = NULL;
@@ -277,6 +283,11 @@ static void _do_noti_press(notification_h noti, int pressed_area)
                        NOTIFICATION_EXECUTE_TYPE_MULTI_LAUNCH,
                        NULL, &multi_service_handle);
 
+       ret = notification_send_event(noti, NOTIFICATION_EVENT_TYPE_PRESSED);
+       if (ret != NOTIFICATION_ERROR_NONE) {
+               DBG("notification_send_event is failed [%d]", ret);
+       }
+
        if (pressed_area == NOTI_PRESS_BUTTON_1 && responding_service_handle != NULL) {
                DBG("");
                quickpanel_uic_close_quickpanel(true, 1);