--- a/phoneapp/phoneuistates/src/cphoneemergency.cpp Mon Mar 15 12:40:24 2010 +0200
+++ b/phoneapp/phoneuistates/src/cphoneemergency.cpp Wed Mar 31 21:30:06 2010 +0300
@@ -41,6 +41,7 @@
#include "cphonepubsubproxy.h"
#include "cphonekeys.h"
#include "tphonecmdparamaudiooutput.h"
+#include "cphonesecuritymodeobserver.h"
// ================= MEMBER FUNCTIONS =======================
@@ -234,7 +235,7 @@
}
else
{
- if ( !TopAppIsDisplayedL() || iDeviceLockOn )
+ if ( !TopAppIsDisplayedL() || iStateMachine->SecurityMode()->IsAutolockEnabled() )
{
// Continue displaying current app but set up the
// idle screen in the background
@@ -293,9 +294,7 @@
{
UpdateCbaL( EPhoneEmptyCBA );
- TPhoneCmdParamBoolean securityMode;
- iViewCommandHandle->ExecuteCommandL( EPhoneViewGetSecurityModeStatus, &securityMode );
- if ( !securityMode.Boolean() )
+ if ( !iStateMachine->SecurityMode()->IsSecurityMode() )
{
// Setup idle as next active app.
SetupIdleScreenInBackgroundL();
@@ -335,8 +334,6 @@
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetStatusPaneVisible, &visibleMode );
}
- iDeviceLockOn = IsAutoLockOn();
-
// Close menu bar, if it is displayed
iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
@@ -414,7 +411,7 @@
CaptureKeysDuringCallNotificationL( EFalse );
}
}
- else if ( !iDeviceLockOn && SimState() == EPESimUsable )
+ else if ( !iStateMachine->SecurityMode()->IsAutolockEnabled() && SimState() == EPESimUsable )
{
// Stop capturing keys
CaptureKeysDuringCallNotificationL( EFalse );
@@ -544,7 +541,9 @@
resourceId = EPhoneInCallNumberAcqCBA;
}
}
- else if ( iDeviceLockOn || SimState() != EPESimUsable || iStartupInterrupted )
+ else if ( iStateMachine->SecurityMode()->IsAutolockEnabled()
+ || SimState() != EPESimUsable
+ || iStartupInterrupted )
{
if ( TouchCallHandlingSupported() )
{
@@ -637,7 +636,8 @@
{
CPhoneGsmInCall::HandleKeyMessageL( aMessage, aCode );
}
- else if ( !iDeviceLockOn && SimState() == EPESimUsable )
+ else if ( !iStateMachine->SecurityMode()->IsAutolockEnabled()
+ && SimState() == EPESimUsable )
{
// do base operation
CPhoneGsmInCall::HandleKeyMessageL( aMessage, aCode );
@@ -775,7 +775,8 @@
}
else
{
- if ( iDeviceLockOn && CPhoneKeys::IsNumericKey( aKeyEvent, aEventCode ) )
+ if ( iStateMachine->SecurityMode()->IsAutolockEnabled()
+ && CPhoneKeys::IsNumericKey( aKeyEvent, aEventCode ) )
{
// Send the key event to the phone engine
SendKeyEventL( aKeyEvent, aEventCode );