sound: Fix wrong variable from sound_set_theme_index() 47/297647/1
authorYunhee Seo <yuni.seo@samsung.com>
Tue, 22 Aug 2023 07:25:43 +0000 (16:25 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Tue, 22 Aug 2023 07:51:24 +0000 (16:51 +0900)
The index of theme should be set by external parameter.
The wrong variable went into vconf setter as order changed.

Change-Id: I15b51552cf822cd26ac844a02609440561bec1f0
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
src/sound.c

index c2f2fd4acd73fecd8debcfafb0d1f9751c36ab18..e08e281d6b4344d951a6eb7bb4e82aae585b5db3 100644 (file)
@@ -641,7 +641,7 @@ static int sound_set_theme_index(unsigned int index_of_theme)
        if (index_of_theme > number_of_theme || index_of_theme <= 0)
                return -EINVAL;
 
-       ret = vconf_set_int(VCONFKEY_SETAPPL_ACCESSIBILITY_SOUND_FEEDBACK_THEME, current_theme_index+1);
+       ret = vconf_set_int(VCONFKEY_SETAPPL_ACCESSIBILITY_SOUND_FEEDBACK_THEME, index_of_theme);
        if (ret < 0) {
                _E("Failed to set vconf value for VCONFKEY_SETAPPL_ACCESSIBILITY_SOUND_FEEDBACK_THEME");
                return -EPERM;