idlefw/plugins/sapidataplugin/src/sapidataplugin.cpp
changeset 1 844b978f8d5e
parent 0 79c6a41cd166
child 9 d0529222e3f0
--- a/idlefw/plugins/sapidataplugin/src/sapidataplugin.cpp	Thu Dec 17 08:54:17 2009 +0200
+++ b/idlefw/plugins/sapidataplugin/src/sapidataplugin.cpp	Thu Jan 07 12:55:39 2010 +0200
@@ -87,6 +87,7 @@
     iInfo.iUid.iUid = SAPIDP_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_DATAPLUGIN; 
     iPluginState = ENone;
     iHSForeGround = EFalse;
+    iKeyLockOn = EFalse;
     iNetworkStatus = EUnknown;
     iData = CSapiData::NewL(this);
 
@@ -211,7 +212,6 @@
 //
 void CSapiDataPlugin::PublishL()
     {
-    TInt err( KErrNone );
     User::LeaveIfError( iRfs.Connect() );
 
     TInt observers( iObservers.Count() );        
@@ -443,7 +443,6 @@
 //
 void CSapiDataPlugin::RefreshL(TDesC& aContentType, TDesC& aOperation)
     {
-     TInt err( KErrNone );
      User::LeaveIfError( iRfs.Connect() );
 	 TInt observers( iObservers.Count() );        
 	 TInt transactionId = reinterpret_cast<TInt>( this );
@@ -522,6 +521,7 @@
         case EAiKeylockEnabled:
         	{
         	// handled in resume 
+        	TRAP_IGNORE( DoResumeL( aReason ) ); 
         	break;
         	}
         default :
@@ -686,7 +686,7 @@
     		}
     	case EAiBacklightOn:    		
     		{
-    		if ( iPluginState == ESuspend )
+    		if ( iPluginState == ESuspend  && !iKeyLockOn )
 				{
 				iPluginState = EResume;
 				iData->ResumeL();
@@ -695,6 +695,7 @@
 			}
     	case EAiKeylockDisabled:
         	{
+        	iKeyLockOn = EFalse;
         	// Key lock events considered only if HS is in foreground  
         	if ( iHSForeGround && iPluginState == ESuspend )
         		{
@@ -705,6 +706,7 @@
         	}
     	case EAiKeylockEnabled:
         	{
+        	iKeyLockOn = ETrue;
         	// Key lock events considered only if HS is in foreground
         	if ( iHSForeGround && iPluginState == EResume )
         		{