phoneapp/phoneuicontrol/src/cphonestateidle.cpp
changeset 46 bc5a64e5bc3c
parent 45 6b911d05207e
child 50 377c906a8701
child 51 f39ed5e045e0
--- a/phoneapp/phoneuicontrol/src/cphonestateidle.cpp	Wed Jun 23 18:12:20 2010 +0300
+++ b/phoneapp/phoneuicontrol/src/cphonestateidle.cpp	Tue Jul 06 14:15:47 2010 +0300
@@ -37,6 +37,7 @@
 #include "tphonecmdparaminteger.h"
 #include "tphonecmdparamboolean.h"
 #include "tphonecmdparamglobalnote.h"
+#include "tphonecmdparamkeycapture.h"
 #include "tphonecmdparamstring.h"
 #include "tphonecmdparamboolean.h"
 #include "mphonestatemachine.h"
@@ -343,7 +344,7 @@
             break;
             
         case MEngineMonitor::EPEMessageInValidEmergencyNumber:                
-            SendGlobalWarningNoteL( EPhoneEmergencyCallsOnly );                           
+            SendGlobalWarningNoteL( EPhoneEmergencyCallsOnly, ETrue );                           
             break;
             
         case MEngineMonitor::EPEMessageValidEmergencyNumber:
@@ -692,6 +693,10 @@
     // Remove any phone dialogs if they are displayed
     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
 
+    TPhoneCmdParamKeyCapture captureParam;
+    captureParam.SetKeyCode( EKeyNo );
+    iViewCommandHandle->ExecuteCommand( EPhoneViewStartCapturingKey, &captureParam );
+    
     // Capture keys when there is an incoming call
     CaptureKeysDuringCallNotificationL( ETrue );
 
@@ -736,6 +741,10 @@
     // Close menu bar, if it is displayed
     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
 
+    TPhoneCmdParamKeyCapture captureParam;
+    captureParam.SetKeyCode( EKeyNo );
+    iViewCommandHandle->ExecuteCommand( EPhoneViewStartCapturingKey, &captureParam );
+    
     // Capture keys when the phone is dialling
     CaptureKeysDuringCallNotificationL( ETrue );
 
@@ -1019,46 +1028,7 @@
 //
 void CPhoneStateIdle::ChangeMannerModeL()
     {
-    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneStateIdle::ChangeMannerModeL( ) ");
-
-    // Get the profile information
-    const TInt profileId = 
-        iStateMachine->PhoneEngineInfo()->ProfileId();
-    TInt newProfile;
-    
-    if ( profileId == EProfileSilentId )
-        {
-        newProfile = EProfileGeneralId;
-        }
-    else
-        {
-        newProfile = EProfileSilentId;    
-        }
-        
-    if ( !iEngine )
-        {
-        iEngine = CreateProfileEngineL();
-        }
-
-    iEngine->SetActiveProfileL( newProfile );
-    
-    // Stop playing DTMF tone
-    iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF ); 
-    
-    if ( !iOnScreenDialer )
-        {
-        // Remove the number entry
-        iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );        
-        }
-    else
-        {
-        NumberEntryClearL();
-        }
-    
-    iCbaManager->UpdateCbaL( EPhoneEmptyCBA );
- 
-     // Bring Idle app to the top app
-    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetIdleTopApplication );            
+    __LOGMETHODSTARTEND( EPhoneControl, "CPhoneStateIdle::ChangeMannerModeL( ) ");         
     }
 
 // -----------------------------------------------------------