phoneapp/phoneuistates/src/cphonetwosinglesandwaiting.cpp
branchRCL_3
changeset 5 2a26698d78ba
parent 4 24062c24fe38
child 9 91c2fb4b78df
equal deleted inserted replaced
4:24062c24fe38 5:2a26698d78ba
    34 #include "phoneui.hrh"
    34 #include "phoneui.hrh"
    35 #include "cphonemainresourceresolver.h"
    35 #include "cphonemainresourceresolver.h"
    36 #include "phonerssbase.h"
    36 #include "phonerssbase.h"
    37 #include "phonestatedefinitionsgsm.h"
    37 #include "phonestatedefinitionsgsm.h"
    38 #include "phonelogger.h"
    38 #include "phonelogger.h"
    39 #include "mphonestorage.h"
       
    40 
    39 
    41 // ================= MEMBER FUNCTIONS =======================
    40 // ================= MEMBER FUNCTIONS =======================
    42 
    41 
    43 // C++ default constructor can NOT contain any code, that
    42 // C++ default constructor can NOT contain any code, that
    44 // might leave.
    43 // might leave.
   134             break;
   133             break;
   135         }
   134         }
   136     }
   135     }
   137 
   136 
   138 // -----------------------------------------------------------
   137 // -----------------------------------------------------------
   139 // CPhoneTwoSinglesAndWaiting::HandleKeyEventL
       
   140 // -----------------------------------------------------------
       
   141 //
       
   142 void CPhoneTwoSinglesAndWaiting::HandleKeyEventL(
       
   143     const TKeyEvent& aKeyEvent,
       
   144     TEventCode aEventCode )
       
   145     {
       
   146     if( EKeyDeviceF == aKeyEvent.iCode )
       
   147         {
       
   148         __PHONELOG( EBasic, EPhoneUIStates,
       
   149             "CPhoneTwoSinglesAndWaiting::HandleKeyMessageL-deviceF" );
       
   150         HandleHoldSwitchL();
       
   151         }
       
   152     }
       
   153 
       
   154 // -----------------------------------------------------------
       
   155 // CPhoneTwoSinglesAndWaiting::HandlePhoneEngineMessageL
   138 // CPhoneTwoSinglesAndWaiting::HandlePhoneEngineMessageL
   156 // -----------------------------------------------------------
   139 // -----------------------------------------------------------
   157 //
   140 //
   158 void CPhoneTwoSinglesAndWaiting::HandlePhoneEngineMessageL( 
   141 void CPhoneTwoSinglesAndWaiting::HandlePhoneEngineMessageL( 
   159     const TInt aMessage, 
   142     const TInt aMessage, 
   309             // Return phone to the background if send to background is needed.
   292             // Return phone to the background if send to background is needed.
   310             iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
   293             iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
   311             }
   294             }
   312         }
   295         }
   313 
   296 
   314     if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke ) 
       
   315         && iStateMachine->PhoneStorage()->IsScreenLocked() )
       
   316         {
       
   317         EnableCallUIL();
       
   318         }
       
   319     
       
   320     // Reset blocked keys list
       
   321     iStateMachine->PhoneStorage()->ResetBlockedKeysList();
       
   322 
       
   323     // Go to two singles state
   297     // Go to two singles state
   324     SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer );
   298     SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer );
   325     SetTouchPaneButtons( EPhoneTwoSinglesButtons );
   299     SetTouchPaneButtons( EPhoneTwoSinglesButtons );
   326     // CBA updates in above if-else conditions
   300     // CBA updates in above if-else conditions
   327     iStateMachine->ChangeState( EPhoneStateTwoSingles );
   301     iStateMachine->ChangeState( EPhoneStateTwoSingles );
   339     UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   313     UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   340   
   314   
   341     // Set touch controls
   315     // Set touch controls
   342     SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer );
   316     SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer );
   343     
   317     
   344     // Check if HW Keys or Call UI should be disabled
       
   345     CheckDisableHWKeysAndCallUIL();
       
   346     
       
   347     SetTouchPaneButtons( EPhoneWaitingCallButtons );
   318     SetTouchPaneButtons( EPhoneWaitingCallButtons );
   348   
   319   
   349     iStateMachine->ChangeState( EPhoneStateWaitingInSingle );                             
   320     iStateMachine->ChangeState( EPhoneStateWaitingInSingle );                             
   350     }
   321     }
   351 
   322 
   384         iStateMachine->PhoneEngineInfo()->ServiceId( aCallId ) );
   355         iStateMachine->PhoneEngineInfo()->ServiceId( aCallId ) );
   385     
   356     
   386     // Set touch controls
   357     // Set touch controls
   387     SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer );
   358     SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer );
   388 
   359 
   389     // Check if HW Keys or Call UI should be disabled
       
   390     CheckDisableHWKeysAndCallUIL();
       
   391     
       
   392     SetTouchPaneButtons( EPhoneWaitingCallButtons );
   360     SetTouchPaneButtons( EPhoneWaitingCallButtons );
   393 
   361 
   394     iViewCommandHandle->ExecuteCommandL( EPhoneViewCreateConference, aCallId,
   362     iViewCommandHandle->ExecuteCommandL( EPhoneViewCreateConference, aCallId,
   395         &callHeaderParam );
   363         &callHeaderParam );
   396         
   364