Fix a LifeCycle callback issue
authorSunwook Bae <sunwook45.bae@samsung.com>
Fri, 25 Oct 2013 15:12:29 +0000 (00:12 +0900)
committerSunwook Bae <sunwook45.bae@samsung.com>
Fri, 25 Oct 2013 15:12:51 +0000 (00:12 +0900)
Change-Id: I469888cd60e8267bd0cf39b6aa4ab42b5033723e
Signed-off-by: Sunwook Bae <sunwook45.bae@samsung.com>
src/app/FApp_AppImpl.cpp
src/app/FApp_AppManagerImpl.cpp

index b1b52fb..e41f92a 100644 (file)
@@ -322,10 +322,6 @@ _AppImpl::OnService(service_s* service, void* user_data)
                        }
                        free(pBuf);
                }
-               else
-               {
-                       SysLog(NID_APP, "It is failed to get multi-window value: %d", errVal);
-               }
 
                // call for callbacks
                // ptr to member function
index 1931781..1fab392 100644 (file)
@@ -711,7 +711,10 @@ _AppLifecycleManager::LaunchCallback(int pid, void* pData)
                        _IAppEventListener* pListener = null;
                        pEnum->GetCurrent(pListener);
 
-                       pListener->OnApplicationLaunched(tmp, pid);
+                       if (pListener && _AppInfo::GetAppState() == RUNNING)
+                       {
+                               pListener->OnApplicationLaunched(tmp, pid);
+                       }
                }
        }
 
@@ -749,7 +752,10 @@ _AppLifecycleManager::TerminateCallback(int pid, void* pData)
                        _IAppEventListener* pListener = null;
                        pEnum->GetCurrent(pListener);
 
-                       pListener->OnApplicationTerminated(tmp, pid);
+                       if (pListener && _AppInfo::GetAppState() == RUNNING)
+                       {
+                               pListener->OnApplicationTerminated(tmp, pid);
+                       }
                }
        }