summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpr.jung <pr.jung@samsung.com>2018-07-09 17:12:46 +0900
committerpr.jung <pr.jung@samsung.com>2018-07-09 17:13:56 +0900
commit5fc4de291c8719164f976a2decfc19e772172f0d (patch)
tree35c33922aed55eaea633c045974c13aa8f08f166
parent5927e0a424646d5e861ce9f04a1e91a0dbd26567 (diff)
downloadlibsvi-accepted/tizen_5.0_unified.tar.gz
libsvi-accepted/tizen_5.0_unified.tar.bz2
libsvi-accepted/tizen_5.0_unified.zip
Change-Id: I4523e53ce1c725acad5d52c20fbcbacbac4ae2c8 Signed-off-by: pr.jung <pr.jung@samsung.com>
-rw-r--r--src/check.c50
-rw-r--r--src/sound.c20
2 files changed, 54 insertions, 16 deletions
diff --git a/src/check.c b/src/check.c
index fe5df86..340fee5 100644
--- a/src/check.c
+++ b/src/check.c
@@ -425,6 +425,7 @@ static void feedback_feedbackstatus_cb(keynode_t *key, void* data)
static void profile_init(void)
{
int prof;
+ int ret;
prof = get_profile();
@@ -466,17 +467,30 @@ static void profile_init(void)
_W("VCONFKEY_SETAPPL_HAPTIC_FEEDBACK_STATUS_BOOL ==> FAIL!!"); //LCOV_EXCL_LINE
/* add watch for status value */
- vconf_notify_key_changed(VCONFKEY_CALL_STATE, feedback_callstatus_cb, NULL);
- vconf_notify_key_changed(VCONFKEY_CAMERA_STATE, feedback_camerastatus_cb, NULL);
- vconf_notify_key_changed(VCONFKEY_SETAPPL_VIBRATE_WHEN_NOTIFICATION_BOOL, feedback_noti_vibstatus_cb, NULL);
- vconf_notify_key_changed(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, feedback_vib_cb, NULL);
- vconf_notify_key_changed(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, feedback_noti_cb, NULL);
- vconf_notify_key_changed(VCONFKEY_SETAPPL_HAPTIC_FEEDBACK_STATUS_BOOL, feedback_feedbackstatus_cb, NULL);
+ ret = vconf_notify_key_changed(VCONFKEY_CALL_STATE, feedback_callstatus_cb, NULL);
+ if (ret != 0)
+ _W("Add watch for VCONFKEY_CALL_STATE failed");
+ ret = vconf_notify_key_changed(VCONFKEY_CAMERA_STATE, feedback_camerastatus_cb, NULL);
+ if (ret != 0)
+ _W("Add watch for VCONFKEY_CAMERA_STATE failed");
+ ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_VIBRATE_WHEN_NOTIFICATION_BOOL, feedback_noti_vibstatus_cb, NULL);
+ if (ret != 0)
+ _W("Add watch for VCONFKEY_SETAPPL_VIBRATE_WHEN_NOTIFICATION_BOOL failed");
+ ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, feedback_vib_cb, NULL);
+ if (ret != 0)
+ _W("Add watch for VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT failed");
+ ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, feedback_noti_cb, NULL);
+ if (ret != 0)
+ _W("Add watch for VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT failed");
+ ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_HAPTIC_FEEDBACK_STATUS_BOOL, feedback_feedbackstatus_cb, NULL);
+ if (ret != 0)
+ _W("Add watch for VCONFKEY_SETAPPL_HAPTIC_FEEDBACK_STATUS_BOOL failed");
}
static void profile_exit(void)
{
int prof;
+ int ret;
prof = get_profile();
@@ -486,12 +500,24 @@ static void profile_exit(void)
vconf_ignore_key_changed(VCONFKEY_SETAPPL_SOUND_LOCK_BOOL, feedback_lock_sndstatus_cb);
/* remove watch */
- vconf_ignore_key_changed(VCONFKEY_CALL_STATE, feedback_callstatus_cb);
- vconf_ignore_key_changed(VCONFKEY_CAMERA_STATE, feedback_camerastatus_cb);
- vconf_ignore_key_changed(VCONFKEY_SETAPPL_VIBRATE_WHEN_NOTIFICATION_BOOL, feedback_noti_vibstatus_cb);
- vconf_ignore_key_changed(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, feedback_vib_cb);
- vconf_ignore_key_changed(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, feedback_noti_cb);
- vconf_ignore_key_changed(VCONFKEY_SETAPPL_HAPTIC_FEEDBACK_STATUS_BOOL, feedback_feedbackstatus_cb);
+ ret = vconf_ignore_key_changed(VCONFKEY_CALL_STATE, feedback_callstatus_cb);
+ if (ret != 0)
+ _W("Remove watch for VCONFKEY_CALL_STATE failed");
+ ret = vconf_ignore_key_changed(VCONFKEY_CAMERA_STATE, feedback_camerastatus_cb);
+ if (ret != 0)
+ _W("Remove watch for VCONFKEY_CAMERA_STATE failed");
+ ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_VIBRATE_WHEN_NOTIFICATION_BOOL, feedback_noti_vibstatus_cb);
+ if (ret != 0)
+ _W("Remove watch for VCONFKEY_SETAPPL_VIBRATE_WHEN_NOTIFICATION_BOOL failed");
+ ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, feedback_vib_cb);
+ if (ret != 0)
+ _W("Remove watch for VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT failed");
+ ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, feedback_noti_cb);
+ if (ret != 0)
+ _W("Remove watch for VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT failed");
+ ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_HAPTIC_FEEDBACK_STATUS_BOOL, feedback_feedbackstatus_cb);
+ if (ret != 0)
+ _W("Remove watch for VCONFKEY_SETAPPL_HAPTIC_FEEDBACK_STATUS_BOOL failed");
}
static bool profile_get_switched_pattern(int pattern, int *switched)
diff --git a/src/sound.c b/src/sound.c
index 3daa6f7..a0da68a 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -106,6 +106,8 @@ static void feedback_keytone_sndstatus_cb(keynode_t *key, void* data)
static void sound_init(void)
{
+ int ret;
+
/* get sound data */
feedback_load_config(SOUND_CONF_FILE, &sound_info);
@@ -122,15 +124,25 @@ static void sound_init(void)
}
/* add watch for status value */
- vconf_notify_key_changed(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, feedback_touch_sndstatus_cb, NULL);
- vconf_notify_key_changed(VCONFKEY_SETAPPL_BUTTON_SOUNDS_BOOL, feedback_keytone_sndstatus_cb, NULL);
+ ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, feedback_touch_sndstatus_cb, NULL);
+ if (ret != 0)
+ _W("Add watch for VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL failed");
+ ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_BUTTON_SOUNDS_BOOL, feedback_keytone_sndstatus_cb, NULL);
+ if (ret != 0)
+ _W("Add watch for VCONFKEY_SETAPPL_BUTTON_SOUNDS_BOOL failed");
}
static void sound_exit(void)
{
+ int ret;
+
/* remove watch */
- vconf_ignore_key_changed(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, feedback_touch_sndstatus_cb);
- vconf_ignore_key_changed(VCONFKEY_SETAPPL_BUTTON_SOUNDS_BOOL, feedback_keytone_sndstatus_cb);
+ ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, feedback_touch_sndstatus_cb);
+ if (ret != 0)
+ _W("Remove watch for VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL failed");
+ ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_BUTTON_SOUNDS_BOOL, feedback_keytone_sndstatus_cb);
+ if (ret != 0)
+ _W("Remove watch for VCONFKEY_SETAPPL_BUTTON_SOUNDS_BOOL failed");
/* free sound data */
feedback_free_config(&sound_info);