phoneapp/phoneuistates/src/cphoneincoming.cpp
branchRCL_3
changeset 81 c26cc2a7c548
parent 69 8baf28733c3d
equal deleted inserted replaced
73:e30d4a1b8bad 81:c26cc2a7c548
   163                {
   163                {
   164                HandleIncomingL( iWaitingCallId );
   164                HandleIncomingL( iWaitingCallId );
   165                
   165                
   166                // Prevent execution of CPhoneStateIncoming::HandleIdleL, only remove
   166                // Prevent execution of CPhoneStateIncoming::HandleIdleL, only remove
   167                // the call bubble
   167                // the call bubble
   168                TransitionHandlerL().BeginUiUpdateLC();
   168                BeginUiUpdateLC();
   169                iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
   169                iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
   170                TransitionHandlerL().EndUiUpdate();
   170                EndUiUpdate();
   171 
   171 
   172                iWaitingCallId = KErrNotFound;
   172                iWaitingCallId = KErrNotFound;
   173                }
   173                }
   174            else
   174            else
   175                {
   175                {
   191 // -----------------------------------------------------------
   191 // -----------------------------------------------------------
   192 void CPhoneIncoming::HandleIncomingL( TInt aCallId )
   192 void CPhoneIncoming::HandleIncomingL( TInt aCallId )
   193     {
   193     {
   194     __LOGMETHODSTARTEND( EPhoneUIStates, 
   194     __LOGMETHODSTARTEND( EPhoneUIStates, 
   195         "CPhoneIncoming::HandleIncomingL()");
   195         "CPhoneIncoming::HandleIncomingL()");
       
   196     
   196     TPhoneCmdParamCallStateData callState;
   197     TPhoneCmdParamCallStateData callState;
   197     callState.SetCallState( EPEStateConnected );
   198     callState.SetCallState( EPEStateConnected );
   198     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCallIdByState, &callState );
   199     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCallIdByState, &callState );
   199     TInt connectedCall = callState.CallId(); 
   200     TInt connectedCall = callState.CallId(); 
   200     
   201     
   201     TransitionHandlerL().IncomingCallUiUpdateLC();
   202     IsNumberEntryUsedL() ? 
       
   203         BeginTransEffectLC( ECallUiAppear ) :
       
   204         BeginTransEffectLC( ENumberEntryOpen );
       
   205     BeginUiUpdateLC();
   202     
   206     
   203     // Hide the number entry if it exists
   207     // Hide the number entry if it exists
   204     if ( IsNumberEntryUsedL() )
   208     if ( IsNumberEntryUsedL() )
   205         {
   209         {
   206         SetNumberEntryVisibilityL( EFalse );    
   210         SetNumberEntryVisibilityL( EFalse );    
   207         }
   211         }
   208     
   212     
   209     TPhoneCmdParamBoolean dialerParam;
   213     TPhoneCmdParamBoolean dialerParam;
   210     dialerParam.SetBoolean( ETrue );
   214     dialerParam.SetBoolean( ETrue );
       
   215     
   211     AllowShowingOfWaitingCallHeaderL( dialerParam );
   216     AllowShowingOfWaitingCallHeaderL( dialerParam );
   212       
   217       
   213     // Close fast swap window if it's displayed
   218     // Close fast swap window if it's displayed
   214     EikonEnv()->DismissTaskList();
   219     CEikonEnv::Static()->DismissTaskList();
   215     
   220     
   216     // If the 1st incoming call became Connected, this is waiting call
   221     // If the 1st incoming call became Connected, this is waiting call
   217     // If the 1st incoming call went just Idle, this is a normal call
   222     // If the 1st incoming call went just Idle, this is a normal call
   218     if ( connectedCall > KErrNotFound )
   223     if ( connectedCall > KErrNotFound )
   219         {
   224         {
   228         {
   233         {
   229         dialerParam.SetBoolean( EFalse );
   234         dialerParam.SetBoolean( EFalse );
   230         }
   235         }
   231     
   236     
   232     SetToolbarDimming( EFalse );
   237     SetToolbarDimming( EFalse );
       
   238     // Display incoming call
   233     DisplayIncomingCallL( aCallId, dialerParam );
   239     DisplayIncomingCallL( aCallId, dialerParam );
   234     TransitionHandlerL().EndUiUpdateAndEffect();
   240 
       
   241     EndUiUpdate();
       
   242     EndTransEffect();
   235 
   243 
   236     if ( connectedCall > KErrNotFound )
   244     if ( connectedCall > KErrNotFound )
   237         {
   245         {
   238         iCbaManager->UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   246         iCbaManager->UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   239         iStateMachine->ChangeState( EPhoneStateWaitingInSingle );   
   247         iStateMachine->ChangeState( EPhoneStateWaitingInSingle );   
   263         iViewCommandHandle->ExecuteCommandL( EPhoneViewDisableKeyLockWithoutNote );
   271         iViewCommandHandle->ExecuteCommandL( EPhoneViewDisableKeyLockWithoutNote );
   264         }
   272         }
   265     
   273     
   266     // Indicate that the Phone needs to be sent to the background if
   274     // Indicate that the Phone needs to be sent to the background if
   267     // an application other than the top application is in the foreground
   275     // an application other than the top application is in the foreground
   268     SetNeedToReturnToForegroundAppStatusL( !TopAppIsDisplayedL() );
   276     TPhoneCmdParamBoolean booleanParam;
   269     
   277     booleanParam.SetBoolean( !TopAppIsDisplayedL() );
       
   278     iViewCommandHandle->ExecuteCommandL( 
       
   279             EPhoneViewSetNeedToReturnToForegroundAppStatus,
       
   280         &booleanParam );
       
   281 
   270     // Bring Phone app in the foreground
   282     // Bring Phone app in the foreground
   271     TPhoneCmdParamInteger uidParam;
   283     TPhoneCmdParamInteger uidParam;
   272     uidParam.SetInteger( KUidPhoneApplication.iUid );
   284     uidParam.SetInteger( KUidPhoneApplication.iUid );
   273     iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,
   285     iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,
   274         &uidParam );
   286         &uidParam );