Remove system-settings dependency 27/100727/1 accepted/tizen/3.0/common/20161130.065010 accepted/tizen/3.0/ivi/20161130.011903 accepted/tizen/3.0/mobile/20161130.011836 accepted/tizen/3.0/tv/20161130.011847 accepted/tizen/3.0/wearable/20161130.011855 submit/tizen_3.0/20161129.053222
authorpr.jung <pr.jung@samsung.com>
Tue, 29 Nov 2016 05:17:43 +0000 (14:17 +0900)
committerpr.jung <pr.jung@samsung.com>
Tue, 29 Nov 2016 05:17:43 +0000 (14:17 +0900)
- Get Ringtone path using vconfkey

Change-Id: Iea9d680f85f8c6fc3c8ed8d42b1bd47aa99ce148
Signed-off-by: pr.jung <pr.jung@samsung.com>
CMakeLists.txt
packaging/libstorage.spec
src/storage.c

index a4feb38..3169d78 100644 (file)
@@ -17,7 +17,6 @@ SET(dependents
                glib-2.0
                gio-2.0
                libtzplatform-config
-               capi-system-system-settings
                mount
 )
 SET(pc_dependents "capi-base-common")
index 90eae50..57611e7 100644 (file)
@@ -13,7 +13,6 @@ BuildRequires:  pkgconfig(vconf)
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(gio-2.0)
 BuildRequires:  pkgconfig(libtzplatform-config)
-BuildRequires:  pkgconfig(capi-system-system-settings)
 BuildRequires:  pkgconfig(mount)
 
 %description
index 26b4036..42aaec2 100644 (file)
@@ -19,7 +19,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
-#include <system_settings.h>
+#include <vconf.h>
 
 #include "common.h"
 #include "list.h"
@@ -164,11 +164,9 @@ API int storage_get_directory(int storage_id, storage_directory_e type, char **p
        if (found && st) {
                snprintf(root, sizeof(root), "%s", st->root());
                if (type == STORAGE_DIRECTORY_SYSTEM_RINGTONES) {
-                       ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE, &temp2);
-                       if (ret < 0) {
-                               _E("Failed to get ringtone path : %d", ret); //LCOV_EXCL_LINE
+                       temp2 = vconf_get_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR);
+                       if (temp2 == NULL)
                                return STORAGE_ERROR_OPERATION_FAILED;
-                       }
                        end = strrchr(temp2, '/');
                        if (end)
                                *end = '\0';