clock2/clockui/uilayer/src/clockappui.cpp
branchRCL_3
changeset 14 21239b3bcd78
parent 0 f979ecb2b13e
child 18 d68a4b5d5885
--- a/clock2/clockui/uilayer/src/clockappui.cpp	Wed Mar 31 21:29:10 2010 +0300
+++ b/clock2/clockui/uilayer/src/clockappui.cpp	Wed Apr 14 15:55:57 2010 +0300
@@ -27,6 +27,8 @@
 #include <clockapp_tab.mbg>
 #include <AknsConstants.h>
 #include <featmgr.h>  
+#include <e32property.h>
+#include <startupdomainpskeys.h>
 
 // User includes
 #include "clock.h"
@@ -223,14 +225,26 @@
     	case EClockAlarmExit:
     	case EAknSoftkeyExit:
     	    {
-    	    if( ExitHidesInBackground() )
+    	    TInt deviceState;
+    	    RProperty::Get( KPSUidStartup, KPSGlobalSystemState , deviceState );
+
+    	    if(  deviceState == ESwStateCharging || deviceState == ESwStateAlarm  ) 
     	        {
-    	        HandleCommandL( EAknCmdHideInBackground );
+
+                Exit();
+
     	        }
     	    else
-    	        {
-    	        Exit();
-    	        }
+                {
+                if( ExitHidesInBackground() )
+                    {
+                    HandleCommandL( EAknCmdHideInBackground );
+                    }
+                else
+                    {
+                    Exit();
+                    }
+                }
     	    }
     	    break;
     	    
@@ -336,7 +350,8 @@
     {
     __PRINTS( "CClockAppUi::HandleForegroundEventL - Entry" );
     
-    if( aForeground )
+    // commented as a part of the error ESLM-83LG82.
+    /*if( aForeground )
         {
         __PRINTS( "CClockAppUi::HandleForegroundEventL - aForeground ETrue" );
         
@@ -352,7 +367,7 @@
             iIADUpdateFlag = EFalse;
             __PRINTS( "CClockAppUi::HandleForegroundEventL - iIADUpdateFlag EFalse" );
             }
-        }
+        }*/
 
     // Inform the world clock view about the change
     CClockWorldView* clockWorldView = static_cast< CClockWorldView* > ( View( KClockAppWorldViewId ) );