[Sound Profile] Noti sound icon follows the logic of call icon 53/166353/1
authorRadek Kintop <r.kintop@samsung.com>
Tue, 9 Jan 2018 16:12:17 +0000 (17:12 +0100)
committerRadek Kintop <r.kintop@samsung.com>
Tue, 9 Jan 2018 16:12:17 +0000 (17:12 +0100)
Change-Id: I0f2d094ac347df7d7dd5283e27b453a4bc34164d
Signed-off-by: Radek Kintop <r.kintop@samsung.com>
setting-profile/include/setting-profile.h
setting-profile/src/setting-profile-common.c

index 96e49df913a1e734dae40662eb13f63711a217b2..d6664312ad322cff3113fb734abe812e0037e5e6 100644 (file)
@@ -53,6 +53,8 @@
        SETTING_PROFILE_ICON_PATH_CFG"sound_slider_icon_volume_mute.png"
 
 /*Notification: 2 icon status */
+#define ICON_NOTI_VIB \
+       SETTING_PROFILE_ICON_PATH_CFG"sound_slider_icon_notification_vibrate.png"
 #define ICON_NOTI_MUTE \
        SETTING_PROFILE_ICON_PATH_CFG"sound_slider_icon_notification_mute.png"
 #define ICON_NOTI_NORMAL \
index d61765b68bb568f35bc9481ccfbc34881321e793..a1fc68a0406790f02d895d3de4e5d275be11224b 100755 (executable)
@@ -94,8 +94,8 @@ char *setting_sound_get_slider_icon(int type, int volume)
                return NULL;
 
        SETTING_TRACE("type : %d, volume : %d", type, volume);
-       /* 1.Call ringtone has 3 icon status */
-       if (SND_SLIDER_CALL == type) {
+       /* 1.Call ringtone and notification have 3 icon status */
+       if (SND_SLIDER_CALL == type || SND_SLIDER_NOTI == type) {
                /*special process */
                int sound = 0;
                int vibration = 0;
@@ -103,14 +103,21 @@ char *setting_sound_get_slider_icon(int type, int volume)
                vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL,
                                &vibration);
 
-               if (sound && !vibration)
-                       return ICON_CALL_NORMAL;
-               else if (vibration && !sound)
-                       return ICON_CALL_VIB;
-               else if (!vibration && !sound)
-                       return ICON_CALL_MUTE;
+               if (sound && !vibration) {
+                       return (SND_SLIDER_CALL == type ?
+                                       ICON_CALL_NORMAL : ICON_NOTI_NORMAL);
+               }
+
+               if (vibration && !sound) {
+                       return (SND_SLIDER_CALL == type ? ICON_CALL_VIB : ICON_NOTI_VIB);
+               }
+
+               if (!vibration && !sound) {
+                       return (SND_SLIDER_CALL == type ? ICON_CALL_MUTE : ICON_NOTI_MUTE);
+               }
 
-               return ICON_CALL_NORMAL;
+               return (SND_SLIDER_CALL == type ?
+                               ICON_CALL_NORMAL : ICON_NOTI_NORMAL);
        }
 
        /* 2.Other types, just have two icon status */