From 76dd569535954b2948c0c1c75c9b087630105d23 Mon Sep 17 00:00:00 2001 From: "changjoo.lee" Date: Thu, 6 Oct 2016 17:43:38 +0900 Subject: [PATCH] change RECORDER VCONF KEY to new API Change-Id: I6a539c9e90ccb6e198bbe5d31f5c0c33243ea205 Signed-off-by: changjoo.lee --- packaging/system-servant.spec | 1 + system-cooperator/CMakeLists.txt | 1 + system-cooperator/system-cooperator.c | 8 +++++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packaging/system-servant.spec b/packaging/system-servant.spec index 18aa305..b9e2567 100755 --- a/packaging/system-servant.spec +++ b/packaging/system-servant.spec @@ -96,6 +96,7 @@ BuildRequires: pkgconfig(capi-media-sound-manager) BuildRequires: pkgconfig(capi-media-wav-player) BuildRequires: pkgconfig(capi-appfw-application) BuildRequires: pkgconfig(capi-appfw-app-manager) +BuildRequires: pkgconfig(capi-media-recorder) BuildRequires: model-build-features %if "%{?model_build_feature_formfactor}" == "circle" diff --git a/system-cooperator/CMakeLists.txt b/system-cooperator/CMakeLists.txt index 5c400df..e66887d 100755 --- a/system-cooperator/CMakeLists.txt +++ b/system-cooperator/CMakeLists.txt @@ -17,6 +17,7 @@ SET(PKG_MODULES feedback capi-media-sound-manager capi-media-wav-player + capi-media-recorder ) INCLUDE(FindPkgConfig) pkg_check_modules(system-cooperator_pkgs REQUIRED ${PKG_MODULES}) diff --git a/system-cooperator/system-cooperator.c b/system-cooperator/system-cooperator.c index 6ef683b..f0fdb87 100755 --- a/system-cooperator/system-cooperator.c +++ b/system-cooperator/system-cooperator.c @@ -28,6 +28,7 @@ #include #include #include +#include #undef LOG_TAG #define LOG_TAG "SYSTEM_APPS" @@ -95,9 +96,10 @@ static bool get_call_state(void) static bool get_voice_recording_state(void) { - int state; - if (vconf_get_int(VCONFKEY_RECORDER_STATE, &state) == 0 - && (state == VCONFKEY_RECORDER_STATE_RECORDING)) + recorder_device_state_e state = RECORDER_DEVICE_STATE_IDLE; + + if (recorder_get_device_state(RECORDER_TYPE_AUDIO, &state) == 0 + && (state == RECORDER_DEVICE_STATE_RECORDING)) return true; return false; } -- 2.7.4