sound: Fix wrong variable from sound_set_theme_index() 38/297638/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:31:06 +0000 (16:31 +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 b467d48e98c6c00457a78c7e7c89dc260ed50df3..22ef31318ea67439a449bc37615d64ed2d67e4d5 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;