phoneapp/phoneuistates/src/cphoneconference.cpp
branchRCL_3
changeset 14 24062c24fe38
parent 9 8871b09be73b
child 15 2a26698d78ba
equal deleted inserted replaced
9:8871b09be73b 14:24062c24fe38
   702     
   702     
   703     SetDefaultFlagsL();
   703     SetDefaultFlagsL();
   704 
   704 
   705     if ( IsNumberEntryUsedL() )
   705     if ( IsNumberEntryUsedL() )
   706         {
   706         {
   707         // Show the number entry if it exists
   707         if ( NeedToReturnToForegroundAppL() )
   708         SetNumberEntryVisibilityL(ETrue);
   708             {
   709         
   709             // Return phone to the background if menu application is needed to foreground.
   710         // Close dtmf dialer when call is disconnected.
   710             iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
   711         if ( iOnScreenDialer && IsDTMFEditorVisibleL() )
   711     
   712             {            
   712             iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility );
   713             CloseDTMFEditorL();
   713     
   714             // Display idle screen and update CBAs
   714             // Set Number Entry CBA
   715             DisplayIdleScreenL();
   715             iCbaManager->SetCbaL( EPhoneNumberAcqCBA );
   716             }        
   716             }
   717         }
   717         else
   718     else if ( !TopAppIsDisplayedL() )
   718             {
       
   719             // Show the number entry if it exists
       
   720             SetNumberEntryVisibilityL(ETrue);
       
   721         
       
   722             // Close dtmf dialer when call is disconnected.
       
   723             if ( iOnScreenDialer && IsDTMFEditorVisibleL() )
       
   724                 {            
       
   725                 CloseDTMFEditorL();
       
   726                 // Display idle screen and update CBAs
       
   727                 DisplayIdleScreenL();
       
   728                 }
       
   729             }
       
   730         }  
       
   731     else if ( !TopAppIsDisplayedL() || NeedToReturnToForegroundAppL() )
   719         {
   732         {
   720         // Close menu bar, if it is displayed
   733         // Close menu bar, if it is displayed
   721         iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
   734         iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
   722         
   735         
   723         // Continue displaying current app but set up the 
   736         // Continue displaying current app but set up the 
   750     __LOGMETHODSTARTEND( EPhoneUIStates, 
   763     __LOGMETHODSTARTEND( EPhoneUIStates, 
   751         "CPhoneConference::MakeStateTransitionToSingleL()");
   764         "CPhoneConference::MakeStateTransitionToSingleL()");
   752     // Close menu bar, if it is displayed
   765     // Close menu bar, if it is displayed
   753     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
   766     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
   754  
   767  
   755     if ( IsNumberEntryUsedL() )
   768 
   756         {
       
   757         // Show the number entry if it exists
       
   758         SetNumberEntryVisibilityL(ETrue);
       
   759         }
       
   760     SetTouchPaneButtons( EPhoneIncallButtons );    
   769     SetTouchPaneButtons( EPhoneIncallButtons );    
   761   
   770   
   762     // Go to single state
   771     // Go to single state
   763     UpdateCbaL( EPhoneCallHandlingInCallCBA );
   772     UpdateCbaL( EPhoneCallHandlingInCallCBA );
   764     iStateMachine->ChangeState( EPhoneStateSingle );        
   773     iStateMachine->ChangeState( EPhoneStateSingle );        
   773     __LOGMETHODSTARTEND( EPhoneUIStates, 
   782     __LOGMETHODSTARTEND( EPhoneUIStates, 
   774         "CPhoneConference::MakeStateTransitionToTwoSinglesL()");
   783         "CPhoneConference::MakeStateTransitionToTwoSinglesL()");
   775     // Close menu bar, if it is displayed
   784     // Close menu bar, if it is displayed
   776     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
   785     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
   777 
   786 
   778     if ( IsNumberEntryUsedL() )
       
   779         {
       
   780         // Show the number entry if it exists
       
   781         SetNumberEntryVisibilityL(ETrue);
       
   782         }
       
   783         
   787         
   784     SetTouchPaneButtons( EPhoneTwoSinglesButtons );        
   788     SetTouchPaneButtons( EPhoneTwoSinglesButtons );        
   785     
   789     
   786     // Set Two singles softkeys
   790     // Set Two singles softkeys
   787     UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA );
   791     UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA );
   928     // Hide the number entry if it exists
   932     // Hide the number entry if it exists
   929     if ( IsNumberEntryUsedL() )
   933     if ( IsNumberEntryUsedL() )
   930         {
   934         {
   931         SetNumberEntryVisibilityL( EFalse );    
   935         SetNumberEntryVisibilityL( EFalse );    
   932         }
   936         }
       
   937     
       
   938     // Indicate that the menu application on foreground needs to be sent back to the foreground 
       
   939     // after call is ended.
       
   940     TPhoneCmdParamBoolean booleanParam;
       
   941     booleanParam.SetBoolean( !TopAppIsDisplayedL() );
       
   942     iViewCommandHandle->ExecuteCommandL( 
       
   943         EPhoneViewSetNeedToReturnToForegroundAppStatus,
       
   944         &booleanParam );
   933  
   945  
   934     TPhoneCmdParamBoolean dialerParam;
   946     TPhoneCmdParamBoolean dialerParam;
   935     dialerParam.SetBoolean( ETrue );
   947     dialerParam.SetBoolean( ETrue );
   936     
   948     
   937     // Get allow waiting call header param value.
   949     // Get allow waiting call header param value.
   968     __LOGMETHODSTARTEND( EPhoneUIStates, 
   980     __LOGMETHODSTARTEND( EPhoneUIStates, 
   969         "CPhoneConference::DisplayIncomingCallL()");
   981         "CPhoneConference::DisplayIncomingCallL()");
   970     // Close menu bar, if it is displayed
   982     // Close menu bar, if it is displayed
   971     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
   983     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
   972 
   984 
   973     // Cannot delete active note, e.g. New call query, 
   985     // Remove any phone dialogs if they are displayed
   974     // but show waiting note with or without caller name
   986     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
   975     if ( IsAnyQueryActiveL() ||  
       
   976         ( !aCommandParam.Boolean() && iOnScreenDialer ) )
       
   977         {
       
   978         CallWaitingNoteL( aCallId );        
       
   979         }
       
   980     else
       
   981         {
       
   982         // Remove any phone dialogs if they are displayed
       
   983         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
       
   984         }
       
   985 
   987 
   986     // Indicate that the Phone needs to be sent to the background if
   988     // Indicate that the Phone needs to be sent to the background if
   987     // an application other than the top application is in the foreground
   989     // an application other than the top application is in the foreground
   988     TPhoneCmdParamBoolean booleanParam;
   990     TPhoneCmdParamBoolean booleanParam;
   989     booleanParam.SetBoolean( !TopAppIsDisplayedL() );
   991     booleanParam.SetBoolean( !TopAppIsDisplayedL() );
   990     iViewCommandHandle->ExecuteCommandL( 
   992     iViewCommandHandle->ExecuteCommandL( 
   991         EPhoneViewSetNeedToSendToBackgroundStatus,
   993         EPhoneViewSetNeedToReturnToForegroundAppStatus,
   992         &booleanParam );
   994         &booleanParam );
   993 
   995 
   994     // Bring Phone app in the foreground
   996     // Bring Phone app in the foreground
   995     TPhoneCmdParamInteger uidParam;
   997     TPhoneCmdParamInteger uidParam;
   996     uidParam.SetInteger( KUidPhoneApplication.iUid );
   998     uidParam.SetInteger( KUidPhoneApplication.iUid );