diff options
author | Daehyeon Jung <darrenh.jung@samsung.com> | 2016-03-28 19:04:30 +0900 |
---|---|---|
committer | HwanKyu Jhun <h.jhun@samsung.com> | 2016-04-05 16:26:49 -0700 |
commit | b0d7aa2c02be7cd65a76420c7a39fde81221158a (patch) | |
tree | 56ce95dd34decaf3f745bdc2439c6c2dabc014a6 | |
parent | 1ef14706fdb95bfa42d9ad0f881ad8223e73f64b (diff) | |
download | app-core-b0d7aa2c02be7cd65a76420c7a39fde81221158a.tar.gz app-core-b0d7aa2c02be7cd65a76420c7a39fde81221158a.tar.bz2 app-core-b0d7aa2c02be7cd65a76420c7a39fde81221158a.zip |
fix background managementsubmit/tizen/20160407.000614accepted/tizen/wearable/20160407.110306accepted/tizen/tv/20160407.110249accepted/tizen/mobile/20160407.110233accepted/tizen/ivi/20160407.110322accepted/tizen/common/20160407.132219
Change-Id: Iccc6d80354545807e8cc3614625ec2f159a627b7
Signed-off-by: Daehyeon Jung <darrenh.jung@samsung.com>
-rw-r--r-- | packaging/app-core.spec | 6 | ||||
-rw-r--r-- | src/appcore-efl.c | 3 | ||||
-rw-r--r-- | src/appcore.c | 10 |
3 files changed, 11 insertions, 8 deletions
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; } |