TizenRefApp-9423 Fix svace issues [notifications] 00/152300/2 submit/tizen_4.0/20170927.133453 submit/tizen_4.0/20170927.150321
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Mon, 25 Sep 2017 13:24:01 +0000 (16:24 +0300)
committerDenis Dolzhenko <d.dolzhenko@samsung.com>
Wed, 27 Sep 2017 10:58:55 +0000 (13:58 +0300)
Change-Id: I50f12ced907163053b15bd7c1a35e7c9e5af8e2d
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
src/common-efl.c
src/main.c
src/set-schedule-info.c

index f8d99d9..d554b6f 100755 (executable)
@@ -539,7 +539,6 @@ static Evas_Object *_gl_full_content_get_cb(void *data, Evas_Object *obj, const
 
 static void _gl_full_content_del_cb(void *data, Evas_Object *obj)
 {
-       ret_if(!data);
        free(data);
 }
 
index 5829388..c6a99df 100755 (executable)
@@ -202,7 +202,7 @@ static void _create_notif_on_lock_screen_view(void *data)
        Evas_Object *layout = _create_lockscreen_content(u_data);
 
        /* Push to naviframe */
-       u_data->navi_item = elm_naviframe_item_push(u_data->naviframe, strdup(APP_STRING("IDS_QP_HEADER_LOCK_SCREEN_CONTENT_ABB")), NULL, NULL, layout, NULL);
+       u_data->navi_item = elm_naviframe_item_push(u_data->naviframe, APP_STRING("IDS_QP_HEADER_LOCK_SCREEN_CONTENT_ABB"), NULL, NULL, layout, NULL);
        elm_naviframe_item_pop_cb_set(u_data->navi_item, _notifiacation_setting_main_pop_cb, u_data);
 
        /* Title Cancel Button */
@@ -297,9 +297,11 @@ static void on_destroy(void *priv)
 {
        NOTISET_TRACE_BEGIN;
        ug_data *ugd = priv;
+       update_apps_settings_info();
        remove_apps_noti_allowed_list();
        remove_apps_noti_blocked_list();
-       update_apps_settings_info();
+       remove_lower_noti_list();
+       remove_excepted_apps_list();
        free(ugd);
 }
 
index 1bc9b10..df8d6f3 100755 (executable)
@@ -107,6 +107,7 @@ static char *get_formatted_date(const char *locale, const char *best_pattern, ti
 static char *make_time_string(time_t curr_time);
 static void calc_label_size(Evas_Object *label);
 static void show_user_change_schedule_popup();
+static void _on_week_button_free(void *data, Evas *e, Evas_Object *obj, void *event_info);
 
 static bool is_current_time_in_scheduled_time_range()
 {
@@ -241,6 +242,7 @@ static char *get_formatted_date(const char *locale, const char *best_pattern, ti
 
        /* get current timezone and set as default timezone */
        i18n_ustring_copy_ua_n(u_timezone_id, time_zone, safe_str_len(time_zone));
+       free(time_zone);
 
        status = i18n_ucalendar_set_default_timezone(u_timezone_id);
        if (status != I18N_ERROR_NONE)
@@ -517,6 +519,11 @@ static void week_button_clicked_cb(void *data, Evas_Object *obj, void *event_inf
        update_system_settings();
 }
 
+static void _on_week_button_free(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       free(data); // changecolor_s
+}
+
 static Evas_Object *create_week_button(Evas_Object *parent, const char *text, dnd_schedule_week_flag_e week)
 {
        /*add buttons*/
@@ -549,6 +556,7 @@ static Evas_Object *create_week_button(Evas_Object *parent, const char *text, dn
        calc_label_size(label);
        evas_object_show(label);
 
+       evas_object_event_callback_add(button, EVAS_CALLBACK_FREE, _on_week_button_free, cc);
        evas_object_smart_callback_add(button, "clicked", week_button_clicked_cb, cc);
        elm_object_content_set(button, label);
        evas_object_show(button);
@@ -566,7 +574,7 @@ static Evas_Object *repeat_weekly_layout_cb(Evas_Object* parent, void *data)
        evas_object_size_hint_weight_set(text, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_size_hint_align_set(text, EVAS_HINT_FILL, EVAS_HINT_FILL);
        snprintf(buf, sizeof(buf), "<font=Sans:style=Light font_size=40>%s</font>", APP_STRING("IDS_ST_BODY_REPEAT_WEEKLY_ABB"));
-       elm_object_text_set(text, strdup(buf));
+       elm_object_text_set(text, buf);
        elm_object_part_content_set(layout, "elm.swallow.text", text);
        evas_object_show(text);