phoneapp/phoneuistates/src/cphoneconferenceandwaiting.cpp
changeset 65 2a5d4ab426d3
parent 50 377c906a8701
child 74 d1c62c765e48
equal deleted inserted replaced
60:1eef62f5c541 65:2a5d4ab426d3
    68 //
    68 //
    69 void CPhoneConferenceAndWaiting::ConstructL()
    69 void CPhoneConferenceAndWaiting::ConstructL()
    70     {
    70     {
    71     CPhoneConference::ConstructL();
    71     CPhoneConference::ConstructL();
    72     
    72     
    73     // Fetch ringing call's id from view
       
    74     TPhoneCmdParamCallStateData callStateData;
    73     TPhoneCmdParamCallStateData callStateData;
    75     callStateData.SetCallState( EPEStateRinging );
    74     callStateData.SetCallState( EPEStateRinging );
    76     iViewCommandHandle->HandleCommandL(
    75     iViewCommandHandle->HandleCommandL(
    77         EPhoneViewGetCallIdByState, &callStateData );
    76         EPhoneViewGetCallIdByState, &callStateData );
    78     iRingingCallId = callStateData.CallId();
    77     iRingingCallId = callStateData.CallId();
   134         case MEngineMonitor::EPEMessageConnectedConference:
   133         case MEngineMonitor::EPEMessageConnectedConference:
   135             {
   134             {
   136             TPhoneCmdParamInteger callIdParam;
   135             TPhoneCmdParamInteger callIdParam;
   137             iViewCommandHandle->ExecuteCommandL( 
   136             iViewCommandHandle->ExecuteCommandL( 
   138                         EPhoneViewGetExpandedBubbleCallId, &callIdParam );
   137                         EPhoneViewGetExpandedBubbleCallId, &callIdParam );
   139             
       
   140             CPhoneConference::HandlePhoneEngineMessageL( aMessage, 
   138             CPhoneConference::HandlePhoneEngineMessageL( aMessage, 
   141                             aCallId );
   139                             aCallId );
   142             
       
   143             if ( KConferenceCallId == callIdParam.Integer() )
   140             if ( KConferenceCallId == callIdParam.Integer() )
   144                 {
   141                 {
   145                 iViewCommandHandle->ExecuteCommand(EPhoneSetConferenceExpanded);
   142                 iViewCommandHandle->ExecuteCommand(EPhoneSetConferenceExpanded);
   146                 }
   143                 }
   147             }
   144             }
   163     TKeyCode aCode )
   160     TKeyCode aCode )
   164     {
   161     {
   165     __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleKeyMessageL()");
   162     __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleKeyMessageL()");
   166     switch ( aCode )
   163     switch ( aCode )
   167         {
   164         {
   168         // send-key
   165         case EKeyYes:  // send-key
   169         case EKeyYes:
       
   170             if( IsNumberEntryVisibleL() )
   166             if( IsNumberEntryVisibleL() )
   171                 {
   167                 {
   172                 CallFromNumberEntryL();
   168                 CallFromNumberEntryL();
   173                 }
   169                 }
   174             else
   170             else
   175                 {
   171                 {
   176                 // Number entry is below incoming call bubble so
       
   177                 // answer the call
       
   178                 iStateMachine->SendPhoneEngineMessage(
   172                 iStateMachine->SendPhoneEngineMessage(
   179                     MPEPhoneModel::EPEMessageAnswer ); 
   173                     MPEPhoneModel::EPEMessageAnswer ); 
   180                 }
   174                 }
   181             break;
   175             break;
   182             
   176             
   183         default:
   177         default:
   184             // do base operation
       
   185             CPhoneConference::HandleKeyMessageL( aMessage, aCode );
   178             CPhoneConference::HandleKeyMessageL( aMessage, aCode );
   186             break;
   179             break;
   187         }
   180         }
   188     }
   181     }
   189 
   182 
   209 //
   202 //
   210 void CPhoneConferenceAndWaiting::HandleConnectedL( TInt aCallId )
   203 void CPhoneConferenceAndWaiting::HandleConnectedL( TInt aCallId )
   211     {
   204     {
   212     __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleConnectedL()");
   205     __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleConnectedL()");
   213     TPhoneCmdParamCallStateData callStateData;
   206     TPhoneCmdParamCallStateData callStateData;
   214     
       
   215     if ( iRingingCallId == KErrNotFound )
   207     if ( iRingingCallId == KErrNotFound )
   216         {
   208         {
   217         // Fetch ringing call's id from view
       
   218         TPhoneCmdParamCallStateData callStateData;
   209         TPhoneCmdParamCallStateData callStateData;
   219         callStateData.SetCallState( EPEStateRinging );
   210         callStateData.SetCallState( EPEStateRinging );
   220         iViewCommandHandle->HandleCommandL(
   211         iViewCommandHandle->HandleCommandL(
   221             EPhoneViewGetCallIdByState, &callStateData );
   212             EPhoneViewGetCallIdByState, &callStateData );
   222         iRingingCallId = callStateData.CallId();   
   213         iRingingCallId = callStateData.CallId();   
   223         }
   214         }
   224     
   215     
   225     if ( iRingingCallId == aCallId )
   216     if ( iRingingCallId == aCallId )
   226         {
   217         {
   227         // not a member of conference call            
   218         // not a member of conference call
   228         MakeStateTransitionToConferenceAndSingleL( aCallId );
   219         MakeStateTransitionToConferenceAndSingleL( aCallId );
   229         }   
   220         }   
   230     else
   221     else
   231         {
   222         {
   232         // member of conference call which is on hold
   223         // member of conference call which is on hold
   242 // -----------------------------------------------------------
   233 // -----------------------------------------------------------
   243 //
   234 //
   244 void CPhoneConferenceAndWaiting::MakeStateTransitionToConferenceAndSingleL( TInt aCallId )
   235 void CPhoneConferenceAndWaiting::MakeStateTransitionToConferenceAndSingleL( TInt aCallId )
   245     {
   236     {
   246     __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::MakeStateTransitionToConferenceAndSingleL()");
   237     __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::MakeStateTransitionToConferenceAndSingleL()");
   247     
       
   248     if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke )
   238     if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke )
   249         && iStateMachine->PhoneStorage()->IsScreenLocked() )
   239         && iStateMachine->PhoneStorage()->IsScreenLocked() )
   250         {
   240         {
   251         EnableCallUIL();
   241         EnableCallUIL();
   252         }
   242         }
   253     
   243     
   254     // Reset blocked keys list
       
   255     iStateMachine->PhoneStorage()->ResetBlockedKeysList();
   244     iStateMachine->PhoneStorage()->ResetBlockedKeysList();
   256         
   245     BeginUiUpdateLC();
   257     BeginUiUpdateLC();    
       
   258          
       
   259     UpdateRemoteInfoDataL ( aCallId );
   246     UpdateRemoteInfoDataL ( aCallId );
   260     
   247     
   261     // Show bubble
       
   262     TPhoneCmdParamCallHeaderData callHeaderParam;
   248     TPhoneCmdParamCallHeaderData callHeaderParam;
   263     callHeaderParam.SetCallState( EPEStateConnected );
   249     callHeaderParam.SetCallState( EPEStateConnected );
   264     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, 
   250     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, 
   265         &callHeaderParam );
   251         &callHeaderParam );
   266     
   252     
   267     
       
   268     if ( IsNumberEntryUsedL() )
   253     if ( IsNumberEntryUsedL() )
   269         {
   254         {
   270         if ( NeedToSendToBackgroundL() )
   255         if ( NeedToSendToBackgroundL() )
   271             {           
   256             {
   272             UpdateCbaL( EPhoneCallHandlingInCallCBA );
   257             UpdateCbaL( EPhoneCallHandlingInCallCBA );
   273             }
   258             }
   274         else
   259         else
   275             {
   260             {
   276             // Show the number entry if it exists.
       
   277             SetNumberEntryVisibilityL(ETrue);
   261             SetNumberEntryVisibilityL(ETrue);
   278             }
   262             }
   279         }
   263         }
   280     else
   264     else
   281         {
   265         {
   282         UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA );
   266         UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA );
   283         // If numberentry is not open just check NeedToSendToBackgroundL and 
       
   284         // sendbackround if needed.
       
   285         }
   267         }
   286     SetTouchPaneButtons( EPhoneConferenceAndSingleButtons );
   268     SetTouchPaneButtons( EPhoneConferenceAndSingleButtons );
   287     
       
   288     EndUiUpdate();
   269     EndUiUpdate();
   289 
   270     iStateMachine->ChangeState( EPhoneStateConferenceAndSingle );
   290     // CBA updates in above if-else conditions
       
   291     iStateMachine->ChangeState( EPhoneStateConferenceAndSingle );                     
       
   292     }
   271     }
   293 
   272 
   294 // -----------------------------------------------------------
   273 // -----------------------------------------------------------
   295 // CPhoneConferenceAndWaiting::HandleIdleL
   274 // CPhoneConferenceAndWaiting::HandleIdleL
   296 // -----------------------------------------------------------
   275 // -----------------------------------------------------------
   297 //
   276 //
   298 void CPhoneConferenceAndWaiting::HandleIdleL( TInt aCallId )
   277 void CPhoneConferenceAndWaiting::HandleIdleL( TInt aCallId )
   299     {
   278     {
   300     __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleIdleL()");
   279     __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleIdleL()");
   301     
       
   302     if ( iRingingCallId == KErrNotFound )
   280     if ( iRingingCallId == KErrNotFound )
   303         {
   281         {
   304         // Fetch ringing call's id from view
       
   305         TPhoneCmdParamCallStateData callStateData;
   282         TPhoneCmdParamCallStateData callStateData;
   306         callStateData.SetCallState( EPEStateRinging );
   283         callStateData.SetCallState( EPEStateRinging );
   307         iViewCommandHandle->HandleCommandL(
   284         iViewCommandHandle->HandleCommandL(
   308             EPhoneViewGetCallIdByState, &callStateData );
   285             EPhoneViewGetCallIdByState, &callStateData );
   309         iRingingCallId = callStateData.CallId();   
   286         iRingingCallId = callStateData.CallId();   
   310         }
   287         }
   311     
   288     
   312     if( iRingingCallId == aCallId )
   289     if( iRingingCallId == aCallId )
   313         {
   290         {
   314         
   291         
   315         BeginUiUpdateLC();    
   292         BeginUiUpdateLC();
   316 
       
   317         // Remove call 
       
   318         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
   293         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
   319             
   294             
   320         if ( IsNumberEntryUsedL() )
   295         if ( IsNumberEntryUsedL() )
   321             {
   296             {
   322             if ( NeedToSendToBackgroundL() )
   297             if ( NeedToSendToBackgroundL() )
   323                 {
   298                 {
   324                 // Return phone to the background if send to background is needed.
       
   325                 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
   299                 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
   326 
       
   327                 UpdateCbaL( EPhoneCallHandlingInCallCBA );
   300                 UpdateCbaL( EPhoneCallHandlingInCallCBA );
   328                 }
   301                 }
   329             else
   302             else
   330                 {
   303                 {
   331                 // Show the number entry if it exists.
       
   332                 SetNumberEntryVisibilityL(ETrue);
   304                 SetNumberEntryVisibilityL(ETrue);
   333                 }
   305                 }
   334             }
   306             }
   335         else
   307         else
   336             {
   308             {
   347         if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke ) 
   319         if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke ) 
   348             && iStateMachine->PhoneStorage()->IsScreenLocked() )
   320             && iStateMachine->PhoneStorage()->IsScreenLocked() )
   349             {
   321             {
   350             EnableCallUIL();
   322             EnableCallUIL();
   351             }
   323             }
   352         
       
   353         // Reset blocked keys list
       
   354         iStateMachine->PhoneStorage()->ResetBlockedKeysList();
   324         iStateMachine->PhoneStorage()->ResetBlockedKeysList();
   355 
   325         SetTouchPaneButtons( EPhoneConferenceButtons );
   356         SetTouchPaneButtons( EPhoneConferenceButtons );    
       
   357         
       
   358         EndUiUpdate();
   326         EndUiUpdate();
   359          
   327         iStateMachine->ChangeState( EPhoneStateConference );
   360         // Go to conference state
       
   361         // CBA updates in above if-else conditions
       
   362         iStateMachine->ChangeState( EPhoneStateConference );                    
       
   363         }
   328         }
   364     else
   329     else
   365         {
   330         {
   366         // Idle message came for conference member
   331         // Idle message came for conference member
   367         CPhoneConference::HandleIdleL( aCallId );           
   332         CPhoneConference::HandleIdleL( aCallId ); 
   368         
   333         
   369         TPhoneCmdParamBoolean conferenceBubbleExists;
   334         TPhoneCmdParamBoolean conferenceBubbleExists;
   370         iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference,
   335         iViewCommandHandle->ExecuteCommandL( 
   371                                              &conferenceBubbleExists );                            
   336                 EPhoneViewGetIsConference,
   372                 
   337                 &conferenceBubbleExists );
   373         if( !conferenceBubbleExists.Boolean() )
   338         if( !conferenceBubbleExists.Boolean() )
   374             {
   339             {
   375             HandleConferenceIdleL();
   340             HandleConferenceIdleL();
   376             }     
   341             }
   377         }
   342         }
   378     }
   343     }
   379 
   344 
   380 // -----------------------------------------------------------
   345 // -----------------------------------------------------------
   381 // CPhoneConferenceAndWaiting::HandleConferenceIdleL
   346 // CPhoneConferenceAndWaiting::HandleConferenceIdleL
   382 // -----------------------------------------------------------
   347 // -----------------------------------------------------------
   383 //
   348 //
   384 void CPhoneConferenceAndWaiting::HandleConferenceIdleL()
   349 void CPhoneConferenceAndWaiting::HandleConferenceIdleL()
   385     {
   350     {
   386     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleConferenceIdleL()");
   351     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleConferenceIdleL()");
   387  
       
   388     BeginUiUpdateLC();
   352     BeginUiUpdateLC();
   389     
       
   390     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble );
   353     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble );
   391     
   354     
   392     TPhoneCmdParamInteger activeCallCount;
   355     TPhoneCmdParamInteger activeCallCount;
   393     iViewCommandHandle->ExecuteCommandL(
   356     iViewCommandHandle->ExecuteCommandL(
   394         EPhoneViewGetCountOfActiveCalls, &activeCallCount );
   357         EPhoneViewGetCountOfActiveCalls, &activeCallCount );
   395         
       
   396     switch( activeCallCount.Integer() )
   358     switch( activeCallCount.Integer() )
   397         {
   359         {
   398         case ENoActiveCalls:
   360         case ENoActiveCalls: // Go to incoming state
   399             // Go to incoming state
   361             {
   400             {
       
   401             // Display ringing bubble
       
   402             TPhoneCmdParamCallHeaderData callHeaderParam;
   362             TPhoneCmdParamCallHeaderData callHeaderParam;
   403             callHeaderParam.SetCallState( EPEStateRinging );
   363             callHeaderParam.SetCallState( EPEStateRinging );
   404             
   364             
   405             // Set Hold flag to view
   365             // Set Hold flag to view
   406             TPhoneCmdParamBoolean holdFlag;
   366             TPhoneCmdParamBoolean holdFlag;
   407             holdFlag.SetBoolean( EFalse );
   367             holdFlag.SetBoolean( EFalse );
   408             iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
   368             iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
   409               
   369               
   410             // Bring up callhandling view
       
   411             BringIncomingToForegroundL(); 
   370             BringIncomingToForegroundL(); 
   412            
       
   413             SetCallHeaderTextsForCallComingInL( iRingingCallId, EFalse, &callHeaderParam );
   371             SetCallHeaderTextsForCallComingInL( iRingingCallId, EFalse, &callHeaderParam );
   414           
       
   415             iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, 
   372             iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, 
   416                 iRingingCallId ,&callHeaderParam );
   373                 iRingingCallId ,&callHeaderParam );
   417             iCbaManager->UpdateIncomingCbaL( iRingingCallId );
   374             iCbaManager->UpdateIncomingCbaL( iRingingCallId );
   418             
   375             
   419             // Hide number entry if visible
       
   420             if ( IsNumberEntryVisibleL() )
   376             if ( IsNumberEntryVisibleL() )
   421                 {
   377                 {
   422                 SetNumberEntryVisibilityL(EFalse);   
   378                 SetNumberEntryVisibilityL(EFalse);   
   423                 }
   379                 }
   424             
       
   425             // Check if HW Keys or Call UI should be disabled
       
   426             CheckDisableHWKeysAndCallUIL();
   380             CheckDisableHWKeysAndCallUIL();
   427             
   381             
   428             SetTouchPaneButtons( EPhoneIncomingCallButtons );
   382             SetTouchPaneButtons( EPhoneIncomingCallButtons );
   429             SetRingingTonePlaybackL( iRingingCallId );          
   383             SetRingingTonePlaybackL( iRingingCallId );
   430             SetBackButtonActive(EFalse);
   384             SetBackButtonActive(EFalse);
   431             iStateMachine->ChangeState( EPhoneStateIncoming );
   385             iStateMachine->ChangeState( EPhoneStateIncoming );
   432             break;   
   386             }
   433             }   
   387             break;
   434             
   388             
   435         case EOneActiveCall:
   389         case EOneActiveCall:
   436             if ( IsNumberEntryUsedL() )
   390             if ( IsNumberEntryUsedL() )
   437                 {
   391                 {
   438                 // Show the number entry if it exists
       
   439                 SetNumberEntryVisibilityL(ETrue);
   392                 SetNumberEntryVisibilityL(ETrue);
   440                 }
   393                 }
   441             // Go to waiting in single state
       
   442             UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   394             UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   443             
       
   444             // Check if HW Keys or Call UI should be disabled
       
   445             CheckDisableHWKeysAndCallUIL();
   395             CheckDisableHWKeysAndCallUIL();
   446             
   396             SetTouchPaneButtons( EPhoneWaitingCallButtons );
   447             SetTouchPaneButtons( EPhoneWaitingCallButtons );             
       
   448             iStateMachine->ChangeState( EPhoneStateWaitingInSingle );
   397             iStateMachine->ChangeState( EPhoneStateWaitingInSingle );
   449             break;
   398             break;
   450             
   399             
   451         case ETwoActiveCalls:
   400         case ETwoActiveCalls:
   452             if ( IsNumberEntryUsedL() )
   401             if ( IsNumberEntryUsedL() )
   453                 {
   402                 {
   454                 // Show the number entry if it exists
       
   455                 SetNumberEntryVisibilityL(ETrue);
   403                 SetNumberEntryVisibilityL(ETrue);
   456                 }
   404                 }
   457             // Go to two singles and waiting state
       
   458             UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   405             UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   459             
       
   460             // Check if HW Keys or Call UI should be disabled
       
   461             CheckDisableHWKeysAndCallUIL();
   406             CheckDisableHWKeysAndCallUIL();
   462             
   407             SetTouchPaneButtons( EPhoneWaitingCallButtons );
   463             SetTouchPaneButtons( EPhoneWaitingCallButtons );               
       
   464 
       
   465             iStateMachine->ChangeState( EPhoneStateTwoSinglesAndWaiting );
   408             iStateMachine->ChangeState( EPhoneStateTwoSinglesAndWaiting );
   466             break; 
   409             break; 
       
   410             
   467         default:
   411         default:
   468           // Too many active calls to handle reliable state change now.
   412           // Too many active calls to handle reliable state change now.
   469           // Waiting for all conference member idles
   413           // Waiting for all conference member idles
   470           // This case may happen when 'End all calls' because conferenceIdle may 
   414           // This case may happen when 'End all calls' because conferenceIdle may 
   471           // come earlier than idle for conference member
   415           // come earlier than idle for conference member
   472            break;            
   416            break;
   473         }
   417         }
   474     EndUiUpdate();
   418     EndUiUpdate();
   475     }
   419     }
   476 
   420 
   477 // -----------------------------------------------------------
   421 // -----------------------------------------------------------
   490 //
   434 //
   491 void CPhoneConferenceAndWaiting::HandleDiallingL( TInt aCallId )
   435 void CPhoneConferenceAndWaiting::HandleDiallingL( TInt aCallId )
   492     {
   436     {
   493     __LOGMETHODSTARTEND( EPhoneUIStates, 
   437     __LOGMETHODSTARTEND( EPhoneUIStates, 
   494         "CPhoneConferenceAndWaiting::HandleDiallingL()");
   438         "CPhoneConferenceAndWaiting::HandleDiallingL()");
   495 
       
   496     BeginUiUpdateLC();
   439     BeginUiUpdateLC();
   497     // Hide number entry if it exists
   440     SetNumberEntryVisibilityL(EFalse);
   498     SetNumberEntryVisibilityL(EFalse);        
       
   499 
       
   500     // Display call setup 
       
   501     DisplayCallSetupL( aCallId );
   441     DisplayCallSetupL( aCallId );
   502 
   442     SetTouchPaneButtons( EPhoneCallSetupButtons );
   503     SetTouchPaneButtons( EPhoneCallSetupButtons ); 
       
   504 
       
   505     EndUiUpdate();
   443     EndUiUpdate();
   506     
       
   507     // Update conference and waiting and call setup softkeys
       
   508     UpdateCbaL( EPhoneCallHandlingCallSetupCBA );
   444     UpdateCbaL( EPhoneCallHandlingCallSetupCBA );
   509     
       
   510     // Go to conference and waiting and call setup state
       
   511     iStateMachine->ChangeState( EPhoneStateConferenceAndWaitingAndCallSetup );
   445     iStateMachine->ChangeState( EPhoneStateConferenceAndWaitingAndCallSetup );
   512     }
   446     }
   513 
   447 
   514 // -----------------------------------------------------------
   448 // -----------------------------------------------------------
   515 // CPhoneConferenceAndWaiting::HandleWentOneToOneL
   449 // CPhoneConferenceAndWaiting::HandleWentOneToOneL
   517 //
   451 //
   518 void CPhoneConferenceAndWaiting::HandleWentOneToOneL( TInt aCallId )
   452 void CPhoneConferenceAndWaiting::HandleWentOneToOneL( TInt aCallId )
   519     {
   453     {
   520     __LOGMETHODSTARTEND( EPhoneUIStates, 
   454     __LOGMETHODSTARTEND( EPhoneUIStates, 
   521         "CPhoneConferenceAndWaiting::HandleWentOneToOneL()");
   455         "CPhoneConferenceAndWaiting::HandleWentOneToOneL()");
   522 
       
   523     BeginUiUpdateLC();
   456     BeginUiUpdateLC();
   524     
       
   525     // Update conference bubble
       
   526     iViewCommandHandle->ExecuteCommandL(
   457     iViewCommandHandle->ExecuteCommandL(
   527         EPhoneViewPrivateFromConference, aCallId );
   458         EPhoneViewPrivateFromConference, aCallId );
   528     
   459     
   529     if ( iRingingCallId == KErrNotFound )
   460     if ( iRingingCallId == KErrNotFound )
   530         {
   461         {
   531         // Fetch ringing call's id from view
       
   532         TPhoneCmdParamCallStateData callStateData;
   462         TPhoneCmdParamCallStateData callStateData;
   533         callStateData.SetCallState( EPEStateRinging );
   463         callStateData.SetCallState( EPEStateRinging );
   534         iViewCommandHandle->HandleCommandL(
   464         iViewCommandHandle->HandleCommandL(
   535             EPhoneViewGetCallIdByState, &callStateData );
   465             EPhoneViewGetCallIdByState, &callStateData );
   536         iRingingCallId = callStateData.CallId();   
   466         iRingingCallId = callStateData.CallId();
   537         }
   467         }
   538         
   468         
   539     TPhoneCmdParamBoolean conferenceBubbleExists;
   469     TPhoneCmdParamBoolean conferenceBubbleExists;
   540     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, 
   470     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, 
   541         &conferenceBubbleExists );                            
   471         &conferenceBubbleExists );
   542     if( conferenceBubbleExists.Boolean() && 
   472     if( conferenceBubbleExists.Boolean() && 
   543         ( iRingingCallId != KErrNotFound ) )
   473         ( iRingingCallId != KErrNotFound ) )
   544         {
   474         {
   545         SetTouchPaneButtons( EPhoneWaitingCallButtons );
   475         SetTouchPaneButtons( EPhoneWaitingCallButtons );
   546         UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   476         UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   547         // Go to Conference And Single And Waiting state
       
   548         iStateMachine->ChangeState( EPhoneStateConferenceAndSingleAndWaiting );  
   477         iStateMachine->ChangeState( EPhoneStateConferenceAndSingleAndWaiting );  
   549         }
   478         }
   550 
       
   551     EndUiUpdate();
   479     EndUiUpdate();
   552     }
   480     }
   553 
   481 
   554 // -----------------------------------------------------------
   482 // -----------------------------------------------------------
   555 // CPhoneConferenceAndWaiting::HandleCommandL
   483 // CPhoneConferenceAndWaiting::HandleCommandL
   558 TBool CPhoneConferenceAndWaiting::HandleCommandL( TInt aCommand )
   486 TBool CPhoneConferenceAndWaiting::HandleCommandL( TInt aCommand )
   559     {
   487     {
   560     __LOGMETHODSTARTEND( EPhoneUIStates,
   488     __LOGMETHODSTARTEND( EPhoneUIStates,
   561         "CPhoneConferenceAndWaiting::HandleCommandL() ");
   489         "CPhoneConferenceAndWaiting::HandleCommandL() ");
   562     TBool commandStatus = ETrue;
   490     TBool commandStatus = ETrue;
   563 
       
   564     switch( aCommand )
   491     switch( aCommand )
   565         {
   492         {
   566         case EPhoneCmdUpdateUiControls:
   493         case EPhoneCmdUpdateUiControls:
   567             UpdateUiControlsL();
   494             UpdateUiControlsL();
   568             break;
   495             break;
   569 
   496 
   570         default:
   497         default:
   571             commandStatus = CPhoneConference::HandleCommandL( aCommand );
   498             commandStatus = CPhoneConference::HandleCommandL( aCommand );
   572             break;
   499             break;
   573         }
   500         }
   574 
       
   575     return commandStatus;
   501     return commandStatus;
   576     }
   502     }
   577 
   503 
   578 // -----------------------------------------------------------
   504 // -----------------------------------------------------------
   579 // CPhoneConferenceAndWaiting::UpdateUiControlsL
   505 // CPhoneConferenceAndWaiting::UpdateUiControlsL