Merge "DALi Version 2.3.2" into devel/master
[platform/core/uifw/dali-adaptor.git] / dali / internal / adaptor / common / adaptor-impl.cpp
index ef0ca77..6001eb6 100644 (file)
@@ -573,6 +573,8 @@ void Adaptor::Stop()
 
     mState = STOPPED;
 
+    RemoveSystemInformation();
+
     DALI_LOG_RELEASE_INFO("Adaptor::Stop\n");
   }
 }
@@ -661,16 +663,22 @@ Dali::TtsPlayer Adaptor::GetTtsPlayer(Dali::TtsPlayer::Mode mode)
   return mTtsPlayers[mode];
 }
 
-bool Adaptor::AddIdle(CallbackBase* callback, bool hasReturnValue, bool forceAdd)
+bool Adaptor::AddIdle(CallbackBase* callback, bool hasReturnValue)
 {
   bool idleAdded(false);
 
-  // Only add an idle if the Adaptor is actually running
-  if(RUNNING == mState || READY == mState || forceAdd)
+  // We want to run the processes even when paused
+  if(STOPPED != mState)
   {
     idleAdded = mCallbackManager->AddIdleCallback(callback, hasReturnValue);
   }
 
+  if(!idleAdded)
+  {
+    // Delete callback
+    delete callback;
+  }
+
   return idleAdded;
 }
 
@@ -996,7 +1004,7 @@ void Adaptor::RequestProcessEventsOnIdle()
     if(!mNotificationOnIdleInstalled)
     {
       // If we haven't installed the idle notification, install it idle enterer.
-      mNotificationOnIdleInstalled = AddIdleEnterer(MakeCallback(this, &Adaptor::ProcessCoreEventsFromIdle), true);
+      mNotificationOnIdleInstalled = AddIdleEnterer(MakeCallback(this, &Adaptor::ProcessCoreEventsFromIdle));
     }
     else
     {
@@ -1329,12 +1337,12 @@ void Adaptor::SetRootLayoutDirection(std::string locale)
   }
 }
 
-bool Adaptor::AddIdleEnterer(CallbackBase* callback, bool forceAdd)
+bool Adaptor::AddIdleEnterer(CallbackBase* callback)
 {
   bool idleAdded(false);
 
-  // Only add an idle if the Adaptor is actually running
-  if(RUNNING == mState || READY == mState || forceAdd)
+  // We want to run the processes even when paused
+  if(STOPPED != mState)
   {
     idleAdded = mCallbackManager->AddIdleEntererCallback(callback);
   }