phoneapp/phoneuicontrol/src/cphonestateincoming.cpp
branchRCL_3
changeset 58 40a3f856b14d
parent 25 91c2fb4b78df
child 61 41a7f70b3818
equal deleted inserted replaced
57:94dc1107e8b2 58:40a3f856b14d
   359 //
   359 //
   360 void CPhoneStateIncoming::HandleConnectedL( TInt aCallId )
   360 void CPhoneStateIncoming::HandleConnectedL( TInt aCallId )
   361     {
   361     {
   362     __LOGMETHODSTARTEND(EPhoneControl,
   362     __LOGMETHODSTARTEND(EPhoneControl,
   363         "CPhoneStateIncoming::HandleConnectedL ()" );
   363         "CPhoneStateIncoming::HandleConnectedL ()" );
   364 
       
   365     // Re-enable global notes
   364     // Re-enable global notes
   366     TPhoneCmdParamBoolean globalNotifierParam;
   365     TPhoneCmdParamBoolean globalNotifierParam;
   367     globalNotifierParam.SetBoolean( EFalse );
   366     globalNotifierParam.SetBoolean( EFalse );
   368     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
   367     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
   369         &globalNotifierParam );
   368         &globalNotifierParam );
   370     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetEikonNotifiersDisabled,
   369     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetEikonNotifiersDisabled,
   371         &globalNotifierParam );
   370         &globalNotifierParam );
   372     // Stop tone playing, if necessary
   371     // Stop tone playing, if necessary
   373     iViewCommandHandle->ExecuteCommandL( EPhoneViewStopRingTone );
   372     iViewCommandHandle->ExecuteCommandL( EPhoneViewStopRingTone );
   374 
       
   375     BeginUiUpdateLC();
   373     BeginUiUpdateLC();
   376     
       
   377     // Update single call
   374     // Update single call
   378     UpdateSingleActiveCallL( aCallId );
   375     UpdateSingleActiveCallL( aCallId );
   379 
       
   380     SetTouchPaneButtons( EPhoneIncallButtons );
   376     SetTouchPaneButtons( EPhoneIncallButtons );
   381     SetToolbarDimming( EFalse );
   377     SetToolbarDimming( EFalse );
   382             
       
   383     EndUiUpdate();
   378     EndUiUpdate();
   384 
       
   385     // Go to single state
       
   386     iCbaManager->UpdateCbaL( EPhoneCallHandlingInCallCBA );
   379     iCbaManager->UpdateCbaL( EPhoneCallHandlingInCallCBA );
   387 
       
   388     iStateMachine->ChangeState( EPhoneStateSingle );
   380     iStateMachine->ChangeState( EPhoneStateSingle );
   389     }
   381     }
   390 
   382 
   391 // -----------------------------------------------------------
   383 // -----------------------------------------------------------
   392 // CPhoneStateIncoming::HandleAudioPlayStoppedL
   384 // CPhoneStateIncoming::HandleAudioPlayStoppedL
   428 //
   420 //
   429 void CPhoneStateIncoming::HandleIdleL( TInt aCallId )
   421 void CPhoneStateIncoming::HandleIdleL( TInt aCallId )
   430     {
   422     {
   431     __LOGMETHODSTARTEND(EPhoneControl,
   423     __LOGMETHODSTARTEND(EPhoneControl,
   432         "CPhoneStateIncoming::HandleIdleL ()" );
   424         "CPhoneStateIncoming::HandleIdleL ()" );
   433 
   425     BeginTransEffectLC( ENumberEntryClose );
   434     BeginUiUpdateLC();
   426     BeginUiUpdateLC();
   435 
       
   436     // Remove call
       
   437     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
   427     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
   438     // Close menu bar, if it is displayed
       
   439     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
   428     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
   440     // Stop tone playing, if necessary
       
   441     iViewCommandHandle->ExecuteCommandL( EPhoneViewStopRingTone );
   429     iViewCommandHandle->ExecuteCommandL( EPhoneViewStopRingTone );
   442     
   430     
   443     TPhoneCmdParamBoolean globalNotifierParam;
   431     TPhoneCmdParamBoolean globalNotifierParam;
   444     globalNotifierParam.SetBoolean( EFalse );
   432     globalNotifierParam.SetBoolean( EFalse );
   445     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetEikonNotifiersDisabled,
   433     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetEikonNotifiersDisabled,
   446         &globalNotifierParam );
   434         &globalNotifierParam );
   447     
   435     
   448 
       
   449     SetDefaultFlagsL();
   436     SetDefaultFlagsL();
   450     
   437     
   451      if ( IsNumberEntryUsedL() )
   438      if ( IsNumberEntryUsedL() )
   452         {
   439         {
   453         if ( NeedToReturnToForegroundAppL() )
   440         if ( NeedToReturnToForegroundAppL() )
   454             {
   441             {
   455             // Return phone to the background if send to background is needed.
   442             // Return phone to the background if send to background is needed.
   456             iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
   443             iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
   457 
       
   458             iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility );
   444             iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility );
   459 
       
   460             // Set Number Entry CBA
       
   461             iCbaManager->SetCbaL( EPhoneNumberAcqCBA );
   445             iCbaManager->SetCbaL( EPhoneNumberAcqCBA );
   462             }
   446             }
   463         else
   447         else
   464             {
   448             {
   465             // Show the number entry if it exists.
   449             // Show the number entry if it exists.
   473         // idle screen in the background
   457         // idle screen in the background
   474         SetupIdleScreenInBackgroundL();
   458         SetupIdleScreenInBackgroundL();
   475         }
   459         }
   476     else
   460     else
   477         {
   461         {
   478         // Display idle screen
       
   479         DisplayIdleScreenL();
   462         DisplayIdleScreenL();
   480         }
   463         }
   481  
   464  
   482     DeleteTouchPaneButtons();
   465     DeleteTouchPaneButtons();
   483     EndUiUpdate();
   466     EndUiUpdate();
   484 
   467     EndTransEffect();
   485     // Go to idle state   
       
   486     iCbaManager->UpdateCbaL( EPhoneEmptyCBA );
   468     iCbaManager->UpdateCbaL( EPhoneEmptyCBA );
   487     iStateMachine->ChangeState( EPhoneStateIdle );
   469     iStateMachine->ChangeState( EPhoneStateIdle );
   488     }
   470     }
   489 
   471 
   490 // -----------------------------------------------------------
   472 // -----------------------------------------------------------