Replace runtime-info and system-settings APIs with vconf to reduce memory consumption 89/66489/1
authorMu-Woong Lee <muwoong.lee@samsung.com>
Tue, 19 Apr 2016 07:24:03 +0000 (16:24 +0900)
committerMu-Woong Lee <muwoong.lee@samsung.com>
Tue, 19 Apr 2016 07:24:03 +0000 (16:24 +0900)
Change-Id: If4dc0a132608bec3c610fafca5a9072fa777b65b
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
CMakeLists.txt
packaging/context-service.spec
src/trigger/ActionManager.cpp

index 1513748..29f2f85 100644 (file)
@@ -14,12 +14,10 @@ SET(DEPS
        vconf
        capi-system-info
        capi-system-device
-       capi-system-runtime-info
        capi-appfw-app-manager
        capi-appfw-package-manager
        appsvc
        notification
-       capi-system-system-settings
        cynara-creds-gdbus
        cynara-client
        cynara-session
index a8af397..c659ba1 100644 (file)
@@ -13,12 +13,10 @@ BuildRequires: sed
 BuildRequires: pkgconfig(vconf)
 BuildRequires: pkgconfig(capi-system-info)
 BuildRequires: pkgconfig(capi-system-device)
-BuildRequires: pkgconfig(capi-system-runtime-info)
 BuildRequires: pkgconfig(capi-appfw-app-manager)
 BuildRequires: pkgconfig(capi-appfw-package-manager)
 BuildRequires: pkgconfig(appsvc)
 BuildRequires: pkgconfig(notification)
-BuildRequires: pkgconfig(capi-system-system-settings)
 
 BuildRequires: pkgconfig(cynara-creds-gdbus)
 BuildRequires: pkgconfig(cynara-client)
index ffb5f4a..5db4ddd 100644 (file)
@@ -20,8 +20,7 @@
 #include <device/display.h>
 #include <notification.h>
 #include <notification_internal.h>
-#include <runtime_info.h>
-#include <system_settings.h>
+#include <vconf.h>
 #include <context_trigger_types_internal.h>
 #include <Json.h>
 #include "../DBusServer.h"
@@ -140,16 +139,21 @@ void __triggerActionNotification(ctx::Json& action, std::string pkgId)
                }
        }
 
+       int status;
        bool silent = true;
-       error = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE, &silent);
-       if (error != SYSTEM_SETTINGS_ERROR_NONE) {
-               _E("Get system setting(silent mode) failed(%d)", error);
+       error = vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &status);
+       if (error < 0) {
+               _E("vconf error (%d)", error);
+       } else {
+               silent = (status == 0);
        }
 
        bool vibration = true;
-       error = runtime_info_get_value_bool(RUNTIME_INFO_KEY_VIBRATION_ENABLED, &vibration);
-       if (error != RUNTIME_INFO_ERROR_NONE) {
-               _E("Get runtime info(vibration) failed(%d)", error);
+       error = vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &status);
+       if (error < 0) {
+               _E("vconf error (%d)", error);
+       } else {
+               vibration = (status != 0);
        }
 
        if (!silent) {