Revert "[Tizen] Added 'make clean' on each profile build."
[platform/core/uifw/dali-adaptor.git] / adaptors / common / application-impl.cpp
index 1bcf8d4..c949758 100644 (file)
@@ -83,7 +83,6 @@ Application::Application( int* argc, char** argv[], const std::string& styleshee
   mName(),
   mStylesheet( stylesheet ),
   mEnvironmentOptions(),
-  mInitialized( false ),
   mSlotDelegate( this )
 {
   // Get mName from environment options
@@ -199,12 +198,11 @@ void Application::DoInit()
   {
     Dali::StyleMonitor::Get().SetTheme( mStylesheet );
   }
+}
 
-  if( !mInitialized )
-  {
-    mAdaptor->NotifySceneCreated();
-    mInitialized = true;
-  }
+void Application::DoStart()
+{
+  mAdaptor->NotifySceneCreated();
 }
 
 void Application::DoTerminate()
@@ -237,8 +235,6 @@ void Application::OnInit()
 {
   mFramework->AddAbortCallback( MakeCallback( this, &Application::QuitFromMainLoop ) );
 
-  mInitialized = true;
-
   DoInit();
 
   // Wire up the LifecycleController
@@ -255,7 +251,7 @@ void Application::OnInit()
   Dali::Application application(this);
   mInitSignal.Emit( application );
 
-  mAdaptor->NotifySceneCreated();
+  DoStart();
 }
 
 void Application::OnTerminate()
@@ -271,7 +267,9 @@ void Application::OnTerminate()
 
 void Application::OnPause()
 {
-  DoPause();
+  // A DALi app should handle Pause/Resume events.
+  // DALi just delivers the framework Pause event to the application, but not actually pause DALi core.
+  // Pausing DALi core only occurs on the Window Hidden framework event
   Dali::Application application(this);
   mPauseSignal.Emit( application );
 }
@@ -282,7 +280,9 @@ void Application::OnResume()
   // This ensures we do not just redraw the last frame before pausing if that's not required
   Dali::Application application(this);
   mResumeSignal.Emit( application );
-  DoResume();
+
+  // DALi just delivers the framework Resume event to the application.
+  // Resuming DALi core only occurs on the Window Show framework event
 }
 
 void Application::OnReset()