[TIZENIO-1792]FOTA notification not to be cleared 97/239697/1 submit/tizen/20200729.062416
authorAmritanshu <a.pandia1@samsung.com>
Wed, 29 Jul 2020 05:00:06 +0000 (10:30 +0530)
committerAmritanshu <a.pandia1@samsung.com>
Wed, 29 Jul 2020 05:00:06 +0000 (10:30 +0530)
Change-Id: Ifabcb0ddf1c3b404dde5cd8050c0fd337b390818
Signed-off-by: Amritanshu <a.pandia1@samsung.com>
src/notifications/noti.c

index 9eab186dc1fab89753264a95515a3375260d28b0..fffdd790953b398d7e09a11ade81ad3f6057e574 100755 (executable)
@@ -180,13 +180,17 @@ static int _is_item_deletable(notification_h noti)
        notification_type_e type = NOTIFICATION_TYPE_NONE;
        notification_ly_type_e ly_type = NOTIFICATION_LY_NONE;
        bool ongoing_flag = false;
+       int flag = 0;
 
        notification_get_type(noti, &type);
        notification_get_layout(noti, &ly_type);
        notification_get_ongoing_flag(noti, &ongoing_flag);
+       notification_get_property(noti, &flag);
+       DBG("Notification property type [%d]", flag);
 
        if ((type == NOTIFICATION_TYPE_ONGOING && ongoing_flag) ||
-               (type == NOTIFICATION_TYPE_ONGOING && ly_type == NOTIFICATION_LY_ONGOING_PROGRESS))
+               (type == NOTIFICATION_TYPE_ONGOING && ly_type == NOTIFICATION_LY_ONGOING_PROGRESS) ||
+               (type == NOTIFICATION_TYPE_ONGOING && flag == NOTIFICATION_PROP_PERMANENT_DISPLAY))             //Required by org.tizen.firmware-update-ui app to freeze the notification
                return 0;
 
        return 1;
@@ -1163,7 +1167,6 @@ HAPI void quickpanel_noti_set_clear_all_status()
        if (list_head != NULL)
                notification_free_list(list_head);
 
-
        if (ongoing_cnt == 0 && quickpanel_noti_node_get_item_count(s_info.noti_node, NOTIFICATION_TYPE_NOTI) <= 0) {
                INFO("NOTI SECTION CLEAR ALL DISABLE");
                quickpanel_noti_section_update_clear_button_state(EINA_TRUE);