diff -r 1984aceb8774 -r 21239b3bcd78 clock2/clockui/uilayer/src/clockappui.cpp --- 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 #include #include +#include +#include // 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 ) );