TizenRefApp-6938 fixed svace, reduced number of read\write notification settings... 94/83894/1
authorAndrey Klimenko <and.klimenko@samsung.com>
Fri, 12 Aug 2016 14:14:41 +0000 (17:14 +0300)
committerAndrey Klimenko <and.klimenko@samsung.com>
Fri, 12 Aug 2016 14:20:23 +0000 (17:20 +0300)
Change-Id: I41020eca48818eeeba5e9a44f8861b2f8d76c115
Signed-off-by: Andrey Klimenko <and.klimenko@samsung.com>
inc/set-schedule-info.h [moved from inc/set-scedule-info.h with 83% similarity]
src/common-efl.c
src/notification-setting-info.c
src/set-schedule-info.c

similarity index 83%
rename from inc/set-scedule-info.h
rename to inc/set-schedule-info.h
index 02c2a40..1e42749 100644 (file)
@@ -68,4 +68,18 @@ const char *get_day_string();
  */
 int get_time_format();
 
+/**
+ * @brief Loads dnd schedule weekdays bitwise combination.
+ * @return dnd schedule.
+ */
+int load_dnd_schedule_day();
+
+/**
+ * @brief Loads start and end schedule time.
+ * @param[out] start_time_out start time.
+ * @param[out] end_time_out end time.
+ * @return true in case of success, otherwise false.
+ */
+bool load_dnd_schedule_time(struct tm *start_time_out, struct tm *end_time_out);
+
 #endif //__SET_SCHEDULE_INFO_H__
index d09d134..1581f1e 100755 (executable)
@@ -17,7 +17,7 @@
 
 #include "pkgmgr-setting-info.h"
 #include "common-efl.h"
-#include "set-scedule-info.h"
+#include "set-schedule-info.h"
 #include "allowed-calls.h"
 #include "lock_screen_content.h"
 
@@ -420,7 +420,16 @@ static char *_gl_option_text_get_cb(void *data, Evas_Object *obj, const char *pa
         if(!strcmp("elm.text.multiline", part))
         {
             if(get_schedule())
-                snprintf(buf, sizeof(buf), "<font_size=30>%s<br/>%s</font_size>", get_day_string(), get_time_string());
+            {
+                int dndSchedule = load_dnd_schedule_day();
+
+                struct tm start_time;
+                struct tm end_time;
+                load_dnd_schedule_time(&start_time, &end_time);
+
+                snprintf(buf, sizeof(buf), "<font_size=30>%s<br/>%s</font_size>",
+                        get_day_string(dndSchedule), get_time_string(&start_time, &end_time));
+            }
             else
                 snprintf(buf, sizeof(buf), "<font_size=30>%s</font_size>", APP_STRING("WDS_ST_ACBUTTON_OFF_ABB2"));
 
index b47c84b..bc27f71 100755 (executable)
@@ -161,6 +161,7 @@ void create_do_not_disturb_application_list()
                 FREEIF(item_info->icon);
                 FREEIF(item_info);
             }
+
         }
     }
 
index 3537231..e4ba613 100755 (executable)
@@ -15,7 +15,7 @@
  *
  */
 
-#include "set-scedule-info.h"
+#include "set-schedule-info.h"
 #include <system_settings.h>
 #include <time.h>
 #include <notification_setting_internal.h>
@@ -38,8 +38,8 @@ enum TimeFormat
 #define TIME_STRING_SIZE 200
 #define BUTTON_TEXT_SIZE 512
 #define WEEK_BUTTON_SIZE 80
-#define WEEK_MAX_STRING 560
 #define DAY_MAX_LENGTH 80
+#define WEEK_MAX_STRING DAY_MAX_LENGTH * 7
 
 #define GREEN_TEXT_COLOR "<font_size=80><color=#b3b3b3>%s</color></font_size>"
 #define GREY_TEXT_COLOR "<font_size=80><color=#97e57b>%s</color></font_size>"
@@ -61,11 +61,14 @@ typedef struct datetime
     Evas_Object *datetime;
     Evas_Object *popup;
     struct tm saved_time;
+    struct tm default_time;
     bool is_start_time;
 } datetime_s;
 
 datetime_s start_time_p, end_time_p;
-static int day = 0;
+
+static int default_dnd_schedule_weekday = 0;
+static int new_dnd_schedule_weekday = 0;
 
 static void set_set_schedule(bool state);
 static void enable_time_items(bool enable);
@@ -80,19 +83,18 @@ static void launch_popup_cb(void *data , Evas_Object *obj , void *event_info);
 static Evas_Object *create_time_button(Evas_Object *parent, const char *text, const char *format, datetime_s *dt);
 static Evas_Object *create_start_end_time_layout(Evas_Object* parent);
 static void close_set_schedule_cb(void *data, Evas_Object *obj, void *event_info);
-static const char *make_color_text(dnd_schedule_week_flag_e week_day, const char *text);
+static void make_color_text(int dayCode, dnd_schedule_week_flag_e week_day, const char *text, char* outBuf);
+static void save_dnd_weekday(int dayCode);
+static bool same_time(struct tm* timeA, struct tm* timeB);
 
-const char *get_time_string()
+bool load_dnd_schedule_time(struct tm *start_time_out, struct tm *end_time_out)
 {
-    char buff_start[TIME_STRING_SIZE / 2] = {0};
-    char buff_end[TIME_STRING_SIZE / 2] = {0};
-    char buff[TIME_STRING_SIZE] = {0};
-
     time_t local_time = time(0);
     struct tm *time_info = localtime(&local_time);
 
     start_time_p.saved_time = *time_info;
     start_time_p.saved_time.tm_sec = 0;
+
     end_time_p.saved_time = *time_info;
     end_time_p.saved_time.tm_sec = 0;
 
@@ -101,14 +103,16 @@ const char *get_time_string()
     if (err != NOTIFICATION_ERROR_NONE || system_setting == NULL)
     {
         NOTISET_ERR("notification_system_setting_load_system_setting failed [%d]\n", err);
-        return NULL;
+        return false;
     }
+
     notification_system_setting_dnd_schedule_get_start_time(system_setting, &start_time_p.saved_time.tm_hour, &start_time_p.saved_time.tm_min);
     if(start_time_p.saved_time.tm_hour == 0 && start_time_p.saved_time.tm_min == 0)
     {
         start_time_p.saved_time.tm_hour = 22;
         notification_system_setting_dnd_schedule_set_start_time(system_setting, start_time_p.saved_time.tm_hour, start_time_p.saved_time.tm_min);
     }
+
     notification_system_setting_dnd_schedule_get_end_time(system_setting, &end_time_p.saved_time.tm_hour, &end_time_p.saved_time.tm_min);
     if(end_time_p.saved_time.tm_hour == 0 && end_time_p.saved_time.tm_min == 0)
     {
@@ -117,69 +121,89 @@ const char *get_time_string()
     }
 
     notification_system_setting_update_system_setting(system_setting);
-    if (err != NOTIFICATION_ERROR_NONE)
-        NOTISET_ERR("notification_setting_update_setting [%d]\n", err);
-    if(system_setting)
-        notification_system_setting_free_system_setting(system_setting);
+    notification_system_setting_free_system_setting(system_setting);
+
+    start_time_p.default_time = start_time_p.saved_time;
+    end_time_p.default_time = end_time_p.saved_time;
 
+    *start_time_out = start_time_p.default_time;
+    *end_time_out = end_time_p.default_time;
+
+    return true;
+}
+
+const char *get_time_string(struct tm *start_time, struct tm *end_time)
+{
+    char buff_start[TIME_STRING_SIZE / 2] = {0};
+    char buff_end[TIME_STRING_SIZE / 2] = {0};
+    static char buff[TIME_STRING_SIZE] = {0};
 
     if(get_time_format() == time_format_12H)
     {
-        strftime(buff_start, TIME_STRING_SIZE / 2, TIME_12_FORMAT, &start_time_p.saved_time);
-        strftime(buff_end, TIME_STRING_SIZE / 2, TIME_12_FORMAT, &end_time_p.saved_time);
+        strftime(buff_start, TIME_STRING_SIZE / 2, TIME_12_FORMAT, start_time);
+        strftime(buff_end, TIME_STRING_SIZE / 2, TIME_12_FORMAT, end_time);
     }
     else
     {
-        strftime(buff_start, TIME_STRING_SIZE / 2, TIME_24_FORMAT, &start_time_p.saved_time);
-        strftime(buff_end, TIME_STRING_SIZE / 2, TIME_24_FORMAT, &end_time_p.saved_time);
+        strftime(buff_start, TIME_STRING_SIZE / 2, TIME_24_FORMAT, start_time);
+        strftime(buff_end, TIME_STRING_SIZE / 2, TIME_24_FORMAT, end_time);
     }
 
     snprintf(buff, TIME_STRING_SIZE, "%s ~ %s %s", buff_start, buff_end, is_next_day() ? APP_STRING("IDS_ST_SBODY_NEXT_DAY_M_LC_ABB") : "");
-    return strdup(buff);
+    return buff;
 }
 
-static const char *make_color_text(dnd_schedule_week_flag_e week_day, const char *text)
+static void make_color_text(int dayCode, dnd_schedule_week_flag_e week_day, const char *text, char* outBuf)
 {
-    char variable[DAY_MAX_LENGTH] = { 0 };
-    if((day & week_day) == 0)
-        snprintf(variable, DAY_MAX_LENGTH, GREY_TEXT_MAIN, text);
+    char formattedDay[DAY_MAX_LENGTH] = { 0 };
+    if((dayCode & week_day) == 0)
+        snprintf(formattedDay, DAY_MAX_LENGTH, GREY_TEXT_MAIN, text);
     else
-        snprintf(variable, DAY_MAX_LENGTH, GREEN_TEXT_MAIN, text);
+        snprintf(formattedDay, DAY_MAX_LENGTH, GREEN_TEXT_MAIN, text);
 
-    return strdup(variable);
+    strncat(outBuf, formattedDay, DAY_MAX_LENGTH);
 }
 
-const char *get_day_string()
+int load_dnd_schedule_day()
 {
-    char buff[WEEK_MAX_STRING] = { 0 };
-
+    int res = 0;
     notification_system_setting_h system_setting = NULL;
+
     int err = notification_system_setting_load_system_setting(&system_setting);
-    if(err != NOTIFICATION_ERROR_NONE || system_setting == NULL)
+    if(err == NOTIFICATION_ERROR_NONE && system_setting != NULL)
+    {
+        notification_system_setting_dnd_schedule_get_day(system_setting, &res);
+        default_dnd_schedule_weekday = res;
+        new_dnd_schedule_weekday = res;
+        notification_system_setting_free_system_setting(system_setting);
+    }
+    else
     {
         NOTISET_ERR("notification_system_setting_load_system_setting failed [%d]\n", err);
-        return NULL;
     }
+    return res;
+}
 
-    notification_system_setting_dnd_schedule_get_day(system_setting, &day);
-    if(system_setting)
-        notification_system_setting_free_system_setting(system_setting);
-
-    strcat(buff, make_color_text(DND_SCHEDULE_WEEK_FLAG_MONDAY, APP_STRING("WDS_ALM_BUTTON_M_M_MONDAY_ABB")));
-    strcat(buff, " ");
-    strcat(buff, make_color_text(DND_SCHEDULE_WEEK_FLAG_TUESDAY, APP_STRING("WDS_ALM_BUTTON_T_M_TUESDAY_ABB")));
-    strcat(buff, " ");
-    strcat(buff, make_color_text(DND_SCHEDULE_WEEK_FLAG_WEDNESDAY, APP_STRING("WDS_ALM_BUTTON_W_M_WEDNESDAY_ABB")));
-    strcat(buff, " ");
-    strcat(buff, make_color_text(DND_SCHEDULE_WEEK_FLAG_THURSDAY, APP_STRING("WDS_ALM_BUTTON_T_M_THURSDAY_ABB")));
-    strcat(buff, " ");
-    strcat(buff, make_color_text(DND_SCHEDULE_WEEK_FLAG_FRIDAY, APP_STRING("WDS_ALM_BUTTON_F_M_FRIDAY_ABB")));
-    strcat(buff, " ");
-    strcat(buff, make_color_text(DND_SCHEDULE_WEEK_FLAG_SATURDAY, APP_STRING("WDS_ALM_BUTTON_S_M_SATURDAY_ABB")));
-    strcat(buff, " ");
-    strcat(buff, make_color_text(DND_SCHEDULE_WEEK_FLAG_SUNDAY, APP_STRING("WDS_ALM_BUTTON_S_M_SUNDAY_ABB")));
-
-    return strdup(buff);
+const char *get_day_string(int dnd_schedule)
+{
+    NOTISET_TRACE_BEGIN;
+    static char buff[WEEK_MAX_STRING] = { 0 };
+    buff[0] = 0;
+
+    make_color_text(dnd_schedule, DND_SCHEDULE_WEEK_FLAG_MONDAY, APP_STRING("WDS_ALM_BUTTON_M_M_MONDAY_ABB"), buff);
+    strncat(buff, " ", WEEK_MAX_STRING);
+    make_color_text(dnd_schedule, DND_SCHEDULE_WEEK_FLAG_TUESDAY, APP_STRING("WDS_ALM_BUTTON_T_M_TUESDAY_ABB"), buff);
+    strncat(buff, " ", WEEK_MAX_STRING);
+    make_color_text(dnd_schedule, DND_SCHEDULE_WEEK_FLAG_WEDNESDAY, APP_STRING("WDS_ALM_BUTTON_W_M_WEDNESDAY_ABB"), buff);
+    strncat(buff, " ", WEEK_MAX_STRING);
+    make_color_text(dnd_schedule, DND_SCHEDULE_WEEK_FLAG_THURSDAY, APP_STRING("WDS_ALM_BUTTON_T_M_THURSDAY_ABB"), buff);
+    strncat(buff, " ", WEEK_MAX_STRING);
+    make_color_text(dnd_schedule, DND_SCHEDULE_WEEK_FLAG_FRIDAY, APP_STRING("WDS_ALM_BUTTON_F_M_FRIDAY_ABB"), buff);
+    strncat(buff, " ", WEEK_MAX_STRING);
+    make_color_text(dnd_schedule, DND_SCHEDULE_WEEK_FLAG_SATURDAY, APP_STRING("WDS_ALM_BUTTON_S_M_SATURDAY_ABB"), buff);
+    strncat(buff, " ", WEEK_MAX_STRING);
+    make_color_text(dnd_schedule, DND_SCHEDULE_WEEK_FLAG_SUNDAY, APP_STRING("WDS_ALM_BUTTON_S_M_SUNDAY_ABB"), buff);
+    return buff;
 }
 
 bool is_next_day()
@@ -233,7 +257,7 @@ void set_schedule_check_changed_cb(void *data, Evas_Object *obj, void *event_inf
     ret_if(ug_main == NULL);
     bool check = elm_check_state_get(obj);
     enable_time_items(check);
-    set_set_schedule(check);
+    set_set_schedule(check);//TODO: move saving of settings out of event handler
     elm_genlist_item_update(elm_genlist_item_prev_get(elm_genlist_last_item_get(ug_main->list_main)));
 }
 
@@ -258,10 +282,10 @@ static Evas_Object *_create_set_schedule_disturb_gl(ug_data *ugd)
     return genlist;
 }
 
+// TODO: minimize number of reading settings
 bool get_schedule()
 {
     NOTISET_TRACE_BEGIN;
-
     bool set_schedule = false;
     notification_system_setting_h system_setting = NULL;
     int err = notification_system_setting_load_system_setting(&system_setting);
@@ -281,7 +305,6 @@ bool get_schedule()
 
 static Evas_Object *create_week_repeat_layout(Evas_Object* parent)
 {
-
     Evas_Object *layout = elm_layout_add(parent);
 
     char *res_path = app_get_resource_path();
@@ -300,6 +323,53 @@ static Evas_Object *create_week_repeat_layout(Evas_Object* parent)
     return layout;
 }
 
+static void save_dnd_weekday(int dayCode)
+{
+    notification_system_setting_h system_setting = NULL;
+
+    int err = notification_system_setting_load_system_setting(&system_setting);
+    if (err != NOTIFICATION_ERROR_NONE || system_setting == NULL)
+    {
+        NOTISET_ERR("notification_system_setting_load_system_setting failed [%d]\n", err);
+        return;
+    }
+
+    notification_system_setting_dnd_schedule_set_day(system_setting, dayCode);
+    notification_system_setting_update_system_setting(system_setting);
+    if(system_setting)
+        notification_system_setting_free_system_setting(system_setting);
+}
+
+static bool same_time(struct tm* timeA, struct tm* timeB)
+{
+    time_t t1 = mktime(timeA);
+    time_t t2 = mktime(timeB);
+    return difftime(t1, t2) == 0.0;
+}
+
+static void save_date_time(datetime_s *dt)
+{
+    notification_system_setting_h system_setting = NULL;
+    int err = notification_system_setting_load_system_setting(&system_setting);
+    if(err != NOTIFICATION_ERROR_NONE || system_setting == NULL)
+    {
+        NOTISET_ERR("notification_system_setting_load_system_setting failed [%d]\n", err);
+        return;
+    }
+
+    if(dt->saved_time.tm_hour == start_time_p.saved_time.tm_hour && dt->saved_time.tm_min == start_time_p.saved_time.tm_min)
+        notification_system_setting_dnd_schedule_set_start_time(system_setting, dt->saved_time.tm_hour, dt->saved_time.tm_min);
+    else
+        notification_system_setting_dnd_schedule_set_end_time(system_setting, dt->saved_time.tm_hour, dt->saved_time.tm_min);
+
+    err = notification_system_setting_update_system_setting(system_setting);
+    if(err != NOTIFICATION_ERROR_NONE)
+        NOTISET_ERR("notification_setting_update_setting [%d]\n", err);
+
+    if(system_setting)
+        notification_system_setting_free_system_setting(system_setting);
+}
+
 static void week_button_clicked_cb(void *data, Evas_Object *obj, void *event_info)
 {
     NOTISET_TRACE_BEGIN;
@@ -310,31 +380,18 @@ static void week_button_clicked_cb(void *data, Evas_Object *obj, void *event_inf
 
     if(cc->change_color)
     {
-        day ^= cc->week;
+        new_dnd_schedule_weekday ^= cc->week;
         snprintf(buf, sizeof(buf), GREY_TEXT_COLOR, cc->text);
         elm_object_text_set(cc->label, buf);
     }
     else
     {
-        day |= cc->week;
+        new_dnd_schedule_weekday |= cc->week;
         snprintf(buf, sizeof(buf), GREEN_TEXT_COLOR, cc->text);
         elm_object_text_set(cc->label, buf);
     }
-    cc->change_color = !cc->change_color;
 
-    notification_system_setting_h system_setting = NULL;
-    int err = notification_system_setting_load_system_setting(&system_setting);
-    if (err != NOTIFICATION_ERROR_NONE || system_setting == NULL)
-    {
-        NOTISET_ERR("notification_system_setting_load_system_setting failed [%d]\n", err);
-        return;
-    }
-    notification_system_setting_dnd_schedule_set_day(system_setting, day);
-    notification_system_setting_update_system_setting(system_setting);
-    if(system_setting)
-        notification_system_setting_free_system_setting(system_setting);
-
-    elm_genlist_item_update(elm_genlist_item_prev_get(elm_genlist_last_item_get(ug_main->list_main)));
+    cc->change_color = !cc->change_color;
 }
 
 static Evas_Object *create_week_button(Evas_Object *parent, const char *text, dnd_schedule_week_flag_e week)
@@ -351,23 +408,12 @@ static Evas_Object *create_week_button(Evas_Object *parent, const char *text, dn
     evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
     evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
 
-    notification_system_setting_h system_setting = NULL;
-    int err = notification_system_setting_load_system_setting(&system_setting);
-    if (err != NOTIFICATION_ERROR_NONE || system_setting == NULL)
-    {
-        NOTISET_ERR("notification_system_setting_load_system_setting failed [%d]\n", err);
-        return NULL;
-    }
-    notification_system_setting_dnd_schedule_get_day(system_setting, &day);
-    if(system_setting)
-        notification_system_setting_free_system_setting(system_setting);
-
     changecolor_s *cc = calloc(1, sizeof(changecolor_s));
     cc->week = week;
     cc->label = label;
     cc->text = text;
 
-    if((day & week) == 0)
+    if((default_dnd_schedule_weekday & week) == 0)
     {
         snprintf(buf, sizeof(buf), GREY_TEXT_COLOR, text);
         cc->change_color = false;
@@ -402,7 +448,6 @@ static Evas_Object *repeat_weekly_layout_cb(Evas_Object* parent, void *data)
     evas_object_show(text);
 
     Evas_Object *box = elm_box_add(layout);
-
     evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
     evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
     elm_box_horizontal_set(box, EINA_TRUE);
@@ -418,7 +463,6 @@ static Evas_Object *repeat_weekly_layout_cb(Evas_Object* parent, void *data)
 
     evas_object_show(box);
     elm_box_recalculate(box);
-
     return layout;
 }
 
@@ -439,33 +483,12 @@ static void popup_set_btn_clicked_cb(void *data , Evas_Object *obj , void *event
     elm_datetime_value_get(dt->datetime, &dt->saved_time);
     format = elm_datetime_format_get(dt->datetime);
 
-    notification_system_setting_h system_setting = NULL;
-    int err = notification_system_setting_load_system_setting(&system_setting);
-    if(err != NOTIFICATION_ERROR_NONE || system_setting == NULL)
-    {
-        NOTISET_ERR("notification_system_setting_load_system_setting failed [%d]\n", err);
-        return;
-    }
-
-    if(dt->saved_time.tm_hour == start_time_p.saved_time.tm_hour && dt->saved_time.tm_min == start_time_p.saved_time.tm_min)
-        notification_system_setting_dnd_schedule_set_start_time(system_setting, dt->saved_time.tm_hour, dt->saved_time.tm_min);
-    else
-        notification_system_setting_dnd_schedule_set_end_time(system_setting, dt->saved_time.tm_hour, dt->saved_time.tm_min);
-
-    err = notification_system_setting_update_system_setting(system_setting);
-    if(err != NOTIFICATION_ERROR_NONE)
-        NOTISET_ERR("notification_setting_update_setting [%d]\n", err);
-
-    if(system_setting)
-        notification_system_setting_free_system_setting(system_setting);
-
     if(!strcmp(format, POPUP_TIME_12_FORMAT))
         strftime(buff, TIME_STRING_SIZE, TIME_12_FORMAT, &dt->saved_time);
     else
         strftime(buff, TIME_STRING_SIZE, TIME_24_FORMAT, &dt->saved_time);
 
     elm_genlist_item_update(elm_genlist_last_item_get(ug_main->list_sub));
-    elm_genlist_item_update(elm_genlist_item_prev_get(elm_genlist_last_item_get(ug_main->list_main)));
 
     elm_object_text_set(dt->button, buff);
 
@@ -628,7 +651,30 @@ static void close_set_schedule_cb(void *data, Evas_Object *obj, void *event_info
 {
     NOTISET_TRACE_BEGIN;
     ret_if(!data);
-    elm_naviframe_item_pop(data);
+    ug_data *ugd = (ug_data*)data;
+    bool update_ui = false;
+    if(new_dnd_schedule_weekday != default_dnd_schedule_weekday)
+    {
+        save_dnd_weekday(new_dnd_schedule_weekday);
+        update_ui = true;
+    }
+
+    if(!same_time(&start_time_p.saved_time, &start_time_p.default_time))
+    {
+        save_date_time(&start_time_p);
+        update_ui = true;
+    }
+
+    if(!same_time(&end_time_p.saved_time, &end_time_p.default_time))
+    {
+        save_date_time(&end_time_p);
+        update_ui = true;
+    }
+
+    if(update_ui)
+        elm_genlist_item_update(elm_genlist_item_prev_get(elm_genlist_last_item_get(ugd->list_main)));
+
+    elm_naviframe_item_pop(ugd->naviframe);
 }
 
 void gl_set_schedule_selected(ug_data *data)
@@ -640,7 +686,8 @@ void gl_set_schedule_selected(ug_data *data)
     /* back Button */
     Evas_Object *back_btn = elm_button_add(ugd->naviframe);
     elm_object_style_set(back_btn, "naviframe/back_btn/default");
-    evas_object_smart_callback_add(back_btn, "clicked", close_set_schedule_cb, ugd->naviframe);
+    evas_object_smart_callback_add(back_btn, "clicked", close_set_schedule_cb, ugd);
+    eext_object_event_callback_add(ugd->naviframe, EEXT_CALLBACK_BACK, close_set_schedule_cb, ugd);
 
     /* Push to naviframe */
     ugd->list_sub = _create_set_schedule_disturb_gl(ugd);