phoneapp/phoneuicontrol/src/cphonestate.cpp
branchRCL_3
changeset 15 2a26698d78ba
parent 14 24062c24fe38
child 17 38529f706030
--- a/phoneapp/phoneuicontrol/src/cphonestate.cpp	Fri Mar 12 15:42:40 2010 +0200
+++ b/phoneapp/phoneuicontrol/src/cphonestate.cpp	Mon Mar 15 12:40:24 2010 +0200
@@ -104,7 +104,6 @@
 #include "cphonecontinueemergencycallcommand.h"
 #include "cphonecallheadermanager.h"
 #include "cphonenumberentrymanager.h"
-#include "mphonestorage.h"
 #include "easydialingcommands.hrh"
 
 
@@ -4097,13 +4096,6 @@
                     KPSUidScreenSaver,
                     KScreenSaverAllowScreenSaver,
                     EPhoneScreensaverAllowed );
-
-    // Restore keylock if phone has been locked before call.
-    if ( iStateMachine->PhoneStorage()->NeedToEnableKeylock() )
-        {
-        iViewCommandHandle->ExecuteCommandL( EPhoneViewEnableKeyLock );
-        iStateMachine->PhoneStorage()->SetNeedToEnableKeylock( EFalse );
-        }
     }
 
 // -----------------------------------------------------------
@@ -4744,207 +4736,6 @@
             }
         }
     }
-
-// -----------------------------------------------------------
-// CPhoneState::GetBlockedKeyList
-// -----------------------------------------------------------
-//
-EXPORT_C const RArray<TInt>& CPhoneState::GetBlockedKeyList() const
-    {
-    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::GetBlockedKeyList( ) ");
-    return iStateMachine->PhoneStorage()->GetBlockedKeyList();
-    }
-
-// -----------------------------------------------------------
-// CPhoneState::DisableHWKeysL
-// -----------------------------------------------------------
-//
-EXPORT_C void CPhoneState::DisableHWKeysL()
-    {
-    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::DisableHWKeysL( ) ");
-
-    if( iStateMachine->PhoneStorage()->IsBlockedKeysListEmpty() )
-        {
-        __PHONELOG( EBasic, EPhoneControl, " CPhoneState::DisableHWKeysL HW Keys Disabled " );
-
-        iStateMachine->PhoneStorage()->AppendBlockedKeysListL( EStdKeyNo );
-        iStateMachine->PhoneStorage()->AppendBlockedKeysListL( EStdKeyYes );
-        }
-    }
-
-// -----------------------------------------------------------
-// CPhoneState::DisableCallUIL
-// -----------------------------------------------------------
-//
-EXPORT_C void CPhoneState::DisableCallUIL()
-    {
-    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::DisableCallUIL( ) ");
-
-    // Set Call UI state to storage
-    if( !iStateMachine->PhoneStorage()->IsScreenLocked() )
-        {
-        __PHONELOG( EBasic, EPhoneControl, " CPhoneState::DisableCallUIL CallUI Disabled " );
-
-        // Show keys locked note
-        TPhoneCmdParamNote noteParam;
-        noteParam.SetType( EPhoneNoteUIDisabled );
-        noteParam.SetResourceId( CPhoneMainResourceResolver::Instance()->
-            ResolveResourceID( EPhoneInformationNote ) );
-    
-        HBufC* noteText = StringLoader::LoadLC( 
-            CPhoneMainResourceResolver::Instance()->
-                ResolveResourceID( EPhoneIncomingCallKeysLocked ) );
-        noteParam.SetText( *noteText );
-    
-        iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNote, &noteParam );
-        CleanupStack::PopAndDestroy( noteText );
-    
-        // Start capturing the key guard key
-        TPhoneCmdParamKeyCapture appKeyCaptureParam;
-        appKeyCaptureParam.SetKey( EStdKeyDevice7 );
-        appKeyCaptureParam.SetKeyCode( EKeyDeviceF );
-        appKeyCaptureParam.SetCaptureType( EPhoneKeyAllEvents );
-        iViewCommandHandle->ExecuteCommandL( EPhoneViewStartCapturingKey, &appKeyCaptureParam );
-        
-        // Set Call UI state to storage
-        iStateMachine->PhoneStorage()->SetScreenLocked( ETrue );
-        }
-    }
-
-// -----------------------------------------------------------
-// CPhoneState::EnableCallUIL
-// -----------------------------------------------------------
-//
-EXPORT_C void CPhoneState::EnableCallUIL()
-    {
-    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::EnableCallUIL( ) ");
-
-    if( iStateMachine->PhoneStorage()->IsScreenLocked() )
-        {
-        __PHONELOG( EBasic, EPhoneControl, " CPhoneState::EnableCallUIL CallUI Enabled " );
-
-        iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNote );
-        iViewCommandHandle->ExecuteCommandL( EPhoneViewDisableKeyLockWithoutNote );
-
-        // Stop capturing the key guard key
-        TPhoneCmdParamKeyCapture appKeyCaptureParam;
-        appKeyCaptureParam.SetKey( EStdKeyDevice7 );
-        appKeyCaptureParam.SetKeyCode( EKeyDeviceF );
-        appKeyCaptureParam.SetCaptureType( EPhoneKeyAllEvents );
-        iViewCommandHandle->ExecuteCommandL( EPhoneViewStopCapturingKey, &appKeyCaptureParam );
-        
-        iStateMachine->PhoneStorage()->SetScreenLocked( EFalse );
-        }
-    }
-
-// -----------------------------------------------------------
-// CPhoneState::CheckDisableHWKeysAndCallUIL
-// -----------------------------------------------------------
-//
-EXPORT_C void CPhoneState::CheckDisableHWKeysAndCallUIL()
-    {
-    __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneState::CheckDisableHWKeysAndCallUIL( ) ");
-
-    if( IsKeyLockOn() || IsAutoLockOn() )
-        {
-        // Disable HW keys if needed
-        if( CPhoneCenRepProxy::Instance()->
-                IsTelephonyFeatureSupported( KTelephonyLVFlagDisableCallControlHardKeysWhileLocked ) )
-            {
-            DisableHWKeysL();
-            }
-
-        // Disable Call UI if needed
-        if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke )
-                && !CPhoneCenRepProxy::Instance()->
-                IsTelephonyFeatureSupported( KTelephonyLVFlagAllowUnlockOnIncoming ) )
-            {
-            DisableCallUIL();
-            iStateMachine->PhoneStorage()->SetNeedToEnableKeylock( ETrue );
-            }
-        }
-    }
-
-// -----------------------------------------------------------
-// CPhoneState::HandleHoldSwitchL
-// -----------------------------------------------------------
-//
-EXPORT_C void CPhoneState::HandleHoldSwitchL()
-    {
-    __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneState::HandleHoldSwitchL( ) ");
-
-    if( CPhoneCenRepProxy::Instance()->
-            IsTelephonyFeatureSupported( KTelephonyLVFlagDisableCallControlHardKeysWhileLocked ) )
-        {
-        if( iStateMachine->PhoneStorage()->IsBlockedKeysListEmpty() )
-            {
-            // Disable HW Keys if needed
-            DisableHWKeysL();
-            }
-        else
-            {
-            // Reset blocked keys list
-            iStateMachine->PhoneStorage()->ResetBlockedKeysList();
-            }
-        }
-    
-    if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke ) 
-            && !CPhoneCenRepProxy::Instance()->
-            IsTelephonyFeatureSupported( KTelephonyLVFlagAllowUnlockOnIncoming ) )
-        {
-        if( iStateMachine->PhoneStorage()->IsScreenLocked() )
-            {
-            // Enable Call
-            EnableCallUIL();
-            }
-        else
-            {
-            // Set keylock enabled
-            iViewCommandHandle->ExecuteCommandL( EPhoneViewEnableKeyLockWithoutNote );
-            // Disable Call
-            DisableCallUIL();
-            }
-        }
-        
-        // Stop ringingtone
-        iViewCommandHandle->ExecuteCommandL( EPhoneViewStopRingTone );
-    }
-
-// -----------------------------------------------------------
-// CPhoneState::RetainPreviousKeylockStateL
-// -----------------------------------------------------------
-//
-EXPORT_C void CPhoneState::RetainPreviousKeylockStateL()
-    {
-    // Lock keypad, if keylock was enabled before incoming call.
-    // Also reset PhoneStorage keylock status.
-    if ( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke ) &&
-        iStateMachine->PhoneStorage()->NeedToEnableKeylock() )
-        {
-        iStateMachine->PhoneStorage()->SetNeedToEnableKeylock( EFalse );
-        iViewCommandHandle->ExecuteCommandL( EPhoneViewEnableKeyLockWithoutNote ); 
-        }
-    }
-
-// ---------------------------------------------------------
-// CPhoneState::HandleKeyLockEnabledL
-// ---------------------------------------------------------
-//
-EXPORT_C void CPhoneState::HandleKeyLockEnabled( TBool aKeylockEnabled )
-    {
-    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleKeyLockEnabledL( ) ");
-    if( !FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke )
-		&& CPhoneCenRepProxy::Instance()->
-			IsTelephonyFeatureSupported( KTelephonyLVFlagDisableCallControlHardKeysWhileLocked ) )
-		{
-    	if( !aKeylockEnabled )
-	        {
-	        // Keylock disabled
-            // Reset blocked keys list
-            iStateMachine->PhoneStorage()->ResetBlockedKeysList();
-	        }
-		}
-    }
 	
 // ---------------------------------------------------------
 // CPhoneState::SetToolbarDimming