Fix memory management about background category 47/74647/4 accepted/tizen/common/20160616.151606 accepted/tizen/ivi/20160616.002915 accepted/tizen/mobile/20160616.002844 accepted/tizen/tv/20160616.002827 accepted/tizen/wearable/20160616.002755 submit/tizen/20160615.073423
authorHwankyu Jhun <h.jhun@samsung.com>
Wed, 15 Jun 2016 07:33:46 +0000 (16:33 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Wed, 15 Jun 2016 07:33:46 +0000 (16:33 +0900)
Change-Id: I17c0c9cad481f49785d219b90ee8186e7b2e11c5
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/appcore-efl.c

index 3abf084..b70ee32 100644 (file)
@@ -434,6 +434,10 @@ static void __do_app(enum app_event event, void *data, bundle * b)
                LOG(LOG_DEBUG, "LAUNCH", "[%s:Application:reset:done]", ui->name);
 
                if (first_launch) {
+#ifdef _APPFW_FEATURE_BACKGROUND_MANAGEMENT
+                       if (ui->app_core->allowed_bg)
+                               __appcore_timer_add(ui);
+#endif
                        first_launch = FALSE;
                } else {
                        _INFO("[APP %d] App already running, raise the window", _pid);
@@ -483,6 +487,8 @@ static void __do_app(enum app_event event, void *data, bundle * b)
                        _DBG("[__SUSPEND__] resume case");
                        ui->exit_from_suspend(ui);
                }
+               if (ui->app_core->allowed_bg)
+                       __appcore_timer_del(ui);
 #endif
 
                if (ui->state == AS_PAUSED || ui->state == AS_CREATED) {