From: taeyoung Date: Mon, 8 Aug 2016 02:54:36 +0000 (+0900) Subject: power: remove power lock auto release feature with TV profile X-Git-Tag: accepted/tizen/common/20160808.121143^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=de521cc97c2a6213411b8f25c30944d9aecb6423;p=platform%2Fcore%2Fapi%2Fdevice.git power: remove power lock auto release feature with TV profile - TV profile does not have the libtracker, and build problems can be occurred with TV. Thus power lock auto release feature which is related with libtracker is disabled with TV. Change-Id: I7c71ed715728dae214299651fd6bff7ef0d5a308 Signed-off-by: taeyoung --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b56a58..a6a39f9 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,15 +10,23 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(INC_DIR include) INCLUDE_DIRECTORIES(${INC_DIR}) -INCLUDE(FindPkgConfig) -pkg_check_modules(${fw_name} REQUIRED +SET(PKG_MODULES dlog vconf capi-base-common capi-system-info gio-2.0 +) + +IF("${TIZEN_FEATURE_TRACKER}" STREQUAL "on") +SET(PKG_MODULES ${PKG_MODULES} tracker ) +ADD_DEFINITIONS("-DTIZEN_FEATURE_TRACKER") +ENDIF("${TIZEN_FEATURE_TRACKER}" STREQUAL "on") + +INCLUDE(FindPkgConfig) +pkg_check_modules(${fw_name} REQUIRED ${PKG_MODULES}) FOREACH(flag ${${fw_name}_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) diff --git a/packaging/capi-system-device.spec b/packaging/capi-system-device.spec index ca2d14d..cc57d41 100644 --- a/packaging/capi-system-device.spec +++ b/packaging/capi-system-device.spec @@ -1,3 +1,9 @@ +%define TIZEN_FEATURE_TRACKER on + +%if "%{?profile}" == "tv" +%define TIZEN_FEATURE_TRACKER off +%endif + Name: capi-system-device Summary: A Device library in TIZEN C API Version: 0.1.0 @@ -12,7 +18,9 @@ BuildRequires: pkgconfig(capi-system-info) BuildRequires: pkgconfig(dlog) BuildRequires: pkgconfig(vconf) BuildRequires: pkgconfig(gio-2.0) +%if %{?TIZEN_FEATURE_TRACKER} == "on" BuildRequires: pkgconfig(tracker) +%endif %description A Device library in TIZEN C API package. @@ -32,7 +40,10 @@ A Device library in TIZEN C API (Development) package. %build cp %{SOURCE1} . MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` -%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} +%cmake . -DFULLVER=%{version} \ + -DMAJORVER=${MAJORVER} \ + -DTIZEN_FEATURE_TRACKER=%{TIZEN_FEATURE_TRACKER} + %__make %{?jobs:-j%jobs} %install diff --git a/src/power.c b/src/power.c index 647c9a2..9087fc3 100644 --- a/src/power.c +++ b/src/power.c @@ -19,7 +19,10 @@ #include #include #include + +#ifdef TIZEN_FEATURE_TRACKER #include +#endif /* TIZEN_FEATURE_TRACKER */ #include "power.h" #include "display.h" @@ -83,6 +86,7 @@ static char *get_state_str(display_state_e state) return NULL; } +#ifdef TIZEN_FEATURE_TRACKER static void remove_off_lock_timeout(void) { if (off_lock_timeout) { @@ -202,6 +206,11 @@ static void add_off_lock_timeout(void) else _E("Failed to add Power Lock timeout handler"); } +#else +#define add_off_lock_timeout() do {} while (0) +#define remove_off_lock_timeout() do {} while (0) +#define remove_padding_timeout() do {} while (0) +#endif /* TIZEN_FEATURE_TRACKER */ static void lock_cb(void *data, GVariant *result, GError *err) {