mState = STOPPED;
+ RemoveSystemInformation();
+
DALI_LOG_RELEASE_INFO("Adaptor::Stop\n");
}
}
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;
}
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
{
}
}
-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);
}