phoneapp/phoneuistates/src/cphonesingleandcallsetup.cpp
branchRCL_3
changeset 24 41a7f70b3818
parent 23 40a3f856b14d
child 25 5266b1f337bd
equal deleted inserted replaced
23:40a3f856b14d 24:41a7f70b3818
   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 );
   145                     EPhoneNoteTextNotAllowed, ETrue );
   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() || !IsDTMFEditorVisibleL() )
   223     if ( !iOnScreenDialer || !IsNumberEntryVisibleL() )
   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     
   240     // Go to alerting state
   242     // Go to alerting state
   241     UpdateCbaL( EPhoneCallHandlingInCallCBA );
   243     UpdateCbaL( EPhoneCallHandlingInCallCBA );
   242     iStateMachine->ChangeState( EPhoneStateAlertingInSingle );
   244     iStateMachine->ChangeState( EPhoneStateAlertingInSingle );
   243     }
   245     }
   244 
   246 
   262     // Capturing keys and number entry must be removed because some
   264     // Capturing keys and number entry must be removed because some
   263     // networks jump over connecting state directly to connected state.
   265     // networks jump over connecting state directly to connected state.
   264     CaptureKeysDuringCallNotificationL( EFalse );
   266     CaptureKeysDuringCallNotificationL( EFalse );
   265     
   267     
   266     // Remove the number entry if it isn't DTMF dialer
   268     // Remove the number entry if it isn't DTMF dialer
   267     if ( !iOnScreenDialer || !IsNumberEntryVisibleL() || !IsDTMFEditorVisibleL() )
   269     if ( !iOnScreenDialer || !IsNumberEntryVisibleL() )
   268         {
   270         {
   269         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
   271         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
   270         }
   272         }
   271     
   273     
   272     // Set Hold flag to view
   274     // Set Hold flag to view
   289 // -----------------------------------------------------------
   291 // -----------------------------------------------------------
   290 //
   292 //
   291 void CPhoneSingleAndCallSetup::HandleIdleL( TInt aCallId )
   293 void CPhoneSingleAndCallSetup::HandleIdleL( TInt aCallId )
   292     {
   294     {
   293     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndCallSetup::HandleIdleL()");
   295     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndCallSetup::HandleIdleL()");
       
   296     
   294     BeginUiUpdateLC();
   297     BeginUiUpdateLC();
       
   298  
       
   299     // Remove call 
   295     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
   300     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
   296     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
   301 
   297     // Find out do we have single or outgoing call left
   302     // Find out do we have single or outgoing call left
   298     TPhoneCmdParamInteger activeCallCount;
   303     TPhoneCmdParamInteger activeCallCount;
   299     iViewCommandHandle->ExecuteCommandL(
   304     iViewCommandHandle->ExecuteCommandL(
   300             EPhoneViewGetCountOfActiveCalls, &activeCallCount );
   305         EPhoneViewGetCountOfActiveCalls, &activeCallCount );
       
   306         
   301     if( activeCallCount.Integer() )
   307     if( activeCallCount.Integer() )
   302         {
   308         {
   303         CheckIfRestoreNEContentAfterDtmfDialer();
   309         CheckIfRestoreNEContentAfterDtmfDialer();
       
   310  
   304         if ( IsNumberEntryUsedL() )
   311         if ( IsNumberEntryUsedL() )
   305             {
   312             {
   306             // Show the number entry if it exists
   313             // Show the number entry if it exists
   307             SetNumberEntryVisibilityL(ETrue);
   314             SetNumberEntryVisibilityL(ETrue);
   308             }
   315             }
   309         else
   316         else
   310             {
   317             {
   311             // Set incall CBAs
   318             // Set incall CBAs
   312             UpdateCbaL( EPhoneCallHandlingInCallCBA );    
   319             UpdateCbaL( EPhoneCallHandlingInCallCBA );    
   313             }
   320             }
       
   321             
   314         SetTouchPaneButtons( EPhoneIncallButtons );    
   322         SetTouchPaneButtons( EPhoneIncallButtons );    
   315         // UnCapture keys callsetup fails
   323         // UnCapture keys callsetup fails
   316         CaptureKeysDuringCallNotificationL( EFalse );
   324         CaptureKeysDuringCallNotificationL( EFalse );
   317         // Setup call was terminated
   325         // Setup call was terminated
   318         iStateMachine->ChangeState( EPhoneStateSingle );
   326         iStateMachine->ChangeState( EPhoneStateSingle );            
   319         }
   327         }
   320     else
   328     else
   321         {
   329         {
   322         // Display call termination note, if necessary
   330         // Display call termination note, if necessary
   323         DisplayCallTerminationNoteL();
   331         DisplayCallTerminationNoteL();
       
   332 
   324         // Single call was terminated
   333         // Single call was terminated
   325         SetTouchPaneButtons( EPhoneCallSetupButtons );
   334         SetTouchPaneButtons( EPhoneCallSetupButtons );
   326         SetToolbarDimming( ETrue );
       
   327         SetToolbarButtonLoudspeakerEnabled();
   335         SetToolbarButtonLoudspeakerEnabled();
   328         // Update call setup CBAs
   336         // Update call setup CBAs
   329         UpdateCbaL( EPhoneCallHandlingCallSetupCBA );
   337         UpdateCbaL( EPhoneCallHandlingCallSetupCBA );
   330         iStateMachine->ChangeState( EPhoneStateCallSetup );
   338         iStateMachine->ChangeState( EPhoneStateCallSetup );            
   331         }
   339         }
       
   340         
   332     EndUiUpdate();
   341     EndUiUpdate();
   333     }
   342     }
   334 
   343 
   335 // -----------------------------------------------------------
   344 // -----------------------------------------------------------
   336 // CPhoneSingleAndCallSetup::HandleCommandL
   345 // CPhoneSingleAndCallSetup::HandleCommandL