#define VCONFKEY_SETAPPL_BUTTON_SOUNDS_BOOL "db/setting/sound/button_sounds"
#endif
+#define SOUND_THEME_ID_UNINITIALIZED 0
+
static int sndstatus;
static int touch_sndstatus;
static int keytone_sndstatus;
static unsigned int current_theme_id = 0;
+static int sound_set_theme_id(unsigned int id_of_theme);
+
static const char *get_data(feedback_pattern_e pattern)
{
const char *data;
}
//LCOV_EXCL_STOP
+static void sound_theme_id_init(void)
+{
+ int ret;
+ unsigned int theme_id = SOUND_THEME_ID_UNINITIALIZED;
+
+ ret = vconf_get_int(VCONFKEY_SETAPPL_ACCESSIBILITY_SOUND_FEEDBACK_THEME, (int *) &theme_id);
+ if (ret < 0 || theme_id == SOUND_THEME_ID_UNINITIALIZED)
+ sound_thememan_get_default_sound_theme_id(&theme_id);
+
+ sound_set_theme_id(theme_id);
+}
+
static void sound_init(void)
{
int ret = 0;
- current_theme_id = 0;
-
ret = sound_thememan_init();
if (ret < 0) {
_E("Failed to initialize sound theme manager(%d)", ret);
sound_parser_exit();
}
- sound_thememan_get_default_sound_theme_id(¤t_theme_id);
- ret = vconf_set_int(VCONFKEY_SETAPPL_ACCESSIBILITY_SOUND_FEEDBACK_THEME, current_theme_id);
+ sound_theme_id_init();
/* check sound status */
if (vconf_get_bool(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, &touch_sndstatus) < 0)