From: Daehyeon Jung Date: Mon, 28 Mar 2016 10:04:30 +0000 (+0900) Subject: fix background management X-Git-Tag: accepted/tizen/common/20160407.132219^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F80%2F63980%2F2;p=platform%2Fcore%2Fappfw%2Fapp-core.git fix background management Change-Id: Iccc6d80354545807e8cc3614625ec2f159a627b7 Signed-off-by: Daehyeon Jung --- diff --git a/packaging/app-core.spec b/packaging/app-core.spec index c1a9974..34af5a2 100644 --- a/packaging/app-core.spec +++ b/packaging/app-core.spec @@ -90,13 +90,13 @@ Group: Development/Libraries %description template Application basics template -%if "%{?tizen_profile_name}" == "wearable" +%if "%{?profile}" == "wearable" %define appfw_feature_background_management 1 %else -%if "%{?tizen_profile_name}" == "mobile" +%if "%{?profile}" == "mobile" %define appfw_feature_background_management 1 %else -%if "%{?tizen_profile_name}" == "tv" +%if "%{?profile}" == "tv" %define appfw_feature_background_management 0 %endif %endif diff --git a/src/appcore-efl.c b/src/appcore-efl.c index 62f9ea8..b5343e0 100644 --- a/src/appcore-efl.c +++ b/src/appcore-efl.c @@ -853,6 +853,9 @@ static int __before_loop(struct ui_priv *ui, int *argc, char ***argv) { int r; char *hwacc = NULL; +#if _APPFW_FEATURE_BACKGROUND_MANAGEMENT + struct appcore *ac = NULL; +#endif if (argc == NULL || argv == NULL) { _ERR("argc/argv is NULL"); diff --git a/src/appcore.c b/src/appcore.c index 4de390e..4209c41 100644 --- a/src/appcore.c +++ b/src/appcore.c @@ -605,7 +605,7 @@ static void __clear(struct appcore *ac) memset(ac, 0, sizeof(struct appcore)); } -void appcore_get_app_core(struct appcore **ac) +EXPORT_API void appcore_get_app_core(struct appcore **ac) { *ac = &core; } @@ -774,7 +774,7 @@ static void __suspend_dbus_signal_handler(GDBusConnection *connection, gint pid; gint status; - if (g_strdmp0(signal_name, RESOURCED_FREEZER_SIGNAL) == 0) { + if (g_strcmp0(signal_name, RESOURCED_FREEZER_SIGNAL) == 0) { g_variant_get(parameters, "(ii)", &status, &pid); if (pid == getpid() && status == 0) { /* thawed */ if (ac && !ac->allowed_bg && ac->suspended_state) { @@ -807,16 +807,16 @@ int _appcore_init_suspend_dbus_handler(void *data) __suspend_dbus_handler_initialized = g_dbus_connection_signal_subscribe( bus, NULL, - RESOURCED_FREEZER_PATH, - RESOURCED_FREEZER_SIGNAL, RESOURCED_FREEZER_INTERFACE, + RESOURCED_FREEZER_SIGNAL, + RESOURCED_FREEZER_PATH, NULL, G_DBUS_SIGNAL_FLAGS_NONE, __suspend_dbus_signal_handler, data, NULL); if (__suspend_dbus_handler_initialized == 0) { - _E("g_dbus_connection_signal_subscribe() is failed."); + _ERR("g_dbus_connection_signal_subscribe() is failed."); return -1; }