196 // |
196 // |
197 void CPhoneConferenceAndSingleAndWaiting::HandleIdleL( TInt aCallId ) |
197 void CPhoneConferenceAndSingleAndWaiting::HandleIdleL( TInt aCallId ) |
198 { |
198 { |
199 __LOGMETHODSTARTEND( EPhoneUIStates, |
199 __LOGMETHODSTARTEND( EPhoneUIStates, |
200 "CPhoneConferenceAndSingleAndWaiting::HandleIdleL()"); |
200 "CPhoneConferenceAndSingleAndWaiting::HandleIdleL()"); |
201 |
201 BeginUiUpdateLC(); |
202 BeginUiUpdateLC(); |
|
203 // Set touch controls |
|
204 SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer ); |
202 SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer ); |
205 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
203 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
206 |
|
207 |
204 |
208 TPhoneCmdParamBoolean conferenceExistsForCallId; |
205 TPhoneCmdParamBoolean conferenceExistsForCallId; |
209 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCallExistsInConference, |
206 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCallExistsInConference, |
210 aCallId, &conferenceExistsForCallId ); |
207 aCallId, &conferenceExistsForCallId ); |
211 |
|
212 if( conferenceExistsForCallId.Boolean() ) |
208 if( conferenceExistsForCallId.Boolean() ) |
213 { |
209 { |
214 // Remove conference member from conference bubble |
210 // Remove conference member from conference bubble |
215 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveFromConference, |
211 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveFromConference, |
216 aCallId ); |
212 aCallId ); |
217 } |
213 } |
218 else |
214 else |
219 { |
215 { |
220 // Remove call |
|
221 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
216 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
222 |
|
223 TPhoneCmdParamBoolean conferenceBubbleExists; |
217 TPhoneCmdParamBoolean conferenceBubbleExists; |
224 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, |
218 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, |
225 &conferenceBubbleExists ); |
219 &conferenceBubbleExists ); |
226 if( !conferenceBubbleExists.Boolean() ) |
220 if( !conferenceBubbleExists.Boolean() ) |
227 { |
221 { |
228 // Idle message came for conference member. |
222 // Idle message came for conference member. |
229 MakeTransitionAccordingToActiveCallsL(); |
223 MakeTransitionAccordingToActiveCallsL(); |
230 } |
224 } |
235 iViewCommandHandle->HandleCommandL( EPhoneViewGetCallIdByState, |
229 iViewCommandHandle->HandleCommandL( EPhoneViewGetCallIdByState, |
236 &callStateData ); |
230 &callStateData ); |
237 if( callStateData.CallId() >= 0 ) |
231 if( callStateData.CallId() >= 0 ) |
238 { |
232 { |
239 // We have Conference and Waiting calls left |
233 // We have Conference and Waiting calls left |
240 MakeStateTransitionToConferenceAndWaitingL( aCallId ); |
234 MakeStateTransitionToConferenceAndWaitingL( aCallId ); |
241 } |
235 } |
242 else |
236 else |
243 { |
237 { |
244 // We have Conference and Single calls left |
238 // We have Conference and Single calls left |
245 MakeStateTransitionToConferenceAndSingleL( aCallId ); |
239 MakeStateTransitionToConferenceAndSingleL( aCallId ); |
246 } |
240 } |
247 } |
241 } |
248 } |
242 } |
249 EndUiUpdate(); |
243 EndUiUpdate(); |
250 } |
244 } |
251 |
245 |
463 // Capture keys when there is an incoming call |
457 // Capture keys when there is an incoming call |
464 CaptureKeysDuringCallNotificationL( ETrue ); |
458 CaptureKeysDuringCallNotificationL( ETrue ); |
465 |
459 |
466 // Go to Incoming state |
460 // Go to Incoming state |
467 iCbaManager->UpdateIncomingCbaL( callStateData.CallId() ); |
461 iCbaManager->UpdateIncomingCbaL( callStateData.CallId() ); |
468 |
|
469 SetTouchPaneButtons( EPhoneIncomingCallButtons ); |
462 SetTouchPaneButtons( EPhoneIncomingCallButtons ); |
470 UpdateSilenceButtonDimming(); |
463 UpdateSilenceButtonDimming(); |
471 SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer ); |
464 SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer ); |
472 SetRingingTonePlaybackL( callStateData.CallId() ); |
465 SetRingingTonePlaybackL( callStateData.CallId() ); |
473 SetToolbarDimming( ETrue ); |
466 SetToolbarDimming( ETrue ); |
485 { |
478 { |
486 // Go to Single And Waiting state |
479 // Go to Single And Waiting state |
487 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
480 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
488 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
481 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
489 SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer ); |
482 SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer ); |
490 |
|
491 iStateMachine->ChangeState( EPhoneStateWaitingInSingle ); |
483 iStateMachine->ChangeState( EPhoneStateWaitingInSingle ); |
492 } |
484 } |
493 break; |
485 break; |
494 case ETwoActiveCalls: |
486 case ETwoActiveCalls: |
495 { |
487 { |
496 // Go to Two Singles And Waiting state |
488 // Go to Two Singles And Waiting state |
497 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
489 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
498 |
|
499 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
490 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
500 iStateMachine->ChangeState( EPhoneStateTwoSinglesAndWaiting ); |
491 iStateMachine->ChangeState( EPhoneStateTwoSinglesAndWaiting ); |
501 } |
492 } |
502 break; |
493 break; |
503 default: |
494 default: |