--- a/harvester/common/src/harvesterpluginfactory.cpp Wed Jun 23 18:41:19 2010 +0300
+++ b/harvester/common/src/harvesterpluginfactory.cpp Tue Jul 06 14:44:37 2010 +0300
@@ -439,13 +439,22 @@
{
const TInt pluginInfoCount = iHarvesterPluginInfoArray.Count();
TBool itemsLeft( EFalse );
+ TBool allPluginsOnIdle( ETrue );
for ( TInt i = pluginInfoCount; --i >= 0; )
{
CHarvesterPluginInfo* info = iHarvesterPluginInfoArray[i];
if( info && info->iQueue.Count() )
{
itemsLeft = ETrue;
- break;
+ if( aStarted )
+ {
+ // Idle state is only checked if finished event is sent
+ break;
+ }
+ }
+ if( info && info->iPlugin && !(info->iPlugin->PluginInIdleState()) )
+ {
+ allPluginsOnIdle = EFalse;
}
}
@@ -458,7 +467,7 @@
iHarvesterEventManager->IncreaseItemCount( EHEObserverTypeOverall, KCacheItemCountForEventCaching );
return;
}
- else if( iHarvesting && !itemsLeft && !aStarted )
+ else if( iHarvesting && (!itemsLeft || allPluginsOnIdle) && !aStarted )
{
iHarvesting = EFalse;
iHarvesterEventManager->SendEventL( EHEObserverTypeOverall, EHEStateFinished );