phoneapp/phoneuistates/src/cphonesingleandcallsetup.cpp
branchRCL_3
changeset 62 5266b1f337bd
parent 61 41a7f70b3818
child 69 8baf28733c3d
equal deleted inserted replaced
61:41a7f70b3818 62:5266b1f337bd
   140                 }
   140                 }
   141             else
   141             else
   142                 {
   142                 {
   143                 // Show not allowed note
   143                 // Show not allowed note
   144                 CPhoneState::SendGlobalErrorNoteL( 
   144                 CPhoneState::SendGlobalErrorNoteL( 
   145                     EPhoneNoteTextNotAllowed, ETrue );
   145                     EPhoneNoteTextNotAllowed );
   146                 }
   146                 }
   147             break;
   147             break;
   148 
   148 
   149         // end-key
   149         // end-key
   150         case EKeyNo:
   150         case EKeyNo:
   218 
   218 
   219     // Stop capturing keys
   219     // Stop capturing keys
   220     CaptureKeysDuringCallNotificationL( EFalse );
   220     CaptureKeysDuringCallNotificationL( EFalse );
   221 
   221 
   222     // Remove the number entry if it isn't DTMF dialer
   222     // Remove the number entry if it isn't DTMF dialer
   223     if ( !iOnScreenDialer || !IsNumberEntryVisibleL() )
   223     if ( !iOnScreenDialer || !IsNumberEntryVisibleL() || !IsDTMFEditorVisibleL() )
   224         {
   224         {
   225         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
   225         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
   226         }
   226         }
   227 
   227 
   228     TPhoneCmdParamCallHeaderData callHeaderParam;
   228     TPhoneCmdParamCallHeaderData callHeaderParam;
   235     // Set Hold flag to view EFalse that dtmf menu item not delete
   235     // Set Hold flag to view EFalse that dtmf menu item not delete
   236     TPhoneCmdParamBoolean holdFlag;
   236     TPhoneCmdParamBoolean holdFlag;
   237     holdFlag.SetBoolean( EFalse );
   237     holdFlag.SetBoolean( EFalse );
   238     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
   238     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
   239 
   239 
   240     SetTouchPaneButtons( EPhoneCallSetupAndSingleButtons );
       
   241     
       
   242     // Go to alerting state
   240     // Go to alerting state
   243     UpdateCbaL( EPhoneCallHandlingInCallCBA );
   241     UpdateCbaL( EPhoneCallHandlingInCallCBA );
   244     iStateMachine->ChangeState( EPhoneStateAlertingInSingle );
   242     iStateMachine->ChangeState( EPhoneStateAlertingInSingle );
   245     }
   243     }
   246 
   244 
   264     // Capturing keys and number entry must be removed because some
   262     // Capturing keys and number entry must be removed because some
   265     // networks jump over connecting state directly to connected state.
   263     // networks jump over connecting state directly to connected state.
   266     CaptureKeysDuringCallNotificationL( EFalse );
   264     CaptureKeysDuringCallNotificationL( EFalse );
   267     
   265     
   268     // Remove the number entry if it isn't DTMF dialer
   266     // Remove the number entry if it isn't DTMF dialer
   269     if ( !iOnScreenDialer || !IsNumberEntryVisibleL() )
   267     if ( !iOnScreenDialer || !IsNumberEntryVisibleL() || !IsDTMFEditorVisibleL() )
   270         {
   268         {
   271         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
   269         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
   272         }
   270         }
   273     
   271     
   274     // Set Hold flag to view
   272     // Set Hold flag to view
   291 // -----------------------------------------------------------
   289 // -----------------------------------------------------------
   292 //
   290 //
   293 void CPhoneSingleAndCallSetup::HandleIdleL( TInt aCallId )
   291 void CPhoneSingleAndCallSetup::HandleIdleL( TInt aCallId )
   294     {
   292     {
   295     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndCallSetup::HandleIdleL()");
   293     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndCallSetup::HandleIdleL()");
   296     
       
   297     BeginUiUpdateLC();
   294     BeginUiUpdateLC();
   298  
       
   299     // Remove call 
       
   300     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
   295     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
   301 
   296     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
   302     // Find out do we have single or outgoing call left
   297     // Find out do we have single or outgoing call left
   303     TPhoneCmdParamInteger activeCallCount;
   298     TPhoneCmdParamInteger activeCallCount;
   304     iViewCommandHandle->ExecuteCommandL(
   299     iViewCommandHandle->ExecuteCommandL(
   305         EPhoneViewGetCountOfActiveCalls, &activeCallCount );
   300             EPhoneViewGetCountOfActiveCalls, &activeCallCount );
   306         
       
   307     if( activeCallCount.Integer() )
   301     if( activeCallCount.Integer() )
   308         {
   302         {
   309         CheckIfRestoreNEContentAfterDtmfDialer();
   303         CheckIfRestoreNEContentAfterDtmfDialer();
   310  
       
   311         if ( IsNumberEntryUsedL() )
   304         if ( IsNumberEntryUsedL() )
   312             {
   305             {
   313             // Show the number entry if it exists
   306             // Show the number entry if it exists
   314             SetNumberEntryVisibilityL(ETrue);
   307             SetNumberEntryVisibilityL(ETrue);
   315             }
   308             }
   316         else
   309         else
   317             {
   310             {
   318             // Set incall CBAs
   311             // Set incall CBAs
   319             UpdateCbaL( EPhoneCallHandlingInCallCBA );    
   312             UpdateCbaL( EPhoneCallHandlingInCallCBA );    
   320             }
   313             }
   321             
       
   322         SetTouchPaneButtons( EPhoneIncallButtons );    
   314         SetTouchPaneButtons( EPhoneIncallButtons );    
   323         // UnCapture keys callsetup fails
   315         // UnCapture keys callsetup fails
   324         CaptureKeysDuringCallNotificationL( EFalse );
   316         CaptureKeysDuringCallNotificationL( EFalse );
   325         // Setup call was terminated
   317         // Setup call was terminated
   326         iStateMachine->ChangeState( EPhoneStateSingle );            
   318         iStateMachine->ChangeState( EPhoneStateSingle );
   327         }
   319         }
   328     else
   320     else
   329         {
   321         {
   330         // Display call termination note, if necessary
   322         // Display call termination note, if necessary
   331         DisplayCallTerminationNoteL();
   323         DisplayCallTerminationNoteL();
   332 
       
   333         // Single call was terminated
   324         // Single call was terminated
   334         SetTouchPaneButtons( EPhoneCallSetupButtons );
   325         SetTouchPaneButtons( EPhoneCallSetupButtons );
       
   326         SetToolbarDimming( ETrue );
   335         SetToolbarButtonLoudspeakerEnabled();
   327         SetToolbarButtonLoudspeakerEnabled();
   336         // Update call setup CBAs
   328         // Update call setup CBAs
   337         UpdateCbaL( EPhoneCallHandlingCallSetupCBA );
   329         UpdateCbaL( EPhoneCallHandlingCallSetupCBA );
   338         iStateMachine->ChangeState( EPhoneStateCallSetup );            
   330         iStateMachine->ChangeState( EPhoneStateCallSetup );
   339         }
   331         }
   340         
       
   341     EndUiUpdate();
   332     EndUiUpdate();
   342     }
   333     }
   343 
   334 
   344 // -----------------------------------------------------------
   335 // -----------------------------------------------------------
   345 // CPhoneSingleAndCallSetup::HandleCommandL
   336 // CPhoneSingleAndCallSetup::HandleCommandL