phoneapp/phoneuistates/src/cphonesingleandwaiting.cpp
branchRCL_3
changeset 4 24062c24fe38
parent 0 5f000ab63145
child 5 2a26698d78ba
equal deleted inserted replaced
3:8871b09be73b 4:24062c24fe38
   450         }
   450         }
   451     else
   451     else
   452         {
   452         {
   453         // Effect is shown when dialer exist.
   453         // Effect is shown when dialer exist.
   454         TBool effectStarted ( EFalse );
   454         TBool effectStarted ( EFalse );
   455         if ( !NeedToSendToBackgroundL() )
   455         if ( !NeedToReturnToForegroundAppL() )
   456             {
   456             {
   457             BeginTransEffectLC( ENumberEntryOpen );
   457             BeginTransEffectLC( ENumberEntryOpen );
   458             effectStarted = ETrue;
   458             effectStarted = ETrue;
   459             }
   459             }
   460 
   460 
   464         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
   464         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
   465 
   465 
   466         // Idle message came for waiting call
   466         // Idle message came for waiting call
   467         if ( IsNumberEntryUsedL() )
   467         if ( IsNumberEntryUsedL() )
   468             {
   468             {
   469             if ( NeedToSendToBackgroundL() )
   469             if ( NeedToReturnToForegroundAppL() )
   470                 {
   470                 {
   471                 // Return phone to the background if send to background is needed.
   471                 // Return phone to the background if send to background is needed.
   472                 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
   472                 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
   473 
   473 
   474                 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility );
   474                 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility );
   482                 }
   482                 }
   483             }
   483             }
   484         else
   484         else
   485             {
   485             {
   486             UpdateCbaL( EPhoneCallHandlingInCallCBA );
   486             UpdateCbaL( EPhoneCallHandlingInCallCBA );
   487             // If numberentry is not open just check NeedToSendToBackgroundL and
   487             // If numberentry is not open just check NeedToReturnToForegroundAppL and
   488             // sendbackround if needed.
   488             // sendbackround if needed.
   489             if ( NeedToSendToBackgroundL() )
   489             if ( NeedToReturnToForegroundAppL() )
   490                 {
   490                 {
   491                 // Return phone to the background if send to background is needed.
   491                 // Return phone to the background if send to background is needed.
   492                 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
   492                 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
   493                 }
   493                 }
   494             }
   494             }
   620     __LOGMETHODSTARTEND( EPhoneUIStates,
   620     __LOGMETHODSTARTEND( EPhoneUIStates,
   621         "CPhoneSingleAndWaiting::MakeStateTransitionToTwoSinglesL() ");
   621         "CPhoneSingleAndWaiting::MakeStateTransitionToTwoSinglesL() ");
   622 
   622 
   623     // Effect is shown when dialer exist.
   623     // Effect is shown when dialer exist.
   624     TBool effectStarted ( EFalse );
   624     TBool effectStarted ( EFalse );
   625     if ( !NeedToSendToBackgroundL() )
   625     if ( !NeedToReturnToForegroundAppL() )
   626         {
   626         {
   627         BeginTransEffectLC( ENumberEntryOpen );
   627         BeginTransEffectLC( ENumberEntryOpen );
   628         effectStarted = ETrue;
   628         effectStarted = ETrue;
   629         }
   629         }
   630     
   630     
   643     // Set Hold flag to view
   643     // Set Hold flag to view
   644     TPhoneCmdParamBoolean holdFlag;
   644     TPhoneCmdParamBoolean holdFlag;
   645     holdFlag.SetBoolean( EFalse );
   645     holdFlag.SetBoolean( EFalse );
   646     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
   646     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
   647 
   647 
       
   648     // Close dtmf dialer if exist.
       
   649     if ( iOnScreenDialer && IsDTMFEditorVisibleL() )
       
   650         {
       
   651         CloseDTMFEditorL();
       
   652         }
       
   653     else if ( iOnScreenDialer && IsCustomizedDialerVisibleL() )
       
   654         {
       
   655         CloseCustomizedDialerL();
       
   656         }
       
   657      
   648     if ( IsNumberEntryUsedL() )
   658     if ( IsNumberEntryUsedL() )
   649         {
   659         {
   650         if ( NeedToSendToBackgroundL() )
   660         if ( NeedToReturnToForegroundAppL() )
   651             {
   661             {
   652             // Return phone to the background if send to background is needed.
       
   653             iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
       
   654 
       
   655             iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility );
   662             iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility );
   656 
   663 
   657             UpdateCbaL( EPhoneCallHandlingInCallCBA );
   664             UpdateCbaL( EPhoneCallHandlingInCallCBA );
   658             }
   665             }
   659         else
   666         else
   664         }
   671         }
   665     else
   672     else
   666         {
   673         {
   667         // Set Two singles softkeys
   674         // Set Two singles softkeys
   668         UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA );
   675         UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA );
   669 
       
   670         // If numberentry is not open just check NeedToSendToBackgroundL and
       
   671         // sendbackround if needed.
       
   672         if ( NeedToSendToBackgroundL() )
       
   673             {
       
   674             // Return phone to the background if send to background is needed.
       
   675             iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
       
   676             }
       
   677         }
       
   678 
       
   679     // Close dtmf dialer if exist.
       
   680     if ( iOnScreenDialer && IsDTMFEditorVisibleL() )
       
   681         {
       
   682         CloseDTMFEditorL();
       
   683         }
       
   684     else if ( iOnScreenDialer && IsCustomizedDialerVisibleL() )
       
   685         {
       
   686         CloseCustomizedDialerL();
       
   687         }
   676         }
   688 
   677 
   689     SetTouchPaneButtons( EPhoneTwoSinglesButtons );
   678     SetTouchPaneButtons( EPhoneTwoSinglesButtons );
   690     EndUiUpdate();
   679     EndUiUpdate();
   691     if( effectStarted )
   680     if( effectStarted )
   822 // -----------------------------------------------------------
   811 // -----------------------------------------------------------
   823 //
   812 //
   824 void CPhoneSingleAndWaiting::HandleDisconnectingL( TInt aCallId )
   813 void CPhoneSingleAndWaiting::HandleDisconnectingL( TInt aCallId )
   825     {
   814     {
   826     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndWaiting::HandleDisconnectingL( ) ");
   815     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndWaiting::HandleDisconnectingL( ) ");
   827     
       
   828     if( ( iSingleCallId == aCallId ) && IsVideoCall( aCallId ) )
       
   829         {
       
   830         __PHONELOG( EBasic, EPhoneControl, 
       
   831             "CPhoneSingleAndWaiting::HandleDisconnectingL EPhoneViewSetNeedToSendToBackgroundStatus" );
       
   832         
       
   833         // Keep phone on the foreground
       
   834         TPhoneCmdParamBoolean booleanParam;
       
   835         booleanParam.SetBoolean( EFalse );
       
   836         iViewCommandHandle->ExecuteCommandL(
       
   837             EPhoneViewSetNeedToSendToBackgroundStatus,
       
   838             &booleanParam );
       
   839         }
       
   840     }
   816     }
   841 
   817 
   842 // End of File
   818 // End of File