phoneapp/phoneuicontrol/src/cphonestatestartup.cpp
branchRCL_3
changeset 61 41a7f70b3818
parent 58 40a3f856b14d
child 62 5266b1f337bd
--- a/phoneapp/phoneuicontrol/src/cphonestatestartup.cpp	Thu Aug 19 09:54:27 2010 +0300
+++ b/phoneapp/phoneuicontrol/src/cphonestatestartup.cpp	Tue Aug 31 15:14:29 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -20,11 +20,10 @@
 #include "cphonestatestartup.h"
 #include "phonestatedefinitions.h"
 #include "mphonestatemachine.h"
-#include "tphonecmdparamKeycapture.h"
+#include "tphonecmdparamkeycapture.h"
 #include "tphonecmdparamboolean.h"
 #include "phonelogger.h"
 #include "phonerssbase.h"
-#include "mphonesecuritymodeobserver.h"
 
 // ================= MEMBER FUNCTIONS =======================
 
@@ -63,30 +62,24 @@
     {
     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateStartup::ConstructL() ");
     CPhoneState::BaseConstructL();
-    
-    // Set send key activation off.
-    TPhoneCmdParamBoolean boolean;
-    boolean.SetBoolean( EFalse );
-    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetSendKeyDialerActivationFlag, 
-            &boolean );
 
     // CAPTURE KEY EVENTS PERMANENTLY
         
     // Capture the up and down events for the No key
-    TPhoneCmdParamKeyCapture noKeyCaptureParam;
+    /*TPhoneCmdParamKeyCapture noKeyCaptureParam;
     noKeyCaptureParam.SetKey( EStdKeyNo );
     noKeyCaptureParam.SetKeyCode( EKeyNo );
     noKeyCaptureParam.SetCaptureType( EPhoneKeyAllEvents );
     iViewCommandHandle->ExecuteCommandL( EPhoneViewStartCapturingKey, 
-        &noKeyCaptureParam );
+        &noKeyCaptureParam );*/
           
     // Capture the up and down events for the EStdKeyEnd key
-    TPhoneCmdParamKeyCapture endKeyCaptureParam;
+    /*TPhoneCmdParamKeyCapture endKeyCaptureParam;
     endKeyCaptureParam.SetKey( EStdKeyEnd );
     endKeyCaptureParam.SetKeyCode( EKeyEnd );
     endKeyCaptureParam.SetCaptureType( EPhoneKeyAllEvents );
     iViewCommandHandle->ExecuteCommandL( EPhoneViewStartCapturingKey, 
-        &endKeyCaptureParam );
+        &endKeyCaptureParam );*/
     }
 
 // -----------------------------------------------------------
@@ -135,7 +128,7 @@
 // CPhoneStateStartup::HandlePEConstructionReadyL
 // -----------------------------------------------------------
 //
-EXPORT_C void CPhoneStateStartup::HandlePEConstructionReadyL( TInt /*aCallId*/ )
+void CPhoneStateStartup::HandlePEConstructionReadyL( TInt /*aCallId*/ )
     {
     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateStartup::HandlePEConstructionReadyL() ");
     // Indicate that phone engine construction is ready
@@ -144,7 +137,23 @@
     // Only go to the idle state if phone is also ready
     if ( iPhoneReady )
         {
-        InitializationReadyL();
+        // Security mode check. 
+        TPhoneCmdParamBoolean isSecurityMode;      
+        iViewCommandHandle->ExecuteCommandL( EPhoneViewGetSecurityModeStatus, &isSecurityMode );        
+        if ( !isSecurityMode.Boolean() && !IsSimOk() )
+            {
+            TPhoneCmdParamBoolean securityMode;
+            securityMode.SetBoolean( ETrue );
+            iViewCommandHandle->ExecuteCommandL( EPhoneViewSetSecurityMode, &securityMode );
+            iCreateNote = CIdle::NewL( CActive::EPriorityHigh );
+            
+            CreateAndShowNoteAfterIdle(); 
+            }
+        // Go to idle state
+        SetDefaultFlagsL();
+        iCbaManager->UpdateCbaL( EPhoneEmptyCBA );
+        
+        iStateMachine->ChangeState( EPhoneStateIdle );
         }
     }
 
@@ -165,7 +174,7 @@
     // if the phone engine is not ready.
     if ( iPhoneReady && !iPEReady )
         {
-        SendGlobalErrorNoteL( EPhoneNoteTextPEFailedAtStartup );
+        SendGlobalErrorNoteL( EPhoneNoteTextPEFailedAtStartup, ETrue );
         }
     }
 
@@ -179,17 +188,6 @@
     // Empty implementation
     }
 
-// CPhoneStateStartup::HandleCreateNumberEntryL
-// -----------------------------------------------------------
-//
-EXPORT_C void CPhoneStateStartup::HandleCreateNumberEntryL( 
-        const TKeyEvent& /* aKeyEvent */ ,
-        TEventCode /* aEventCode */ )
-    {
-    // Empty implementation
-    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateStartup::HandleCreateNumberEntryL() ");   
-    }
-
 // -----------------------------------------------------------
 // CPhoneStateStartup::HandleDtmfKeyToneL
 // -----------------------------------------------------------
@@ -212,18 +210,26 @@
     // Indicate that the phone is ready
     iPhoneReady = ETrue;
 
-    // Sim security status is available at this phase.
-    iStateMachine->SecurityMode()->Initialize();
-    if ( !IsSimOk() )
-        {
-        iCreateNote = CIdle::NewL( CActive::EPriorityHigh );
-        CreateAndShowNoteAfterIdle(); 
-        }
-    
     // Only go to idle state when Phone engine is also ready
     if ( iPEReady )
         {
-        InitializationReadyL();
+        // Security mode check.
+        TPhoneCmdParamBoolean isSecurityMode;      
+        iViewCommandHandle->ExecuteCommandL( EPhoneViewGetSecurityModeStatus, &isSecurityMode );
+        if ( !isSecurityMode.Boolean() && !IsSimOk() )
+            {
+            TPhoneCmdParamBoolean securityMode;
+            securityMode.SetBoolean( ETrue );
+            iViewCommandHandle->ExecuteCommandL( EPhoneViewSetSecurityMode, &securityMode );
+            iCreateNote = CIdle::NewL( CActive::EPriorityHigh );
+            
+            CreateAndShowNoteAfterIdle(); 
+            }
+        // Go to idle state
+        SetDefaultFlagsL();
+        iCbaManager->UpdateCbaL( EPhoneEmptyCBA );
+        
+        iStateMachine->ChangeState( EPhoneStateIdle );
         }
     }
 
@@ -237,9 +243,15 @@
     {
     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateStartup::HandleIdleForegroundEventL( ) ");
     // Security mode check. 
-    if ( !iStateMachine->SecurityMode()->IsSecurityMode() && !IsSimOk() )
+    TPhoneCmdParamBoolean isSecurityMode;      
+    iViewCommandHandle->ExecuteCommandL( EPhoneViewGetSecurityModeStatus, &isSecurityMode );        
+    if ( !isSecurityMode.Boolean() && !IsSimOk() )
         {
+        TPhoneCmdParamBoolean securityMode;
+        securityMode.SetBoolean( ETrue );
+        iViewCommandHandle->ExecuteCommandL( EPhoneViewSetSecurityMode, &securityMode );
         iCreateNote = CIdle::NewL( CActive::EPriorityHigh );
+        
         CreateAndShowNoteAfterIdle(); 
         }
     }
@@ -276,21 +288,4 @@
     return KErrNone;
     }
 
-// -----------------------------------------------------------------------------
-// CPhoneStateStartup::InitializationReadyL
-//
-// -----------------------------------------------------------------------------
-//
-void CPhoneStateStartup::InitializationReadyL()
-    {
-    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateStartup::InitializationReady() ");
-    // Go to idle state
-    SetDefaultFlagsL();
-    iCbaManager->UpdateCbaL( EPhoneEmptyCBA );
-    iViewCommandHandle->ExecuteCommand( EPhoneViewPrepareIcons );
-    iViewCommandHandle->ExecuteCommand( EPhoneViewLoadPlugins );
-    iStateMachine->ChangeState( EPhoneStateIdle );   
-    }
-
-
 // End of File