replace sprintf with snprintf for secure-coding
[platform/core/api/system-settings.git] / src / system_setting_platform.c
index 88e941d..135c2b1 100644 (file)
@@ -19,6 +19,7 @@
 #include <unistd.h>
 #include <errno.h>
 #include <time.h>
+#include <dlfcn.h>
 
 #include <string.h>
 #include <sys/types.h>
 
 #include <fontconfig/fontconfig.h>
 
+#include <alarm.h>
 
-#include <Elementary.h>
-#include <Evas.h>
-#include <Ecore_Evas.h>
+#include <pkgmgr-info.h>
 
 #include <system_settings.h>
 #include <system_settings_private.h>
 
+#include <tzplatform_config.h>
+
 #ifdef USE_EFL_ASSIST
 #include <efl_assist.h>
 #endif
 
-#ifdef TIZEN_WEARABLE
-#define SMALL_FONT_DPI                      (-90)
-#endif
-#ifdef TIZEN_MOBILE
-#define SMALL_FONT_DPI                      (-80)
-#endif
-#define MIDDLE_FONT_DPI                     (-100)
-#ifdef TIZEN_WEARABLE
-#define LARGE_FONT_DPI                      (-110)
-#endif
-#ifdef TIZEN_MOBILE
-#define LARGE_FONT_DPI                      (-150)
-#endif
-#define HUGE_FONT_DPI                       (-190)
-#define GIANT_FONT_DPI                      (-250)
-
-#define SETTING_FONT_PRELOAD_FONT_PATH "/usr/share/fonts"
-#define SETTING_FONT_DOWNLOADED_FONT_PATH "/opt/share/fonts"
-
-#define SETTING_FONT_CONF_FILE "/opt/etc/fonts/conf.avail/99-slp.conf"
-#define SETTING_DEFAULT_FONT_CONF_FILE "/usr/opt/etc/fonts/conf.avail/99-slp.conf"
+#define SETTING_FONT_CONF_FILE _TZ_SYS_ETC"/fonts/conf.avail/99-tizen.conf"
+#define SETTING_DEFAULT_FONT_CONF_FILE _TZ_SYS_ETC"/fonts/conf.avail/99-tizen.conf"
 
-#define SETTING_STR_LEN  256
+#define SETTING_TIME_ZONEINFO_PATH             "/usr/share/zoneinfo/"
+#define SETTING_TIME_SHARE_LOCAL_PATH  "/usr/share/locale"
+#define SETTING_TZONE_SYMLINK_PATH             "/etc/localtime"
 
-#define SETTING_TIME_ZONEINFO_PATH             "/usr/share/zoneinfo/"
-#define SETTING_TIME_SHARE_LOCAL_PATH  "/usr/share/locale"
-#define SETTING_TZONE_SYMLINK_PATH             "/opt/etc/localtime"
 
+int _is_file_accessible(const char *path);
 
-static char *_get_cur_font();
-static void __font_size_set();
-static int __font_size_get();
-static char *_get_default_font();
+bool dl_is_supported_image_type_load(char *path);
+bool dl_font_config_set(char *font_name);
+char *dl_get_font_info(char *str);
+int dl_is_available_font(char *str);
+void dl_font_size_set();
+void dl_font_config_set_notification();
 
-static bool font_config_set(char *font_name);
-static void font_config_set_notification();
 
 /**
  * VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR has a path of the ringtone file which user choose
  * @return the ringtone file path specified by user in normal case
- *         if it's not accessable, return the default ringtone path
+ *                if it's not accessable, return the default ringtone path
  */
 int system_setting_get_incoming_call_ringtone(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        char *vconf_value;
        if (system_setting_vconf_get_value_string(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, &vconf_value)) {
                return SYSTEM_SETTINGS_ERROR_IO_ERROR;
@@ -113,6 +97,7 @@ int system_setting_get_incoming_call_ringtone(system_settings_key_e key, system_
 
 int system_setting_get_email_alert_ringtone(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        char *vconf_value;
        if (system_setting_vconf_get_value_string(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, &vconf_value)) {
                return SYSTEM_SETTINGS_ERROR_IO_ERROR;
@@ -133,6 +118,7 @@ int system_setting_get_email_alert_ringtone(system_settings_key_e key, system_se
 
 int system_setting_get_wallpaper_home_screen(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        char *vconf_value;
        if (system_setting_vconf_get_value_string(VCONFKEY_BGSET, &vconf_value)) {
                return SYSTEM_SETTINGS_ERROR_IO_ERROR;
@@ -144,6 +130,7 @@ int system_setting_get_wallpaper_home_screen(system_settings_key_e key, system_s
 
 int system_setting_get_wallpaper_lock_screen(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        char *vconf_value;
 
        if (system_setting_vconf_get_value_string(VCONFKEY_IDLE_LOCK_BGSET, &vconf_value)) {
@@ -158,6 +145,7 @@ int system_setting_get_wallpaper_lock_screen(system_settings_key_e key, system_s
 /* [int] vconf GET */
 int system_setting_get_font_size(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        int vconf_value;
 
        if (system_setting_vconf_get_value_int(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, &vconf_value)) {
@@ -171,7 +159,8 @@ int system_setting_get_font_size(system_settings_key_e key, system_setting_data_
 
 int system_setting_get_default_font_type(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
-       char *font_name = _get_default_font();
+       SETTING_TRACE_BEGIN;
+       char *font_name = dl_get_font_info("default");
        if (font_name) {
                *value = (void *)font_name;
                return SYSTEM_SETTINGS_ERROR_NONE;
@@ -183,7 +172,8 @@ int system_setting_get_default_font_type(system_settings_key_e key, system_setti
 /* [int] vconf GET */
 int system_setting_get_font_type(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
-       char *font_name = _get_cur_font();
+       SETTING_TRACE_BEGIN;
+       char *font_name = dl_get_font_info("cur");
        *value = (void *)font_name;
 
        return SYSTEM_SETTINGS_ERROR_NONE;
@@ -192,6 +182,7 @@ int system_setting_get_font_type(system_settings_key_e key, system_setting_data_
 
 int system_setting_get_motion_activation(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        bool vconf_value;
 
        if (system_setting_vconf_get_value_bool(VCONFKEY_SETAPPL_MOTION_ACTIVATION, &vconf_value)) {
@@ -204,6 +195,7 @@ int system_setting_get_motion_activation(system_settings_key_e key, system_setti
 
 int system_setting_get_usb_debugging_option(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        bool vconf_value;
 
        if (system_setting_vconf_get_value_bool(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, &vconf_value)) {
@@ -216,6 +208,7 @@ int system_setting_get_usb_debugging_option(system_settings_key_e key, system_se
 
 int system_setting_get_3g_data_network(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        bool vconf_value;
 
        if (system_setting_vconf_get_value_bool(VCONFKEY_3G_ENABLE, &vconf_value)) {
@@ -228,26 +221,6 @@ int system_setting_get_3g_data_network(system_settings_key_e key, system_setting
 /*////////////////////////////////////////////////////////////////////////////////////////////////// */
 
 
-int system_setting_get_tap_and_hold_delay(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
-{
-       char *vconf_value = NULL;
-       if (system_setting_vconf_get_value_string(VCONFKEY_SETAPPL_ACCESSIBILITY_TAP_HOLD_DELAY_STR, &vconf_value)) {
-               return SYSTEM_SETTINGS_ERROR_IO_ERROR;
-       }
-
-       int val = SYSTEM_SETTINGS_TAP_AND_HOLD_DELAY_MEDIUM;
-       if (vconf_value && strcmp(vconf_value, "IDS_COM_POP_SHORT") == 0) {
-               val = SYSTEM_SETTINGS_TAP_AND_HOLD_DELAY_SHORT;
-       } else if (vconf_value && strcmp(vconf_value, "IDS_ST_BODY_MEDIUM") == 0) {
-               val = SYSTEM_SETTINGS_TAP_AND_HOLD_DELAY_MEDIUM;
-       } else if (vconf_value && strcmp(vconf_value, "IDS_COM_POP_LONG") == 0) {
-               val = SYSTEM_SETTINGS_TAP_AND_HOLD_DELAY_LONG;
-       }
-
-       *value = (void *)val;           /* float */
-       return SYSTEM_SETTINGS_ERROR_NONE;
-}
-
 /**
  * get current lock scren app package name (string)
  *
@@ -255,6 +228,7 @@ int system_setting_get_tap_and_hold_delay(system_settings_key_e key, system_sett
  */
 int system_setting_get_lockscreen_app(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        char *pkg_name = NULL;
        int locktype = -1;
        system_setting_vconf_get_value_int(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT, &locktype);
@@ -276,28 +250,32 @@ int system_setting_get_lockscreen_app(system_settings_key_e key, system_setting_
 
 int _is_file_accessible(const char *path)
 {
+       SETTING_TRACE_BEGIN;
        int ret = access(path , R_OK);
        if (ret == 0) {
                SETTING_TRACE("found the file  %s", path);
                return 0;
        } else {
+               /* error code : 13 */
                SETTING_TRACE("found the file  %s --- error code : %d ", path, errno);
-               return errno;
+               return -errno;
        }
 }
 
 int system_setting_set_incoming_call_ringtone(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
 {
+       SETTING_TRACE_BEGIN;
        char *vconf_value;
        vconf_value = (char *)value;
 
-       int is_load = _is_file_accessible(vconf_value);
-       if (is_load == 0) {
+       int ret = _is_file_accessible(vconf_value);
+       if (ret == 0) {
                if (system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, vconf_value)) {
                        return SYSTEM_SETTINGS_ERROR_IO_ERROR;
                }
        } else {
-               return SYSTEM_SETTINGS_ERROR_IO_ERROR;
+               /* @todo add a common ret_handler */
+               return ret;
        }
 
        return SYSTEM_SETTINGS_ERROR_NONE;
@@ -306,73 +284,193 @@ int system_setting_set_incoming_call_ringtone(system_settings_key_e key, system_
 
 int system_setting_set_email_alert_ringtone(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
 {
+       SETTING_TRACE_BEGIN;
        char *vconf_value;
        vconf_value = (char *)value;
 
-       int is_load = _is_file_accessible(vconf_value);
-       if (is_load == 0) {
+       int ret = _is_file_accessible(vconf_value);
+       if (ret == 0) {
                if (system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, vconf_value)) {
                        return SYSTEM_SETTINGS_ERROR_IO_ERROR;
                }
        } else {
-               return SYSTEM_SETTINGS_ERROR_IO_ERROR;
+               /*return SYSTEM_SETTINGS_ERROR_IO_ERROR;*/
+               /* @todo add a common ret_handler */
+               return ret;
        }
 
        return SYSTEM_SETTINGS_ERROR_NONE;
 }
 
+bool dl_is_supported_image_type_load(char *path)
+{
+       void *handle = NULL;
+       char *error;
+       bool ret = false;
+       bool (*image_type_check)(char *path);
+
+       handle = dlopen("/usr/lib/libsystem-settings-util.so.0.1.0",  RTLD_LAZY);
+       if (!handle) {
+               SETTING_TRACE("ERROR!! canNOT find libsystem-settings-util.so.0.1.0");
+               return false;
+       }
+
+       image_type_check = dlsym(handle, "__is_supported_image_type_load");
+       if ((error = dlerror()) != NULL) {
+               SETTING_TRACE("ERROR!! canNOT find __is_supported_image_type_load function at libsystem-settings-util.so.0.1.0");
+               if (handle)
+                       dlclose(handle);
+               return false;
+       }
+       ret = image_type_check(path);
+       if (handle)
+               dlclose(handle);
+       return ret;
+}
+
+int dl_is_available_font(char *str)
+{
+       void *handle = NULL;
+       char *error;
+       int ret = false;
+       int (*check_available_font)(char *font_name);
+
+       handle = dlopen("/usr/lib/libsystem-settings-util.so.0.1.0",  RTLD_LAZY);
+       if (!handle) {
+               SETTING_TRACE("ERROR!! canNOT find libsystem-settings-util.so.0.1.0");
+               return false;
+       }
 
-bool __is_supported_image_type_load(char *path)
+       check_available_font = dlsym(handle, "__is_available_font");
+       if ((error = dlerror()) != NULL) {
+               SETTING_TRACE("ERROR!! canNOT find __is_available_font function at libsystem-settings-util.so.0.1.0");
+               if (handle)
+                       dlclose(handle);
+               return false;
+       }
+       ret = check_available_font(str);
+       if (handle)
+               dlclose(handle);
+       return ret;
+}
+
+void dl_font_size_set()
 {
-       evas_init();
-       Ecore_Evas  *ee;
-       Evas        *evas;
+       void *handle = NULL;
+       char *error;
+       void (*set_font_size)();
+
+       handle = dlopen("/usr/lib/libsystem-settings-util.so.0.1.0",  RTLD_LAZY);
+       if (!handle) {
+               SETTING_TRACE("ERROR!! canNOT find libsystem-settings-util.so.0.1.0");
+               return;
+       }
 
-       ee = ecore_evas_new(NULL, 0, 0, 100, 100, NULL);
-       evas = ecore_evas_get(ee);
+       set_font_size = dlsym(handle, "__font_size_set");
+       if ((error = dlerror()) != NULL) {
+               SETTING_TRACE("ERROR!! canNOT find __font_size_set function at libsystem-settings-util.so.0.1.0");
+               if (handle)
+                       dlclose(handle);
+               return;
+       }
+       set_font_size();
+       if (handle)
+               dlclose(handle);
+       return;
+}
 
-       Evas_Object *img = evas_object_image_add(evas);
-       evas_object_image_file_set(img, path, NULL);
-       Evas_Load_Error ret = evas_object_image_load_error_get(img);
+void dl_font_config_set_notification()
+{
+       void *handle = NULL;
+       char *error;
+       void (*set_font_nodification)();
 
-       bool result = false;
-       if (ret == EVAS_LOAD_ERROR_NONE) {
-               SETTING_TRACE("%s - OK", path);
-               result = true;
-       } else {
-               SETTING_TRACE("%s - NO", path);
-               result = false;
+       handle = dlopen("/usr/lib/libsystem-settings-util.so.0.1.0",  RTLD_LAZY);
+       if (!handle) {
+               SETTING_TRACE("ERROR!! canNOT find libsystem-settings-util.so.0.1.0");
+               return;
        }
-       ecore_evas_free(ee);
-       evas_shutdown();
-       return result;
+
+       set_font_nodification = dlsym(handle, "font_config_set_notification");
+       if ((error = dlerror()) != NULL) {
+               SETTING_TRACE("ERROR!! canNOT find font_config_set_notification function at libsystem-settings-util.so.0.1.0");
+               if (handle)
+                       dlclose(handle);
+               return;
+       }
+       set_font_nodification();
+       if (handle)
+               dlclose(handle);
+       return;
 }
 
-bool __is_supported_image_type(char *path)
+bool dl_font_config_set(char *font_name)
 {
+       void *handle = NULL;
+       char *error;
        bool ret = false;
+       bool (*check_font_type)(char *font_name);
 
-       evas_init();
-       if (evas_object_image_extension_can_load_get(path))
-               ret = true;
-       else
-               ret = false;
+       handle = dlopen("/usr/lib/libsystem-settings-util.so.0.1.0",  RTLD_LAZY);
+       if (!handle) {
+               SETTING_TRACE("ERROR!! canNOT find libsystem-settings-util.so.0.1.0");
+               return false;
+       }
+
+       check_font_type = dlsym(handle, "font_config_set");
+       if ((error = dlerror()) != NULL) {
+               SETTING_TRACE("ERROR!! canNOT find font_config_set function at libsystem-settings-util.so.0.1.0");
+               if (handle)
+                       dlclose(handle);
+               return false;
+       }
+       ret = check_font_type(font_name);
+       if (handle)
+               dlclose(handle);
+       return ret;
+}
+
+char *dl_get_font_info(char *str)
+{
+       void *handle = NULL;
+       char *error;
+       char *ret = NULL;
+       char *(*get_font_info)();
 
-       evas_shutdown();
+       handle = dlopen("/usr/lib/libsystem-settings-util.so.0.1.0",  RTLD_LAZY);
+       if (!handle) {
+               SETTING_TRACE("ERROR!! canNOT find libsystem-settings-util.so.0.1.0");
+               return false;
+       }
+
+       if (strcmp(str, "cur") == 0)
+               get_font_info = dlsym(handle, "_get_cur_font");
+       else
+               get_font_info = dlsym(handle, "_get_default_font");
 
+       if ((error = dlerror()) != NULL) {
+               SETTING_TRACE("ERROR!! canNOT find %s function at libsystem-settings-util.so.0.1.0", str);
+               if (handle)
+                       dlclose(handle);
+               return false;
+       }
+       ret = get_font_info();
+       if (handle)
+               dlclose(handle);
        return ret;
 }
 
 #define PATH_EXT_CHECK_REG ".(jpe?g|jpg|png|gif)$"
 bool __is_supported_image_type_by_ext(char *file_path)
 {
+       SETTING_TRACE_BEGIN;
        regex_t fsm;
        regmatch_t str[2048 + 1];
 
        if (!file_path) return false;
 
        int ret = false;
-       if (ret = regcomp(&fsm, PATH_EXT_CHECK_REG, REG_ICASE | REG_EXTENDED)) {
+       if ((ret = regcomp(&fsm, PATH_EXT_CHECK_REG, REG_ICASE | REG_EXTENDED))) {
                SETTING_TRACE("regular expresstion fail");
                return 1;
        }
@@ -390,6 +488,7 @@ bool __is_supported_image_type_by_ext(char *file_path)
 #ifdef TIZEN_WEARABLE
 static int system_setting_get_extended_wallpaper_num(const char *file_path, unsigned int *num)
 {
+       SETTING_TRACE_BEGIN;
        char buffer[256];
        const char *find_str = "extended_wallpaper_";
        char *ch = NULL;
@@ -413,6 +512,7 @@ static int system_setting_get_extended_wallpaper_num(const char *file_path, unsi
 
 static int system_setting_copy_extended_wallpaper(const char *dest_file_path, const char *source_file_path)
 {
+       SETTING_TRACE_BEGIN;
        if (!source_file_path || !dest_file_path) {
                return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
        }
@@ -450,6 +550,7 @@ static int system_setting_copy_extended_wallpaper(const char *dest_file_path, co
 
 static int system_setting_remove_oldest_extended_wallpaper()
 {
+       SETTING_TRACE_BEGIN;
        DIR *dp;
        struct dirent *dirp;
        char *min_image_name = NULL;
@@ -457,7 +558,7 @@ static int system_setting_remove_oldest_extended_wallpaper()
        unsigned int temp_image_num = 0;
        int image_count = 0;
 
-       if ((dp = opendir("/opt/usr/data/setting/wallpaper")) == NULL) {
+       if ((dp = opendir(_TZ_SYS_DATA"/setting/wallpaper")) == NULL) {
                SETTING_TRACE("opendir error");
                return SYSTEM_SETTINGS_ERROR_IO_ERROR;
        }
@@ -481,7 +582,7 @@ static int system_setting_remove_oldest_extended_wallpaper()
 
        char buf[512];
        if (min_image_name) {
-               snprintf(buf, sizeof(buf) - 1, "/opt/usr/data/setting/wallpaper/%s", min_image_name);
+               snprintf(buf, sizeof(buf) - 1, _TZ_SYS_DATA"/setting/wallpaper/%s", min_image_name);
                if (remove(buf) < 0) {  /* remove oldest image */
                        return SYSTEM_SETTINGS_ERROR_IO_ERROR;
                }
@@ -492,9 +593,12 @@ static int system_setting_remove_oldest_extended_wallpaper()
 
 static int system_setting_check_extended_wallpaper(const char *file_path)
 {
+       char buffer[512];
+       SETTING_TRACE_BEGIN;
        if (!file_path || !strlen(file_path))
                return 0;
-       return (strstr(file_path, "/opt/usr/media/.bgwallpaper") != NULL);
+       snprintf(buffer, 512, "%s/.bgwallpaper", tzplatform_getenv(TZ_USER_CONTENT));
+       return (strstr(file_path, buffer) != NULL);
 }
 
 #define WALLPAPER_MAX_COUNT            10
@@ -502,10 +606,11 @@ static int system_setting_check_extended_wallpaper(const char *file_path)
 
 int system_setting_set_wallpaper_home_screen(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
 {
+       SETTING_TRACE_BEGIN;
        char *vconf_value;
        vconf_value = (char *)value;
 
-       bool isok  = __is_supported_image_type_load(vconf_value);
+       bool isok  = dl_is_supported_image_type_load(vconf_value);
        if (!isok) {
                /* not supported */
                SETTING_TRACE("path : %s is not supported file format", vconf_value);
@@ -525,13 +630,13 @@ int system_setting_set_wallpaper_home_screen(system_settings_key_e key, system_s
 
 #ifdef TIZEN_WEARABLE
        if (system_setting_check_extended_wallpaper(vconf_value)) {     /* New extended wallpaper */
-               DIR *dp;
+               DIR *dp = NULL;
                struct dirent *dirp;
                unsigned int max_image_num = 0;
                unsigned int temp_image_num = 0;
                int image_count = 0;
 
-               if ((dp = opendir("/opt/usr/data/setting/wallpaper")) == NULL) {
+               if ((dp = opendir(_TZ_SYS_DATA"/setting/wallpaper")) == NULL) {
                        SETTING_TRACE("Setting - dir open error!");
                        return SYSTEM_SETTINGS_ERROR_IO_ERROR;
                }
@@ -543,6 +648,8 @@ int system_setting_set_wallpaper_home_screen(system_settings_key_e key, system_s
 
                        if (system_setting_get_extended_wallpaper_num(dirp->d_name, &temp_image_num)
                            != SYSTEM_SETTINGS_ERROR_NONE) {
+                               if (dp)
+                                       closedir(dp);
                                return SYSTEM_SETTINGS_ERROR_IO_ERROR;
                        }
 
@@ -552,16 +659,18 @@ int system_setting_set_wallpaper_home_screen(system_settings_key_e key, system_s
 
                        image_count++;
                }
+               if (dp)
+                       closedir(dp);
 
                /* Numbering rule: Gear is odd number */
                max_image_num = (max_image_num % 2 == 0) ? max_image_num + 1
-                               : max_image_num + 2;
+                                                       : max_image_num + 2;
 
                char file_name_buffer[512];
                snprintf(file_name_buffer, sizeof(file_name_buffer) - 1,
-                        "/opt/usr/data/setting/wallpaper/extended_wallpaper_%d.jpg", max_image_num);
+                                       _TZ_SYS_DATA"/setting/wallpaper/extended_wallpaper_%d.jpg", max_image_num);
 
-               /* Copy image to /opt/usr/data/setting/wallpaper/ */
+               /* Copy image to _TZ_SYS_DATA/setting/wallpaper/ */
                if (system_setting_copy_extended_wallpaper(file_name_buffer, vconf_value)
                    != SYSTEM_SETTINGS_ERROR_NONE) {
                        return SYSTEM_SETTINGS_ERROR_IO_ERROR;
@@ -581,7 +690,7 @@ int system_setting_set_wallpaper_home_screen(system_settings_key_e key, system_s
                }
 
                if (system_setting_vconf_set_value_int(VCONFKEY_SETAPPL_WALLPAPER_CHANGED_NOTI_INT,
-                                                      VCONFKEY_WALLPAPER_CHANGED_NOTI_GEAR)) {
+                                                                                                       VCONFKEY_WALLPAPER_CHANGED_NOTI_GEAR)) {
                        return SYSTEM_SETTINGS_ERROR_IO_ERROR;
                }
        } else {
@@ -596,10 +705,11 @@ int system_setting_set_wallpaper_home_screen(system_settings_key_e key, system_s
 
 int system_setting_set_wallpaper_lock_screen(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
 {
+       SETTING_TRACE_BEGIN;
        char *vconf_value;
        vconf_value = (char *)value;
 
-       bool isok  = __is_supported_image_type_load(vconf_value);
+       bool isok  = dl_is_supported_image_type_load(vconf_value);
        if (!isok) {
                /* not supported */
                SETTING_TRACE("path : %s is not supported file format", vconf_value);
@@ -632,7 +742,7 @@ int system_setting_set_font_size(system_settings_key_e key, system_setting_data_
        if (system_setting_vconf_set_value_int(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, *vconf_value)) {
                return SYSTEM_SETTINGS_ERROR_IO_ERROR;
        }
-       __font_size_set();
+       dl_font_size_set();
        SETTING_TRACE_END;
        return SYSTEM_SETTINGS_ERROR_NONE;
 }
@@ -641,6 +751,7 @@ int system_setting_set_font_size(system_settings_key_e key, system_setting_data_
  */
 void *font_conf_doc_parse(char *doc_name, char *font_name)
 {
+       SETTING_TRACE_BEGIN;
        xmlDocPtr doc = NULL;
        xmlNodePtr cur = NULL;
        xmlNodePtr cur2 = NULL;
@@ -665,7 +776,7 @@ void *font_conf_doc_parse(char *doc_name, char *font_name)
 
        cur = cur->xmlChildrenNode;
 
-       Eina_Bool is_changed = EINA_FALSE;
+       bool is_changed = false;
        while (cur != NULL) {
                if ((!xmlStrcmp(cur->name, (const xmlChar *)"match"))) {
                        cur2 = cur->xmlChildrenNode;
@@ -688,7 +799,7 @@ void *font_conf_doc_parse(char *doc_name, char *font_name)
                                                        key = xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1);
                                                        xmlFree(key);
                                                        key = NULL;
-                                                       is_changed = EINA_TRUE;
+                                                       is_changed = true;
                                                }
                                                cur3 = cur3->next;
                                        }
@@ -703,7 +814,7 @@ void *font_conf_doc_parse(char *doc_name, char *font_name)
                                        key = xmlNodeListGetString(doc, cur2->xmlChildrenNode, 1);
                                        xmlFree(key);
                                        key = NULL;
-                                       is_changed = EINA_TRUE;
+                                       is_changed = true;
                                } else if ((!xmlStrcmp(cur2->name, (const xmlChar *)"prefer"))) {
                                        cur3 = cur2->xmlChildrenNode;
                                        while (cur3 != NULL) {
@@ -712,7 +823,7 @@ void *font_conf_doc_parse(char *doc_name, char *font_name)
                                                        key = xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1);
                                                        xmlFree(key);
                                                        key = NULL;
-                                                       is_changed = EINA_TRUE;
+                                                       is_changed = true;
                                                        cur3 = cur3->next;
                                                        return doc;
                                                }
@@ -736,11 +847,12 @@ void *font_conf_doc_parse(char *doc_name, char *font_name)
 
 int system_setting_set_font_type(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
 {
+       SETTING_TRACE_BEGIN;
        char *font_name = NULL;
        font_name = (char *)value;
 
        /* get current font list */
-       int is_found = __is_available_font(font_name);
+       int is_found = dl_is_available_font(font_name);
 
        if (is_found) {
                SETTING_TRACE("found font : %s ", font_name);
@@ -749,7 +861,7 @@ int system_setting_set_font_type(system_settings_key_e key, system_setting_data_
                return SYSTEM_SETTINGS_ERROR_IO_ERROR;
        }
 
-       bool bsave = font_config_set(font_name);
+       bool bsave = dl_font_config_set(font_name);
 
        if (!bsave) {
                SETTING_TRACE(" font type save error by font_config_set() ");
@@ -765,10 +877,11 @@ int system_setting_set_font_type(system_settings_key_e key, system_setting_data_
                doc = NULL;
        }
 
-       font_config_set_notification();
+       dl_font_config_set_notification();
 
        char *vconf_value;
        vconf_value = (char *)value;
+
        if (system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME, vconf_value)) {
                return SYSTEM_SETTINGS_ERROR_IO_ERROR;
        }
@@ -777,6 +890,7 @@ int system_setting_set_font_type(system_settings_key_e key, system_setting_data_
 
 int system_setting_set_motion_activation(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
 {
+       SETTING_TRACE_BEGIN;
        bool *vconf_value;
        vconf_value = (bool *)value;
        if (system_setting_vconf_set_value_bool(VCONFKEY_SETAPPL_MOTION_ACTIVATION, *vconf_value)) {
@@ -787,6 +901,7 @@ int system_setting_set_motion_activation(system_settings_key_e key, system_setti
 
 int system_setting_set_usb_debugging_option(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
 {
+       SETTING_TRACE_BEGIN;
        bool *vconf_value;
        vconf_value = (bool *)value;
        if (system_setting_vconf_set_value_bool(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, *vconf_value)) {
@@ -798,38 +913,13 @@ int system_setting_set_usb_debugging_option(system_settings_key_e key, system_se
 
 int system_setting_set_3g_data_network(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
 {
+       SETTING_TRACE_BEGIN;
        bool *vconf_value;
        vconf_value = (bool *)value;
        if (system_setting_vconf_set_value_bool(VCONFKEY_3G_ENABLE, *vconf_value)) {
                return SYSTEM_SETTINGS_ERROR_IO_ERROR;
        }
-       return SYSTEM_SETTINGS_ERROR_NONE;
-}
-
-/*
-       "IDS_COM_POP_SHORT"             0.5
-       "IDS_ST_BODY_MEDIUM"    1.0
-       "IDS_COM_POP_LONG"              1.5
-*/
-int system_setting_set_tap_and_hold_delay(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
-{
-       int *vconf_value;
-       vconf_value = (int *)value;
 
-       char *result = "IDS_ST_BODY_MEDIUM";            /* default as 'medium' */
-       if (*vconf_value == SYSTEM_SETTINGS_TAP_AND_HOLD_DELAY_SHORT) {
-               result = "IDS_COM_POP_SHORT";
-       } else if (*vconf_value == SYSTEM_SETTINGS_TAP_AND_HOLD_DELAY_MEDIUM) {
-               result = "IDS_ST_BODY_MEDIUM";
-       } else if (*vconf_value == SYSTEM_SETTINGS_TAP_AND_HOLD_DELAY_LONG) {
-               result = "IDS_COM_POP_LONG";
-       } else {
-               return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
-       }
-
-       if (system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_ACCESSIBILITY_TAP_HOLD_DELAY_STR, result)) {
-               return SYSTEM_SETTINGS_ERROR_IO_ERROR;
-       }
        return SYSTEM_SETTINGS_ERROR_NONE;
 }
 
@@ -855,13 +945,12 @@ static int category_func(const char *name, void *user_data)
  */
 int system_setting_set_lockscreen_app(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
 {
+       SETTING_TRACE_BEGIN;
        char *vconf_value;
        vconf_value = (char *)value;            /* ex) com.samsung.lockscreen */
 
-#if 0
        int r = 0;
        pkgmgrinfo_appinfo_h handle;
-       char *apptype = NULL;
        r = pkgmgrinfo_appinfo_get_appinfo(vconf_value, &handle);
        if (r != PMINFO_R_OK) {
                SETTING_TRACE("*** pkginfo failed ");
@@ -895,7 +984,6 @@ int system_setting_set_lockscreen_app(system_settings_key_e key, system_setting_
                        return SYSTEM_SETTINGS_ERROR_IO_ERROR;
                }
        }
-#endif
        return SYSTEM_SETTINGS_ERROR_NONE;
 }
 
@@ -904,91 +992,97 @@ int system_setting_set_lockscreen_app(system_settings_key_e key, system_setting_
 
 int system_setting_set_changed_callback_incoming_call_ringtone(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_CALL_RINGTONE_PATH_STR, SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE, 0, user_data);
 }
 
 int system_setting_unset_changed_callback_incoming_call_ringtone(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, 0);
 }
 
 int system_setting_set_changed_callback_email_alert_ringtone(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_EMAIL_ALERT_RINGTONE, 0, user_data);
 }
 
 int system_setting_unset_changed_callback_email_alert_ringtone(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, 0);
 }
 
 int system_setting_set_changed_callback_wallpaper_home_screen(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_set_changed_cb(VCONFKEY_BGSET, SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, 0, user_data);
 }
 
 int system_setting_unset_changed_callback_wallpaper_home_screen(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_BGSET, 0);
 }
 
 int system_setting_set_changed_callback_wallpaper_lock_screen(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_set_changed_cb(VCONFKEY_IDLE_LOCK_BGSET, SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, 0, user_data);
 }
 
 int system_setting_unset_changed_callback_wallpaper_lock_screen(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_IDLE_LOCK_BGSET, 0);
 }
 
 int system_setting_set_changed_callback_font_size(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_ACCESSIBILITY_FONT_SIZE, SYSTEM_SETTINGS_KEY_FONT_SIZE, 1, user_data);
 }
 
 int system_setting_unset_changed_callback_font_size(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, 1);
 }
 
 int system_setting_set_changed_callback_usb_debugging_option(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_USB_DEBUG_MODE_BOOL, SYSTEM_SETTINGS_KEY_USB_DEBUGGING_ENABLED, 1, user_data);
 }
 
 int system_setting_unset_changed_callback_usb_debugging_option(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, 1);
 }
 
 int system_setting_set_changed_callback_3g_data_network(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_set_changed_cb(VCONFKEY_3G_ENABLE, SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, 1, user_data);
 }
 
 int system_setting_unset_changed_callback_3g_data_network(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_3G_ENABLE, 1);
 }
 
-int system_setting_set_changed_callback_tap_and_hold_delay(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
-{
-       return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_TAP_HOLD_DELAY_STR, SYSTEM_SETTINGS_KEY_TAP_AND_HOLD_DELAY, 1, user_data);
-}
-
-int system_setting_unset_changed_callback_tap_and_hold_delay(system_settings_key_e key)
-{
-       return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_TAP_HOLD_DELAY_STR, 1);
-}
-
 int system_setting_set_changed_callback_lockscreen_app(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
 {
-       return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_3RD_LOCK_PKG_NAME_STR, SYSTEM_SETTINGS_KEY_TAP_AND_HOLD_DELAY, 1, user_data);
+       SETTING_TRACE_BEGIN;
+       return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_3RD_LOCK_PKG_NAME_STR, SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP, 1, user_data);
 }
 
 int system_setting_unset_changed_callback_lockscreen_app(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_3RD_LOCK_PKG_NAME_STR, 1);
 }
 
@@ -998,426 +1092,34 @@ int system_setting_unset_changed_callback_lockscreen_app(system_settings_key_e k
  */
 int system_setting_set_changed_callback_font_type(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_ACCESSIBILITY_FONT_NAME, SYSTEM_SETTINGS_KEY_FONT_TYPE, 2, user_data);
 }
 
 int system_setting_unset_changed_callback_font_type(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME, 2);
 }
 
 /* TODO : 2th argument, callback, is not in use. */
 int system_setting_set_changed_callback_motion_activation(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_MOTION_ACTIVATION, SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION, 3, user_data);
 }
 
 int system_setting_unset_changed_callback_motion_activation(system_settings_key_e key)
 {
-       return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_MOTION_ACTIVATION, 3);
-}
-
-static char *_get_cur_font()
-{
-       xmlDocPtr doc = NULL;
-       xmlNodePtr cur = NULL;
-       xmlNodePtr cur2 = NULL;
-       xmlNodePtr cur3 = NULL;
-       xmlChar *key = NULL;
-
-       char *font_name = NULL;
-
-       doc = xmlParseFile(SETTING_FONT_CONF_FILE);
-
-       cur = xmlDocGetRootElement(doc);
-
-       if (cur == NULL) {
-               xmlFreeDoc(doc);
-               doc = NULL;
-               return NULL;
-       }
-
-       if (xmlStrcmp(cur->name, (const xmlChar *)"fontconfig")) {
-               xmlFreeDoc(doc);
-               doc = NULL;
-               return NULL;
-       }
-
-       cur = cur->xmlChildrenNode;
-
-       while (cur != NULL) {
-               if ((!xmlStrcmp(cur->name, (const xmlChar *)"match"))) {
-                       cur2 = cur->xmlChildrenNode;
-                       while (cur2 != NULL) {
-                               if ((!xmlStrcmp(cur2->name, (const xmlChar *)"edit"))) {
-                                       cur3 = cur2->xmlChildrenNode;
-                                       while (cur3 != NULL) {
-                                               if ((!xmlStrcmp(cur3->name, (const xmlChar *)"string"))) {
-                                                       key = xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1);
-
-                                                       font_name = g_strdup((char *)key);
-                                                       xmlFree(key);
-                                                       key = NULL;
-                                                       xmlFreeDoc(doc);
-                                                       doc = NULL;
-                                                       return font_name;
-                                               }
-                                               cur3 = cur3->next;
-                                       }
-                               }
-                               cur2 = cur2->next;
-                       }
-               }
-               cur = cur->next;
-       }
-
-       xmlFreeDoc(doc);
-       doc = NULL;
-       return NULL;
-}
-
-static void font_config_set_notification()
-{
-#if 0
-       /* notification */
-       Ecore_X_Window ecore_win = ecore_x_window_root_first_get();
-       Ecore_X_Atom atom = ecore_x_atom_get("FONT_TYPE_change");
-       ecore_x_window_prop_string_set(ecore_win, atom, "tizen");
-#endif
-}
-
-int __is_available_font(char *font_name)
-{
        SETTING_TRACE_BEGIN;
-       FcObjectSet *os = NULL;
-       FcFontSet *fs = NULL;
-       FcPattern *pat = NULL;
-       Eina_List *list = NULL;
-       FcConfig *font_config = NULL;
-
-       int ret = 0;
-
-       if (font_name == NULL)
-               return -1;
-
-       font_config = FcInitLoadConfigAndFonts();
-
-       /*setting_retvm_if(font_config == NULL, NULL, "Failed: FcInitLoadConfigAndFonts"); */
-
-       char *locale = setlocale(0, NULL);
-
-       pat = FcPatternCreate();
-
-       os = FcObjectSetBuild(FC_FAMILY, FC_FILE, FC_FAMILYLANG, (char *) 0);
-
-       if (os) {
-               fs = FcFontList(font_config, pat, os);
-               FcObjectSetDestroy(os);
-               os = NULL;
-       }
-
-       if (pat) {
-               FcPatternDestroy(pat);
-               pat = NULL;
-       }
-
-       if (fs) {
-               int j;
-               SETTING_TRACE("fs->nfont = %d", fs->nfont);
-
-               for (j = 0; j < fs->nfont; j++) {
-                       FcChar8 *family = NULL;
-                       FcChar8 *file = NULL;
-
-                       if (FcPatternGetString(fs->fonts[j], FC_FILE, 0, &file) == FcResultMatch) {
-                               int preload_path_len = strlen(SETTING_FONT_PRELOAD_FONT_PATH);
-                               int download_path_len = strlen(SETTING_FONT_DOWNLOADED_FONT_PATH);
-
-                               if (file && (!strncmp((const char *)file, SETTING_FONT_PRELOAD_FONT_PATH, preload_path_len)
-                                            || !strncmp((const char *)file, SETTING_FONT_DOWNLOADED_FONT_PATH, download_path_len))) {
-                                       char *family_result = NULL;
-                                       FcChar8 *lang = NULL;
-                                       int id = 0;
-                                       if (FcPatternGetString(fs->fonts[j], FC_FAMILY, id, &family) != FcResultMatch) {
-                                               break;
-                                       }
-                                       if (FcPatternGetString(fs->fonts[j], FC_FAMILYLANG, id, &lang) != FcResultMatch) {
-                                               break;
-                                       }
-                                       family_result = (char *)family;
-
-                                       /* Find proper family name for current locale. */
-                                       while (locale && family && lang) {
-                                               if (!strncmp(locale, (char *)lang, strlen((char *)lang))) {
-                                                       family_result = (char *)family;
-                                                       break;
-                                               }
-
-                                               /* I will set english as default family language. */
-                                               /* If there is no proper family language for current locale, */
-                                               /* we have to show the english family name. */
-                                               if (!strcmp(lang, "en")) {
-                                                       family_result = (char *)family;
-                                               }
-                                               id++;
-                                               if (FcPatternGetString(fs->fonts[j], FC_FAMILY, id, &family) != FcResultMatch) {
-                                                       break;
-                                               }
-                                               if (FcPatternGetString(fs->fonts[j], FC_FAMILYLANG, id, &lang) != FcResultMatch) {
-                                                       break;
-                                               }
-                                       }
-
-                                       if (family_result) {
-                                               SETTING_TRACE("-------- FONT - family_result = %s", (char *)family_result);
-                                               if (strcmp(family_result, font_name) == 0) {
-                                                       ret = 1;
-                                                       break;
-                                               }
-                                       }
-                               }
-                       }
-               }
-               FcFontSetDestroy(fs);
-               fs = NULL;
-       }
-       FcConfigDestroy(font_config);
-       font_config = NULL;
-       return ret;
-}
-
-
-static char *_get_default_font()
-{
-       xmlDocPtr doc = NULL;
-       xmlNodePtr cur = NULL;
-       xmlNodePtr cur2 = NULL;
-       xmlNodePtr cur3 = NULL;
-       xmlChar *key = NULL;
-       struct _xmlAttr *properties = NULL;
-       char *default_font_name = NULL;
-
-       doc = xmlParseFile(SETTING_DEFAULT_FONT_CONF_FILE);
-
-       cur = xmlDocGetRootElement(doc);
-
-       if (cur == NULL) {
-               xmlFreeDoc(doc);
-               doc = NULL;
-               return NULL;
-       }
-
-       if (xmlStrcmp(cur->name, (const xmlChar *)"fontconfig")) {
-               xmlFreeDoc(doc);
-               doc = NULL;
-               return NULL;
-       }
-
-       cur = cur->xmlChildrenNode;
-
-       while (cur != NULL) {
-               if ((!xmlStrcmp(cur->name, (const xmlChar *)"match"))) {
-                       cur2 = cur->xmlChildrenNode;
-                       while (cur2 != NULL) {
-                               if ((!xmlStrcmp(cur2->name, (const xmlChar *)"edit"))) {
-                                       properties = cur2->properties;
-                                       /*find the "name" property*/
-                                       while (NULL != properties) {
-                                               if (!xmlStrcmp(properties->name, (const xmlChar *)"name")) {
-                                                       break;
-                                               }
-                                               properties = properties->next;
-                                       }
-
-                                       /*If the value of "name" property is "family", then get the child node string,
-                                       it shall be the default font type*/
-                                       if (NULL != properties && !xmlStrcmp(properties->children->content, (const xmlChar *)"family")) {
-                                               cur3 = cur2->xmlChildrenNode;
-                                               while (cur3 != NULL) {
-                                                       if ((!xmlStrcmp(cur3->name, (const xmlChar *)"string"))) {
-                                                               key = xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1);
-                                                               default_font_name = g_strdup((char *)key);
-                                                               xmlFree(key);
-                                                               key = NULL;
-                                                               xmlFreeDoc(doc);
-                                                               doc = NULL;
-                                                               return default_font_name;
-                                                       }
-                                                       cur3 = cur3->next;
-                                               }
-                                       }
-                               }
-                               cur2 = cur2->next;
-                       }
-               }
-               cur = cur->next;
-       }
-
-       xmlFreeDoc(doc);
-       doc = NULL;
-       return NULL;
-}
-
-static bool font_config_set(char *font_name)
-{
-       Eina_List *text_classes = NULL;
-       Elm_Text_Class *etc = NULL;
-       const Eina_List *l = NULL;
-       Eina_List *fo_list = NULL;
-       Elm_Font_Overlay *efo = NULL;
-
-       int font_size = __font_size_get();
-       int size = 0;
-
-       text_classes = elm_config_text_classes_list_get();
-
-       fo_list = (Eina_List *)elm_config_font_overlay_list_get();
-
-       Eina_List *ll = NULL;
-       Eina_List *l_next = NULL;
-
-       Eina_Bool slp_medium_exist = EINA_FALSE;
-       Eina_Bool slp_roman_exist = EINA_FALSE;
-       Eina_Bool slp_bold_exist = EINA_FALSE;
-       Eina_Bool slp_regular_exist = EINA_FALSE;
-
-       /* Tizen */
-       Eina_Bool tizen_exist = EINA_FALSE;
-
-       EINA_LIST_FOREACH_SAFE(fo_list, ll, l_next, efo) {
-               if (!strcmp(efo->text_class, "tizen_medium")) {
-                       elm_config_font_overlay_set(efo->text_class, (const char *)font_name, efo->size);
-                       slp_medium_exist = EINA_TRUE;
-               } else if (!strcmp(efo->text_class, "tizen_roman")) {
-                       elm_config_font_overlay_set(efo->text_class, (const char *)font_name, efo->size);
-                       slp_roman_exist = EINA_TRUE;
-               } else if (!strcmp(efo->text_class, "tizen_bold")) {
-                       elm_config_font_overlay_set(efo->text_class, (const char *)font_name, efo->size);
-                       slp_bold_exist = EINA_TRUE;
-               } else if (!strcmp(efo->text_class, "tizen_regular")) {
-                       elm_config_font_overlay_set(efo->text_class, (const char *)font_name, efo->size);
-                       slp_regular_exist = EINA_TRUE;
-               }
-
-               /* Tizen */
-               if (!strcmp(efo->text_class, "tizen")) {
-                       elm_config_font_overlay_set(efo->text_class, (const char *)font_name, efo->size);
-                       tizen_exist = EINA_TRUE;
-               }
-
-       }
-
-       /* if slp_XX do not exist, need to set them, font size is -100(100%) */
-       if (slp_medium_exist == EINA_FALSE) {
-               elm_config_font_overlay_set("tizen_medium", (const char *)font_name,  MIDDLE_FONT_DPI);
-       }
-       if (slp_roman_exist == EINA_FALSE) {
-               elm_config_font_overlay_set("tizen_roman", (const char *)font_name,  MIDDLE_FONT_DPI);
-       }
-       if (slp_bold_exist == EINA_FALSE) {
-               elm_config_font_overlay_set("tizen_bold", (const char *)font_name,  MIDDLE_FONT_DPI);
-       }
-       if (slp_regular_exist == EINA_FALSE) {
-               elm_config_font_overlay_set("tizen_regular", (const char *)font_name,  MIDDLE_FONT_DPI);
-       }
-
-       /* Tizen */
-       if (tizen_exist == EINA_FALSE) {
-               elm_config_font_overlay_set("tizen", (const char *)font_name,  MIDDLE_FONT_DPI);
-       }
-
-       elm_config_font_overlay_set("tizen", (const char *)font_name,  MIDDLE_FONT_DPI);
-
-       /* Tizen */
-       elm_config_font_overlay_set("tizen", (const char *)font_name,  MIDDLE_FONT_DPI);
-
-       EINA_LIST_FOREACH(text_classes, l, etc) {
-               ll = NULL;
-
-               size = font_size;
-               EINA_LIST_FOREACH(fo_list, ll, efo) {
-                       if (!strcmp(etc->name, efo->text_class)) {
-                               size = efo->size;
-                       }
-               }
-               elm_config_font_overlay_set(etc->name, (const char *)font_name, size);
-       }
-       elm_config_text_classes_list_free(text_classes);
-       text_classes = NULL;
-
-       /* add new function */
-#ifdef USE_EFL_ASSIST
-       ea_theme_system_font_set(font_name, font_size);
-       ea_theme_system_fonts_apply();
-#endif
-       return 1;
-}
-
-static void __font_size_set()
-{
-       Eina_List *text_classes = NULL;
-       Elm_Text_Class *etc = NULL;
-       const Eina_List *l = NULL;
-       int font_size = __font_size_get();
-       char *font_name = _get_cur_font();
-
-       if (font_size == -1) {
-               return;
-       }
-
-       text_classes = elm_config_text_classes_list_get();
-
-       EINA_LIST_FOREACH(text_classes, l, etc) {
-               elm_config_font_overlay_set(etc->name, font_name, font_size);
-       }
-
-       elm_config_text_classes_list_free(text_classes);
-
-#ifdef USE_EFL_ASSIST
-       ea_theme_system_font_set(font_name, font_size);
-       ea_theme_system_fonts_apply();
-#endif
-       text_classes = NULL;
-       g_free(font_name);
-}
-
-static int __font_size_get()
-{
-       int font_size = -1;
-       int err = -1;
-
-       int vconf_value = -1;
-       if (system_setting_vconf_get_value_int(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, &vconf_value)) {
-               return -1;
-       }
-
-       switch (vconf_value) {
-               case SYSTEM_SETTINGS_FONT_SIZE_SMALL:
-                       font_size = SMALL_FONT_DPI;
-                       break;
-               case SYSTEM_SETTINGS_FONT_SIZE_NORMAL:
-                       font_size = MIDDLE_FONT_DPI;
-                       break;
-               case SYSTEM_SETTINGS_FONT_SIZE_LARGE:
-                       font_size = LARGE_FONT_DPI;
-                       break;
-               case SYSTEM_SETTINGS_FONT_SIZE_HUGE:
-                       font_size = HUGE_FONT_DPI;
-                       break;
-               case SYSTEM_SETTINGS_FONT_SIZE_GIANT:
-                       font_size = GIANT_FONT_DPI;
-                       break;
-               default:
-                       font_size = MIDDLE_FONT_DPI;
-                       break;
-       }
-       return font_size;
+       return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_MOTION_ACTIVATION, 3);
 }
 
 /*//////////////////////////////////////////////////////////////////////////////////////// */
 /*--------------------------------------- */
 int system_setting_get_locale_country(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        char *vconf_value = NULL;
        if (system_setting_vconf_get_value_string(VCONFKEY_REGIONFORMAT, &vconf_value)) {
                return SYSTEM_SETTINGS_ERROR_IO_ERROR;
@@ -1426,7 +1128,7 @@ int system_setting_get_locale_country(system_settings_key_e key, system_setting_
        /* parsing validation */
        /* en_US.UTF-8 */
        char arr[20];
-       snprintf(arr, 20, vconf_value);
+       snprintf(arr, 20, "%s", vconf_value);
        arr[5] = '\0';
        *value = strdup(arr);
        free(vconf_value);
@@ -1437,6 +1139,7 @@ int system_setting_get_locale_country(system_settings_key_e key, system_setting_
 
 int system_setting_set_locale_country(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
 {
+       SETTING_TRACE_BEGIN;
        char *vconf_value = NULL;
        vconf_value = (char *)value;
 
@@ -1448,17 +1151,18 @@ int system_setting_set_locale_country(system_settings_key_e key, system_setting_
        if (system_setting_vconf_set_value_string(VCONFKEY_REGIONFORMAT, arr)) {
                return SYSTEM_SETTINGS_ERROR_IO_ERROR;
        }
-
        return SYSTEM_SETTINGS_ERROR_NONE;
 }
 
 int system_setting_set_changed_callback_locale_country(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_set_changed_cb(VCONFKEY_REGIONFORMAT, SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, 3, user_data);
 }
 
 int system_setting_unset_changed_callback_locale_country(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_REGIONFORMAT, 3);
 }
 
@@ -1466,6 +1170,7 @@ int system_setting_unset_changed_callback_locale_country(system_settings_key_e k
 /*--------------------------------------- */
 int system_setting_get_locale_language(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        char *vconf_value = NULL;
        if (system_setting_vconf_get_value_string(VCONFKEY_LANGSET, &vconf_value)) {
                return SYSTEM_SETTINGS_ERROR_IO_ERROR;
@@ -1474,7 +1179,7 @@ int system_setting_get_locale_language(system_settings_key_e key, system_setting
        /* parsing validation */
        /* en_US.UTF-8 */
        char arr[20];
-       snprintf(arr, 20, vconf_value);
+       snprintf(arr, 20, "%s", vconf_value);
        arr[5] = '\0';
        *value = strdup(arr);
        free(vconf_value);
@@ -1484,6 +1189,7 @@ int system_setting_get_locale_language(system_settings_key_e key, system_setting
 
 int system_setting_set_locale_language(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
 {
+       SETTING_TRACE_BEGIN;
        char *vconf_value = NULL;
        vconf_value = (char *)value;
 
@@ -1495,31 +1201,33 @@ int system_setting_set_locale_language(system_settings_key_e key, system_setting
        if (system_setting_vconf_set_value_string(VCONFKEY_LANGSET, arr)) {
                return SYSTEM_SETTINGS_ERROR_IO_ERROR;
        }
-
        return SYSTEM_SETTINGS_ERROR_NONE;
 }
 
 int system_setting_set_changed_callback_locale_language(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
 {
+       SETTING_TRACE_BEGIN;
        /*return system_setting_vconf_set_changed_cb(VCONFKEY_LANGSET, SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, 3, user_data ); */
        return system_setting_vconf_set_changed_cb(VCONFKEY_LANGSET, SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, 100, user_data);
 }
 
 int system_setting_unset_changed_callback_locale_language(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_LANGSET, 100);
 }
 
 /*--------------------------------------- */
 int system_setting_get_locale_timeformat_24hour(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        int vconf_value;
 
        if (system_setting_vconf_get_value_int(VCONFKEY_REGIONFORMAT_TIME1224, &vconf_value)) {
                return SYSTEM_SETTINGS_ERROR_IO_ERROR;
        }
 
-       bool ret_value;
+       bool ret_value = true;
        if (vconf_value == VCONFKEY_TIME_FORMAT_12)
                ret_value = false;
        else if (vconf_value == VCONFKEY_TIME_FORMAT_24)
@@ -1532,6 +1240,7 @@ int system_setting_get_locale_timeformat_24hour(system_settings_key_e key, syste
 
 int system_setting_set_locale_timeformat_24hour(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
 {
+       SETTING_TRACE_BEGIN;
        bool *vconf_value;
 
        vconf_value = (bool *)value;
@@ -1553,44 +1262,72 @@ int system_setting_set_locale_timeformat_24hour(system_settings_key_e key, syste
 
 int system_setting_set_changed_callback_locale_timeformat_24hour(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_set_changed_cb(VCONFKEY_REGIONFORMAT_TIME1224, SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, 3, user_data);
 }
 
 int system_setting_unset_changed_callback_locale_timeformat_24hour(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_REGIONFORMAT_TIME1224, 3);
 }
 
 int system_setting_get_locale_timezone(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
-       char tzpath[256];
-       ssize_t len = readlink(SETTING_TZONE_SYMLINK_PATH, tzpath, sizeof(tzpath) - 1);
-       if (len != -1) {
-               tzpath[len] = '\0';
-       } else {
-               SETTING_TRACE("parse error for SETTING_TZONE_SYMLINK_PATH");
-               return SYSTEM_SETTINGS_ERROR_IO_ERROR;
+       SETTING_TRACE_BEGIN;
+       *value = vconf_get_str(VCONFKEY_SETAPPL_TIMEZONE_ID);
+       return SYSTEM_SETTINGS_ERROR_NONE;
+}
+
+int system_setting_set_locale_timezone(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
+{
+       SETTING_TRACE_BEGIN;
+       char *vconf_value = NULL;
+       vconf_value = (char *)value;
+
+       char tz_path[1024];
+       snprintf(tz_path, 1024, "/usr/share/zoneinfo/%s", vconf_value);
+
+       int is_load = _is_file_accessible(tz_path);
+       if (is_load == 0) {
+               alarmmgr_set_timezone(tz_path);
+
+               if (system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_TIMEZONE_ID, vconf_value)) {
+                       return SYSTEM_SETTINGS_ERROR_IO_ERROR;
+               }
+               return SYSTEM_SETTINGS_ERROR_NONE;
        }
+       return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
+}
 
-       /* "/usr/share/zoneinfo/Asia/Seoul" */
-       SETTING_TRACE("tzpath : %s ", &tzpath[20]);
-       *value = strdup(&tzpath[20]);
-       return SYSTEM_SETTINGS_ERROR_NONE;
+
+
+int system_setting_set_changed_callback_locale_timezone(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
+{
+       return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_TIMEZONE_ID, SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE, 4, user_data);
+}
+
+int system_setting_unset_changed_callback_locale_timezone(system_settings_key_e key)
+{
+       return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_TIMEZONE_ID, 4);
 }
 
 int system_setting_set_changed_callback_locale_timezone_changed(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
 {
+       SETTING_TRACE_BEGIN;
        return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
 }
 
 int system_setting_unset_changed_callback_locale_timezone_changed(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
 }
 
 
 int system_setting_get_time_changed(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        time_t cur_tick;
        cur_tick = time(NULL);
        *value = (void *)cur_tick;
@@ -1602,11 +1339,13 @@ int system_setting_get_time_changed(system_settings_key_e key, system_setting_da
 
 int system_setting_set_changed_callback_time_changed(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_set_changed_cb(VCONFKEY_SYSTEM_TIME_CHANGED, SYSTEM_SETTINGS_KEY_TIME_CHANGED, 3, user_data);
 }
 
 int system_setting_unset_changed_callback_time_changed(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_SYSTEM_TIME_CHANGED, 3);
 }
 
@@ -1615,6 +1354,7 @@ int system_setting_unset_changed_callback_time_changed(system_settings_key_e key
 /* SYSTEM_SETTINGS_KEY_SOUND_LOCK */
 int system_setting_get_sound_lock(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        bool vconf_value;
 
        if (system_setting_vconf_get_value_bool(VCONFKEY_SETAPPL_SOUND_LOCK_BOOL, &vconf_value)) {
@@ -1627,11 +1367,13 @@ int system_setting_get_sound_lock(system_settings_key_e key, system_setting_data
 
 int system_setting_set_changed_callback_sound_lock(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_SOUND_LOCK_BOOL, SYSTEM_SETTINGS_KEY_SOUND_LOCK, 3, user_data);
 }
 
 int system_setting_unset_changed_callback_sound_lock(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_SOUND_LOCK_BOOL, 3);
 }
 
@@ -1644,6 +1386,7 @@ int system_setting_unset_changed_callback_sound_lock(system_settings_key_e key)
  */
 int system_setting_get_sound_silent_mode(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        bool sound_cond;
        bool vib_cond;
 
@@ -1674,6 +1417,7 @@ int system_setting_get_sound_silent_mode(system_settings_key_e key, system_setti
  */
 int system_setting_set_sound_silent_mode(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
 {
+       SETTING_TRACE_BEGIN;
        bool *vconf_value;
 
        vconf_value = (bool *)value;
@@ -1681,7 +1425,7 @@ int system_setting_set_sound_silent_mode(system_settings_key_e key, system_setti
        bool vconf_sound = false;
        bool vconf_vib = false;
 
-       if (vconf_value) {
+       if (*vconf_value) {
                vconf_sound = false;
                vconf_vib = false;
        } else {
@@ -1704,33 +1448,40 @@ int system_setting_set_sound_silent_mode(system_settings_key_e key, system_setti
 /* TODO */
 int system_setting_set_changed_callback_sound_silent_mode(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_SOUND_STATUS_BOOL, SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE, 3, user_data);
 }
 
 /* TODO */
 int system_setting_unset_changed_callback_sound_silent_mode(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, 3);
 }
 
 /* SYSTEM_SETTINGS_KEY_SOUND_TOUCH */
 int system_setting_get_sound_touch(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        bool vconf_value;
 
-       if (system_setting_vconf_get_value_bool(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, &vconf_value)) {
-               return SYSTEM_SETTINGS_ERROR_IO_ERROR;
+       int ret = system_setting_vconf_get_value_bool(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, &vconf_value);
+       if (ret != SYSTEM_SETTINGS_ERROR_NONE) {
+               return ret;
        }
        *value = (void *)vconf_value;
+       return ret;
 }
 
 int system_setting_set_changed_callback_sound_touch(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_TOUCH_SOUNDS_BOOL, SYSTEM_SETTINGS_KEY_SOUND_TOUCH, 2, user_data);
 }
 
 int system_setting_unset_changed_callback_sound_touch(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, 2);
 }
 
@@ -1751,6 +1502,7 @@ int system_setting_get_sound_lock(system_settings_key_e key, system_setting_data
 
 int system_setting_get_auto_rotation_mode(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        bool vconf_value;
 
        if (system_setting_vconf_get_value_bool(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL, &vconf_value)) {
@@ -1763,26 +1515,31 @@ int system_setting_get_auto_rotation_mode(system_settings_key_e key, system_sett
 
 int system_setting_set_auto_rotation_mode(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
 {
+       SETTING_TRACE_BEGIN;
        bool *vconf_value;
        vconf_value = (bool *)value;
        if (system_setting_vconf_set_value_bool(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL, *vconf_value)) {
                return SYSTEM_SETTINGS_ERROR_IO_ERROR;
        }
+
        return SYSTEM_SETTINGS_ERROR_NONE;
 }
 
 int system_setting_set_changed_callback_auto_rotation_mode(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_AUTO_ROTATE_SCREEN_BOOL, SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, 2, user_data);
 }
 
 int system_setting_unset_changed_callback_auto_rotation_mode(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL, 2);
 }
 
 int system_setting_get_screen_backlight_time(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        int vconf_value;
 
        if (system_setting_vconf_get_value_int(VCONFKEY_SETAPPL_LCD_TIMEOUT_NORMAL, &vconf_value)) {
@@ -1800,7 +1557,8 @@ 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;
        }
 
@@ -1813,16 +1571,19 @@ 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);
 }
 
 int system_setting_unset_changed_callback_screen_backlight_time(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_LCD_TIMEOUT_NORMAL, 2);
 }
 
 int system_setting_get_sound_notification(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        char *vconf_value = NULL;
        if (system_setting_vconf_get_value_string(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, &vconf_value)) {
                return SYSTEM_SETTINGS_ERROR_IO_ERROR;
@@ -1834,6 +1595,7 @@ int system_setting_get_sound_notification(system_settings_key_e key, system_sett
 
 int system_setting_set_sound_notification(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
 {
+       SETTING_TRACE_BEGIN;
        char *vconf_value = NULL;
        vconf_value = (char *)value;
 
@@ -1851,16 +1613,19 @@ 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);
 }
 
 int system_setting_unset_changed_callback_sound_notification(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, 0);
 }
 
 int system_setting_get_notification_repetition_period(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        int vconf_value;
 
        if (system_setting_vconf_get_value_int(VCONFKEY_SETAPPL_NOTI_MSG_ALERT_REP_TYPE_INT, &vconf_value)) {
@@ -1886,16 +1651,19 @@ int system_setting_set_notification_repetition_period(system_settings_key_e key,
 
 int system_setting_set_changed_callback_notification_repetition_period(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
 {
-       return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_NOTI_MSG_ALERT_REP_TYPE_INT, SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, 1, user_data);
+       SETTING_TRACE_BEGIN;
+       return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_NOTI_MSG_ALERT_REP_TYPE_INT, SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION_REPETITION_PERIOD, 1, user_data);
 }
 
 int system_setting_unset_changed_callback_notification_repetition_period(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_NOTI_MSG_ALERT_REP_TYPE_INT, 1);
 }
 
 int system_setting_get_device_name(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        char *vconf_value = NULL;
        if (system_setting_vconf_get_value_string(VCONFKEY_SETAPPL_DEVICE_NAME_STR, &vconf_value)) {
                return SYSTEM_SETTINGS_ERROR_IO_ERROR;
@@ -1907,6 +1675,7 @@ int system_setting_get_device_name(system_settings_key_e key, system_setting_dat
 
 int system_setting_set_device_name(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
 {
+       SETTING_TRACE_BEGIN;
        char *vconf_value = NULL;
        vconf_value = (char *)value;
 
@@ -1919,17 +1688,20 @@ int system_setting_set_device_name(system_settings_key_e key, system_setting_dat
 
 int system_setting_set_changed_callback_device_name(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_DEVICE_NAME_STR, SYSTEM_SETTINGS_KEY_DEVICE_NAME, 0, user_data);
 }
 
 int system_setting_unset_changed_callback_device_name(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_DEVICE_NAME_STR, 0);
 }
 
 /*---------------------------------------------- */
 int system_setting_get_network_flight_mode(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        bool vconf_value;
        if (system_setting_vconf_get_value_bool(VCONFKEY_TELEPHONY_FLIGHT_MODE, &vconf_value)) {
                return SYSTEM_SETTINGS_ERROR_IO_ERROR;
@@ -1941,16 +1713,19 @@ int system_setting_get_network_flight_mode(system_settings_key_e key, system_set
 
 int system_setting_set_changed_callback_network_flight_mode(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_set_changed_cb(VCONFKEY_TELEPHONY_FLIGHT_MODE, SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE, 3, user_data);
 }
 
 int system_setting_unset_changed_callback_network_flight_mode(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_TELEPHONY_FLIGHT_MODE, 3);
 }
 
 int system_setting_get_network_wifi_notification(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
+       SETTING_TRACE_BEGIN;
        int vconf_value;
        if (system_setting_vconf_get_value_int(VCONFKEY_WIFI_ENABLE_QS, &vconf_value)) {
                return SYSTEM_SETTINGS_ERROR_IO_ERROR;
@@ -1964,13 +1739,49 @@ int system_setting_get_network_wifi_notification(system_settings_key_e key, syst
 
 int system_setting_set_changed_callback_network_wifi_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_WIFI_ENABLE_QS, SYSTEM_SETTINGS_KEY_NETWORK_WIFI_NOTIFICATION, 4, user_data);
 }
 
 int system_setting_unset_changed_callback_network_wifi_notification(system_settings_key_e key)
 {
+       SETTING_TRACE_BEGIN;
        return system_setting_vconf_unset_changed_cb(VCONFKEY_WIFI_ENABLE_QS, 4);
 }
 
+int system_setting_get_lock_state(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
+{
+       int vconf_value;
+
+       if (system_setting_vconf_get_value_int(VCONFKEY_IDLE_LOCK_STATE_READ_ONLY, &vconf_value)) {
+               return SYSTEM_SETTINGS_ERROR_IO_ERROR;
+       }
+       *value = (void *)vconf_value;
+
+       return SYSTEM_SETTINGS_ERROR_NONE;
+}
+
+int system_setting_set_lock_state(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
+{
+       SETTING_TRACE_BEGIN;
+       int *vconf_value;
+       vconf_value = (int *)value;
+
+       if (system_setting_vconf_set_value_int(VCONFKEY_IDLE_LOCK_STATE_READ_ONLY, *vconf_value)) {
+               return SYSTEM_SETTINGS_ERROR_IO_ERROR;
+       }
+       SETTING_TRACE_END;
+       return SYSTEM_SETTINGS_ERROR_NONE;
+}
+
+int system_setting_set_changed_callback_lock_state(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
+{
+       return system_setting_vconf_set_changed_cb(VCONFKEY_IDLE_LOCK_STATE_READ_ONLY, SYSTEM_SETTINGS_KEY_LOCK_STATE, 4, user_data);
+}
+
+int system_setting_unset_changed_callback_lock_state(system_settings_key_e key)
+{
+       return system_setting_vconf_unset_changed_cb(VCONFKEY_IDLE_LOCK_STATE_READ_ONLY, 4);
+}