fix background management 80/63980/2 accepted/tizen/common/20160407.132219 accepted/tizen/ivi/20160407.110322 accepted/tizen/mobile/20160407.110233 accepted/tizen/tv/20160407.110249 accepted/tizen/wearable/20160407.110306 submit/tizen/20160407.000614
authorDaehyeon Jung <darrenh.jung@samsung.com>
Mon, 28 Mar 2016 10:04:30 +0000 (19:04 +0900)
committerHwanKyu Jhun <h.jhun@samsung.com>
Tue, 5 Apr 2016 23:26:49 +0000 (16:26 -0700)
Change-Id: Iccc6d80354545807e8cc3614625ec2f159a627b7
Signed-off-by: Daehyeon Jung <darrenh.jung@samsung.com>
packaging/app-core.spec
src/appcore-efl.c
src/appcore.c

index c1a9974..34af5a2 100644 (file)
@@ -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
index 62f9ea8..b5343e0 100644 (file)
@@ -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");
index 4de390e..4209c41 100644 (file)
@@ -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;
        }