fix callback port number & betweeny bug 69/107469/1 accepted/tizen/common/20161228.162540 accepted/tizen/common/20170111.155023 accepted/tizen/ivi/20161229.112656 accepted/tizen/mobile/20161229.112545 accepted/tizen/tv/20161229.112601 accepted/tizen/wearable/20161229.112632 submit/tizen/20161228.072746 submit/tizen_common/20170111.150147
authorMyoungJune Park <mj2004.park@samsung.com>
Wed, 28 Dec 2016 07:13:53 +0000 (16:13 +0900)
committerMyoungJune Park <mj2004.park@samsung.com>
Wed, 28 Dec 2016 07:17:18 +0000 (16:17 +0900)
- callback port was wrong for sound-notification, backlight-time
- logic of backlighttime for 600 sec was wrong

Change-Id: I3d9ac1679bac482796a771a22f52b7aeaf7a0936

src/system_setting_platform.c

index 8389847..e0fd469 100644 (file)
@@ -1849,7 +1849,7 @@ int system_setting_set_screen_backlight_time(system_settings_key_e key, system_s
        int *vconf_value;
        vconf_value = *(int **)value;
 
-       if (!(*vconf_value > 0 && *vconf_value < 600)) {
+       if (!(*vconf_value > 0 && *vconf_value <= 600)) {
                SETTING_TRACE(" ERR Betweeny here  0 ~ 600");
                return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
        }
@@ -1865,7 +1865,7 @@ int system_setting_set_screen_backlight_time(system_settings_key_e key, system_s
 int system_setting_set_changed_callback_screen_backlight_time(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
 {
        SETTING_TRACE_BEGIN;
-       return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_LCD_TIMEOUT_NORMAL, SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, 2, user_data);
+       return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_LCD_TIMEOUT_NORMAL, SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME, 2, user_data);
 }
 
 int system_setting_unset_changed_callback_screen_backlight_time(system_settings_key_e key)
@@ -1895,10 +1895,13 @@ int system_setting_set_sound_notification(system_settings_key_e key, system_sett
 
        int is_load = _is_file_accessible(vconf_value);
        if (is_load == 0) {
+               //SETTING_TRACE(" system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, %s) TRY", vconf_value);
                if (system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, vconf_value)) {
+                       //SETTING_TRACE(" system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, %s) FAIL", vconf_value);
                        return SYSTEM_SETTINGS_ERROR_IO_ERROR;
                }
        } else {
+               //SETTING_TRACE(" is_file_accessibile FAILED - system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, %s) FAIL", vconf_value);
                return SYSTEM_SETTINGS_ERROR_IO_ERROR;
        }
 
@@ -1909,7 +1912,7 @@ int system_setting_set_sound_notification(system_settings_key_e key, system_sett
 int system_setting_set_changed_callback_sound_notification(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
 {
        SETTING_TRACE_BEGIN;
-       return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE, 0, user_data);
+       return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION, 0, user_data);
 }
 
 int system_setting_unset_changed_callback_sound_notification(system_settings_key_e key)