From: Somin Kim Date: Tue, 8 Sep 2015 07:16:38 +0000 (+0900) Subject: Allow service app launching triggers in TV profile X-Git-Tag: submit/tizen_tv/20150909.084931~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8818fd6e9159487a77e65d79ff44f686a58cd988;p=platform%2Fcore%2Fapi%2Fcontext.git Allow service app launching triggers in TV profile Change-Id: Ia4dab92dc3b10819c2930c48e7cc2c06d7546d9f Signed-off-by: Mu-Woong Signed-off-by: Somin Kim --- diff --git a/packaging/context.spec b/packaging/context.spec index 5e5a1e6..d806c83 100644 --- a/packaging/context.spec +++ b/packaging/context.spec @@ -6,6 +6,8 @@ Group: System/API License: Apache-2.0 Source0: %{name}-%{version}.tar.gz +%define BUILD_PROFILE %{?profile}%{!?profile:%{?tizen_profile_name}} + BuildRequires: cmake BuildRequires: pkgconfig(aul) BuildRequires: pkgconfig(bundle) @@ -35,7 +37,12 @@ export CFLAGS+=" -DTIZEN_ENGINEER_MODE" export CXXFLAGS+=" -DTIZEN_ENGINEER_MODE" export FFLAGS+=" -DTIZEN_ENGINEER_MODE" -cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DMAJORVER=${MAJORVER} -DFULLVER=%{version} +%if "%{?BUILD_PROFILE}" == "tv" +export CFLAGS+=" -D_ALLOW_SERVICE_APP_TRIGGER_" +export CXXFLAGS+=" -D_ALLOW_SERVICE_APP_TRIGGER_" +%endif + +cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DMAJORVER=${MAJORVER} -DFULLVER=%{version} -DPROFILE=%{?BUILD_PROFILE} make %{?jobs:-j%jobs} %install diff --git a/src/context_trigger.cpp b/src/context_trigger.cpp index b050f68..c74bfbd 100644 --- a/src/context_trigger.cpp +++ b/src/context_trigger.cpp @@ -378,6 +378,7 @@ EXTAPI int context_trigger_rule_set_action_app_control(context_trigger_rule_h ru g_free(app_id); IF_FAIL_RETURN_TAG(error == PMINFO_R_OK, CONTEXT_TRIGGER_ERROR_INVALID_RULE, _E, "No such app"); +#ifndef _ALLOW_SERVICE_APP_TRIGGER_ char *app_type = NULL; pkgmgrinfo_appinfo_get_component_type(app_info, &app_type); if (!strcmp(app_type, "svcapp")) { @@ -385,6 +386,7 @@ EXTAPI int context_trigger_rule_set_action_app_control(context_trigger_rule_h ru pkgmgrinfo_appinfo_destroy_appinfo(app_info); return CONTEXT_TRIGGER_ERROR_INVALID_RULE; } +#endif pkgmgrinfo_appinfo_destroy_appinfo(app_info); // Set action type