[TSAM-4035] "OFF" is still shown after turning ON "do not disturb" 96/73496/1
authorRadek Kintop <r.kintop@samsung.com>
Wed, 8 Jun 2016 09:10:31 +0000 (11:10 +0200)
committerRadek Kintop <r.kintop@samsung.com>
Wed, 8 Jun 2016 09:10:31 +0000 (11:10 +0200)
Change-Id: I31334833a54940ee8b95cdc64cde5732ad577c48
Signed-off-by: Radek Kintop <r.kintop@samsung.com>
setting-profile/include/setting-profile.h
setting-profile/src/setting-profile-common.c
setting-profile/src/setting-profile.c

index 84cd1cc908df4291bd222cdb10cdf5bd0f987abf..daa183c3dab45e9521180255f627bfcdf2590329 100644 (file)
@@ -164,6 +164,7 @@ extern void setting_sound_update_slider_icon(
                Setting_GenGroupItem_Data *item_data, int type);
 extern Evas_Object *setting_sound_init(void *data);
 extern void setting_sound_deinit(void *data);
-char *setting_do_not_disturb_is_enable(void *data);
+extern char *setting_do_not_disturb_is_enable(void *data);
+extern void setting_sound_update_do_not_disturb_item(void *data);
 
 #endif
index 75ea0a8aaed260a37f1b547ba0f7b7a51b2047e0..ef0c8beb49e3b71b72fa6610c8591e1151b86f55 100644 (file)
@@ -49,6 +49,20 @@ SliderIcons slider_icons[SND_SLIDER_MAX] = {
        /*{SND_SLIDER_MAX,      "",                             ""} */
 };
 
+void setting_sound_update_do_not_disturb_item(void *data)
+{
+       SettingProfileUG *ad = (SettingProfileUG *) data;
+       const char *sub_desc = NULL;
+
+       if (!ad || !ad->data_do_not_disturb)
+               return;
+
+       sub_desc = setting_do_not_disturb_is_enable(data);
+       g_free(ad->data_do_not_disturb->sub_desc);
+       ad->data_do_not_disturb->sub_desc = g_strdup(sub_desc);
+       elm_genlist_item_update(ad->data_do_not_disturb->item);
+}
+
 char *setting_sound_get_slider_icon(int type, int volume)
 {
        if (type < SND_SLIDER_CALL || type >= SND_SLIDER_MAX)
index 1e35e7d87c7173b22a24d35adca747fd6891d481..dac6fe793c37fce3fe8c35691a4f235bd7beeab4 100644 (file)
@@ -87,7 +87,6 @@ static void setting_sound_ug_on_resume(ui_gadget_h ug, app_control_h service,
 {
        ret_if(priv == NULL);
        SettingProfileUG *profileUG = (SettingProfileUG *)priv;
-
        /* If current view is sound main, block volume app */
        /* To prevent conflict with volume app */
        if (!safeStrCmp(profileUG->viewtype, "com.samsung.volume")) {
@@ -201,6 +200,7 @@ static void setting_sound_ug_on_resume(ui_gadget_h ug, app_control_h service,
                        SND_SLIDER_MEDIA);
        setting_sound_update_slider_icon(profileUG->data_touch_volume,
                        SND_SLIDER_SYSTEM);
+       setting_sound_update_do_not_disturb_item(profileUG);
 }
 
 static void setting_sound_ug_on_destroy(ui_gadget_h ug, app_control_h service,