202 HandleHoldSwitchL(); |
202 HandleHoldSwitchL(); |
203 } |
203 } |
204 } |
204 } |
205 |
205 |
206 // ----------------------------------------------------------- |
206 // ----------------------------------------------------------- |
207 // CPhoneConferenceAndWaiting::OpenMenuBarL |
|
208 // ----------------------------------------------------------- |
|
209 // |
|
210 void CPhoneConferenceAndWaiting::OpenMenuBarL() |
|
211 { |
|
212 __LOGMETHODSTARTEND(EPhoneUIStates, |
|
213 "CPhoneConferenceAndWaiting::OpenMenuBarL()"); |
|
214 |
|
215 TInt resourceId( EPhoneConfAndCallWaitingMenubar ); |
|
216 |
|
217 if( IsNumberEntryVisibleL() ) |
|
218 { |
|
219 resourceId = EPhoneConfAndCallWaitingMenubarWithNumberEntry; |
|
220 } |
|
221 else if ( IsConferenceBubbleInSelectionMode() ) |
|
222 { |
|
223 resourceId = EPhoneConfCallParticipantsMenubar; |
|
224 } |
|
225 |
|
226 TPhoneCmdParamInteger integerParam; |
|
227 integerParam.SetInteger( |
|
228 CPhoneMainResourceResolver::Instance()-> |
|
229 ResolveResourceID( resourceId ) ); |
|
230 |
|
231 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarOpen, |
|
232 &integerParam ); |
|
233 } |
|
234 |
|
235 // ----------------------------------------------------------- |
|
236 // CPhoneConferenceAndWaiting::HandleConnectedL |
207 // CPhoneConferenceAndWaiting::HandleConnectedL |
237 // ----------------------------------------------------------- |
208 // ----------------------------------------------------------- |
238 // |
209 // |
239 void CPhoneConferenceAndWaiting::HandleConnectedL( TInt aCallId ) |
210 void CPhoneConferenceAndWaiting::HandleConnectedL( TInt aCallId ) |
240 { |
211 { |
280 EnableCallUIL(); |
251 EnableCallUIL(); |
281 } |
252 } |
282 |
253 |
283 // Reset blocked keys list |
254 // Reset blocked keys list |
284 iStateMachine->PhoneStorage()->ResetBlockedKeysList(); |
255 iStateMachine->PhoneStorage()->ResetBlockedKeysList(); |
285 |
|
286 // Effect is shown when dialer exist. |
|
287 TBool effectStarted ( EFalse ); |
|
288 if ( !NeedToSendToBackgroundL() ) |
|
289 { |
|
290 BeginTransEffectLC( ENumberEntryOpen ); |
|
291 effectStarted = ETrue; |
|
292 } |
|
293 |
256 |
294 BeginUiUpdateLC(); |
257 BeginUiUpdateLC(); |
295 |
258 |
296 UpdateRemoteInfoDataL ( aCallId ); |
259 UpdateRemoteInfoDataL ( aCallId ); |
297 |
|
298 if ( IsConferenceBubbleInSelectionMode() ) |
|
299 { |
|
300 CloseSelectionListL(); |
|
301 } |
|
302 |
260 |
303 // Show bubble |
261 // Show bubble |
304 TPhoneCmdParamCallHeaderData callHeaderParam; |
262 TPhoneCmdParamCallHeaderData callHeaderParam; |
305 callHeaderParam.SetCallState( EPEStateConnected ); |
263 callHeaderParam.SetCallState( EPEStateConnected ); |
306 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
264 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
308 |
266 |
309 |
267 |
310 if ( IsNumberEntryUsedL() ) |
268 if ( IsNumberEntryUsedL() ) |
311 { |
269 { |
312 if ( NeedToSendToBackgroundL() ) |
270 if ( NeedToSendToBackgroundL() ) |
313 { |
271 { |
314 // Return phone to the background if send to background is needed. |
|
315 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility ); |
|
316 |
|
317 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
272 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
318 } |
273 } |
319 else |
274 else |
320 { |
275 { |
321 // Show the number entry if it exists. |
276 // Show the number entry if it exists. |
327 UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA ); |
282 UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA ); |
328 // If numberentry is not open just check NeedToSendToBackgroundL and |
283 // If numberentry is not open just check NeedToSendToBackgroundL and |
329 // sendbackround if needed. |
284 // sendbackround if needed. |
330 } |
285 } |
331 SetTouchPaneButtons( EPhoneConferenceAndSingleButtons ); |
286 SetTouchPaneButtons( EPhoneConferenceAndSingleButtons ); |
332 SetTouchPaneButtonDisabled( EPhoneInCallCmdPrivate ); |
|
333 |
287 |
334 EndUiUpdate(); |
288 EndUiUpdate(); |
335 if( effectStarted ) |
289 |
336 { |
|
337 EndTransEffect(); |
|
338 } |
|
339 // CBA updates in above if-else conditions |
290 // CBA updates in above if-else conditions |
340 iStateMachine->ChangeState( EPhoneStateConferenceAndSingle ); |
291 iStateMachine->ChangeState( EPhoneStateConferenceAndSingle ); |
341 } |
292 } |
342 |
293 |
343 // ----------------------------------------------------------- |
294 // ----------------------------------------------------------- |
358 iRingingCallId = callStateData.CallId(); |
309 iRingingCallId = callStateData.CallId(); |
359 } |
310 } |
360 |
311 |
361 if( iRingingCallId == aCallId ) |
312 if( iRingingCallId == aCallId ) |
362 { |
313 { |
363 // Effect is shown when dialer exist. |
|
364 TBool effectStarted ( EFalse ); |
|
365 if ( !NeedToSendToBackgroundL() ) |
|
366 { |
|
367 BeginTransEffectLC( ENumberEntryOpen ); |
|
368 effectStarted = ETrue; |
|
369 } |
|
370 |
314 |
371 BeginUiUpdateLC(); |
315 BeginUiUpdateLC(); |
372 |
|
373 // Idle message came for waiting call |
|
374 // Close menu bar, if it is displayed |
|
375 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
376 |
316 |
377 // Remove call |
317 // Remove call |
378 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
318 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
379 |
319 |
380 if ( IsNumberEntryUsedL() ) |
320 if ( IsNumberEntryUsedL() ) |
381 { |
321 { |
382 if ( NeedToSendToBackgroundL() ) |
322 if ( NeedToSendToBackgroundL() ) |
383 { |
323 { |
384 // Return phone to the background if send to background is needed. |
324 // Return phone to the background if send to background is needed. |
385 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground ); |
325 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground ); |
386 |
326 |
387 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility ); |
|
388 |
|
389 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
327 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
390 } |
328 } |
391 else |
329 else |
392 { |
330 { |
393 // Show the number entry if it exists. |
331 // Show the number entry if it exists. |
413 } |
351 } |
414 |
352 |
415 // Reset blocked keys list |
353 // Reset blocked keys list |
416 iStateMachine->PhoneStorage()->ResetBlockedKeysList(); |
354 iStateMachine->PhoneStorage()->ResetBlockedKeysList(); |
417 |
355 |
418 if ( iViewCommandHandle->HandleCommandL( EPhoneViewIsConferenceInExpandedMode ) |
356 SetTouchPaneButtons( EPhoneConferenceButtons ); |
419 == EPhoneViewResponseSuccess ) |
357 |
420 { |
|
421 SetTouchPaneButtons( EPhoneParticipantListButtons ); |
|
422 } |
|
423 else |
|
424 { |
|
425 SetTouchPaneButtons( EPhoneConferenceButtons ); |
|
426 } |
|
427 EndUiUpdate(); |
358 EndUiUpdate(); |
428 if ( effectStarted ) |
|
429 { |
|
430 EndTransEffect(); |
|
431 } |
|
432 |
359 |
433 // Go to conference state |
360 // Go to conference state |
434 // CBA updates in above if-else conditions |
361 // CBA updates in above if-else conditions |
435 iStateMachine->ChangeState( EPhoneStateConference ); |
362 iStateMachine->ChangeState( EPhoneStateConference ); |
436 } |
363 } |
456 // |
383 // |
457 void CPhoneConferenceAndWaiting::HandleConferenceIdleL() |
384 void CPhoneConferenceAndWaiting::HandleConferenceIdleL() |
458 { |
385 { |
459 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleConferenceIdleL()"); |
386 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleConferenceIdleL()"); |
460 |
387 |
461 BeginTransEffectLC( ENumberEntryOpen ); |
|
462 BeginUiUpdateLC(); |
388 BeginUiUpdateLC(); |
463 |
389 |
464 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble ); |
390 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble ); |
465 |
391 |
466 TPhoneCmdParamInteger activeCallCount; |
392 TPhoneCmdParamInteger activeCallCount; |
467 iViewCommandHandle->ExecuteCommandL( |
393 iViewCommandHandle->ExecuteCommandL( |
468 EPhoneViewGetCountOfActiveCalls, &activeCallCount ); |
394 EPhoneViewGetCountOfActiveCalls, &activeCallCount ); |
469 |
|
470 // Close menu bar, if it is displayed |
|
471 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
472 |
395 |
473 switch( activeCallCount.Integer() ) |
396 switch( activeCallCount.Integer() ) |
474 { |
397 { |
475 case ENoActiveCalls: |
398 case ENoActiveCalls: |
476 // Go to incoming state |
399 // Go to incoming state |
490 SetCallHeaderTextsForCallComingInL( iRingingCallId, EFalse, &callHeaderParam ); |
413 SetCallHeaderTextsForCallComingInL( iRingingCallId, EFalse, &callHeaderParam ); |
491 |
414 |
492 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, |
415 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, |
493 iRingingCallId ,&callHeaderParam ); |
416 iRingingCallId ,&callHeaderParam ); |
494 iCbaManager->UpdateIncomingCbaL( iRingingCallId ); |
417 iCbaManager->UpdateIncomingCbaL( iRingingCallId ); |
495 UpdateSilenceButtonDimming(); |
|
496 |
418 |
497 // Hide number entry if visible |
419 // Hide number entry if visible |
498 if ( IsNumberEntryVisibleL() ) |
420 if ( IsNumberEntryVisibleL() ) |
499 { |
421 { |
500 SetNumberEntryVisibilityL(EFalse); |
422 SetNumberEntryVisibilityL(EFalse); |
502 |
424 |
503 // Check if HW Keys or Call UI should be disabled |
425 // Check if HW Keys or Call UI should be disabled |
504 CheckDisableHWKeysAndCallUIL(); |
426 CheckDisableHWKeysAndCallUIL(); |
505 |
427 |
506 SetTouchPaneButtons( EPhoneIncomingCallButtons ); |
428 SetTouchPaneButtons( EPhoneIncomingCallButtons ); |
507 SetTouchPaneButtonEnabled( EPhoneCallComingCmdSilent ); |
|
508 SetRingingTonePlaybackL( iRingingCallId ); |
429 SetRingingTonePlaybackL( iRingingCallId ); |
509 SetToolbarDimming( ETrue ); |
|
510 SetBackButtonActive(EFalse); |
430 SetBackButtonActive(EFalse); |
511 iStateMachine->ChangeState( EPhoneStateIncoming ); |
431 iStateMachine->ChangeState( EPhoneStateIncoming ); |
512 break; |
432 break; |
513 } |
433 } |
514 |
434 |
550 // This case may happen when 'End all calls' because conferenceIdle may |
470 // This case may happen when 'End all calls' because conferenceIdle may |
551 // come earlier than idle for conference member |
471 // come earlier than idle for conference member |
552 break; |
472 break; |
553 } |
473 } |
554 EndUiUpdate(); |
474 EndUiUpdate(); |
555 EndTransEffect(); |
|
556 } |
475 } |
557 |
476 |
558 // ----------------------------------------------------------- |
477 // ----------------------------------------------------------- |
559 // CPhoneConferenceAndWaiting::UpdateInCallCbaL |
478 // CPhoneConferenceAndWaiting::UpdateInCallCbaL |
560 // ----------------------------------------------------------- |
479 // ----------------------------------------------------------- |
571 // |
490 // |
572 void CPhoneConferenceAndWaiting::HandleDiallingL( TInt aCallId ) |
491 void CPhoneConferenceAndWaiting::HandleDiallingL( TInt aCallId ) |
573 { |
492 { |
574 __LOGMETHODSTARTEND( EPhoneUIStates, |
493 __LOGMETHODSTARTEND( EPhoneUIStates, |
575 "CPhoneConferenceAndWaiting::HandleDiallingL()"); |
494 "CPhoneConferenceAndWaiting::HandleDiallingL()"); |
576 |
495 |
577 BeginTransEffectLC( ENumberEntryClose ); |
|
578 BeginUiUpdateLC(); |
496 BeginUiUpdateLC(); |
579 // Hide number entry if it exists |
497 // Hide number entry if it exists |
580 SetNumberEntryVisibilityL(EFalse); |
498 SetNumberEntryVisibilityL(EFalse); |
581 |
499 |
582 // Display call setup |
500 // Display call setup |
583 DisplayCallSetupL( aCallId ); |
501 DisplayCallSetupL( aCallId ); |
584 |
502 |
585 SetTouchPaneButtons( EPhoneCallSetupButtons ); |
503 SetTouchPaneButtons( EPhoneCallSetupButtons ); |
586 |
504 |
587 EndUiUpdate(); |
505 EndUiUpdate(); |
588 EndTransEffect(); |
|
589 |
506 |
590 // Update conference and waiting and call setup softkeys |
507 // Update conference and waiting and call setup softkeys |
591 UpdateCbaL( EPhoneCallHandlingCallSetupCBA ); |
508 UpdateCbaL( EPhoneCallHandlingCallSetupCBA ); |
592 |
509 |
593 // Go to conference and waiting and call setup state |
510 // Go to conference and waiting and call setup state |
623 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, |
540 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, |
624 &conferenceBubbleExists ); |
541 &conferenceBubbleExists ); |
625 if( conferenceBubbleExists.Boolean() && |
542 if( conferenceBubbleExists.Boolean() && |
626 ( iRingingCallId != KErrNotFound ) ) |
543 ( iRingingCallId != KErrNotFound ) ) |
627 { |
544 { |
628 // Set touch controls |
|
629 SetTouchPaneButtonDisabled( EPhoneCallComingCmdAnswer ); |
|
630 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
545 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
631 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
546 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
632 // Go to Conference And Single And Waiting state |
547 // Go to Conference And Single And Waiting state |
633 iStateMachine->ChangeState( EPhoneStateConferenceAndSingleAndWaiting ); |
548 iStateMachine->ChangeState( EPhoneStateConferenceAndSingleAndWaiting ); |
634 } |
549 } |