74 EXPORT_C void CPhoneTwoSingles::ConstructL() |
74 EXPORT_C void CPhoneTwoSingles::ConstructL() |
75 { |
75 { |
76 CPhoneGsmInCall::ConstructL(); |
76 CPhoneGsmInCall::ConstructL(); |
77 |
77 |
78 // Re-enable global notes |
78 // Re-enable global notes |
79 TPhoneCmdParamBoolean globalNotifierParam; |
79 EnableGlobalNotifiersL(); |
80 globalNotifierParam.SetBoolean( EFalse ); |
|
81 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
|
82 &globalNotifierParam ); |
|
83 |
80 |
84 CPhonePubSubProxy::Instance()->ChangePropertyValue( |
81 CPhonePubSubProxy::Instance()->ChangePropertyValue( |
85 KPSUidScreenSaver, |
82 KPSUidScreenSaver, |
86 KScreenSaverAllowScreenSaver, |
83 KScreenSaverAllowScreenSaver, |
87 EPhoneScreensaverAllowed ); |
84 EPhoneScreensaverAllowed ); |
376 holdFlag.SetBoolean( EFalse ); |
373 holdFlag.SetBoolean( EFalse ); |
377 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
374 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
378 |
375 |
379 SetTouchPaneButtons( EPhoneConferenceButtons ); |
376 SetTouchPaneButtons( EPhoneConferenceButtons ); |
380 SetTouchPaneButtonEnabled( EPhoneInCallCmdPrivate ); |
377 SetTouchPaneButtonEnabled( EPhoneInCallCmdPrivate ); |
381 TransitionHandlerL().EndUiUpdate(); |
378 EndUiUpdate(); |
382 |
379 |
383 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
380 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
|
381 |
|
382 // Go to conference state |
384 // No need for CBA update |
383 // No need for CBA update |
385 iStateMachine->ChangeState( EPhoneStateConference ); |
384 iStateMachine->ChangeState( EPhoneStateConference ); |
386 } |
385 } |
387 |
386 |
388 // ----------------------------------------------------------- |
387 // ----------------------------------------------------------- |
390 // ----------------------------------------------------------- |
389 // ----------------------------------------------------------- |
391 // |
390 // |
392 void CPhoneTwoSingles::HandleIncomingL( TInt aCallId ) |
391 void CPhoneTwoSingles::HandleIncomingL( TInt aCallId ) |
393 { |
392 { |
394 __LOGMETHODSTARTEND( EPhoneUIStates, |
393 __LOGMETHODSTARTEND( EPhoneUIStates, |
395 "CPhoneTwoSingles::HandleIncomingL()"); |
394 "CPhoneTwoSingles::HandleIncomingL()"); |
|
395 |
396 CPhonePubSubProxy::Instance()->ChangePropertyValue( |
396 CPhonePubSubProxy::Instance()->ChangePropertyValue( |
397 KPSUidScreenSaver, |
397 KPSUidScreenSaver, |
398 KScreenSaverAllowScreenSaver, |
398 KScreenSaverAllowScreenSaver, |
399 EPhoneScreensaverNotAllowed ); |
399 EPhoneScreensaverNotAllowed ); |
400 TransitionHandlerL().IncomingCallUiUpdateLC(); |
400 |
|
401 IsNumberEntryUsedL() ? |
|
402 BeginTransEffectLC( ECallUiAppear ) : |
|
403 BeginTransEffectLC( ENumberEntryOpen ); |
|
404 BeginUiUpdateLC(); |
401 |
405 |
402 // Hide the number entry if it exists |
406 // Hide the number entry if it exists |
403 if ( IsNumberEntryUsedL() ) |
407 if ( IsNumberEntryUsedL() ) |
404 { |
408 { |
405 SetNumberEntryVisibilityL( EFalse ); |
409 SetNumberEntryVisibilityL( EFalse ); |
406 } |
410 } |
407 |
411 |
408 // Get allow waiting call header param value. |
|
409 TPhoneCmdParamBoolean dialerParam; |
412 TPhoneCmdParamBoolean dialerParam; |
410 dialerParam.SetBoolean( ETrue ); |
413 dialerParam.SetBoolean( ETrue ); |
|
414 |
|
415 // Get allow waiting call header param value. |
411 AllowShowingOfWaitingCallHeaderL( dialerParam ); |
416 AllowShowingOfWaitingCallHeaderL( dialerParam ); |
412 |
417 |
413 // Close fast swap window if it's displayed |
418 // Close fast swap window if it's displayed |
414 EikonEnv()->DismissTaskList(); |
419 CEikonEnv::Static()->DismissTaskList(); |
415 |
420 |
|
421 // Display incoming call |
416 DisplayIncomingCallL( aCallId, dialerParam ); |
422 DisplayIncomingCallL( aCallId, dialerParam ); |
417 |
423 |
418 // Set touch controls |
424 // Set touch controls |
419 SetTouchPaneButtonDisabled( EPhoneCallComingCmdAnswer ); |
425 SetTouchPaneButtonDisabled( EPhoneCallComingCmdAnswer ); |
|
426 |
420 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
427 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
421 |
428 |
422 TransitionHandlerL().EndUiUpdateAndEffect(); |
429 EndUiUpdate(); |
423 |
430 EndTransEffect(); |
|
431 |
|
432 // Go to incoming state |
424 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
433 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
425 iStateMachine->ChangeState( EPhoneStateTwoSinglesAndWaiting ); |
434 iStateMachine->ChangeState( EPhoneStateTwoSinglesAndWaiting ); |
426 } |
435 } |
427 |
436 |
428 // ----------------------------------------------------------- |
437 // ----------------------------------------------------------- |
429 // CPhoneTwoSingles::DisplayIncomingCallL |
438 // CPhoneTwoSingles::DisplayIncomingCallL |
430 // ----------------------------------------------------------- |
439 // ----------------------------------------------------------- |
431 // |
440 // |
432 void CPhoneTwoSingles::DisplayIncomingCallL( |
441 void CPhoneTwoSingles::DisplayIncomingCallL( |
433 TInt aCallId, |
442 TInt aCallId, |
434 const TPhoneCmdParamBoolean /*aCommandParam*/ ) |
443 const TPhoneCmdParamBoolean aCommandParam ) |
435 { |
444 { |
436 __LOGMETHODSTARTEND( EPhoneUIStates, |
445 __LOGMETHODSTARTEND( EPhoneUIStates, |
437 "CPhoneTwoSingles::DisplayIncomingCallL()"); |
446 "CPhoneTwoSingles::DisplayIncomingCallL()"); |
438 // Close menu bar, if it is displayed |
447 // Close menu bar, if it is displayed |
439 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
448 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
441 // Remove any phone dialogs if they are displayed |
450 // Remove any phone dialogs if they are displayed |
442 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
451 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
443 |
452 |
444 // Indicate that the Phone needs to be sent to the background if |
453 // Indicate that the Phone needs to be sent to the background if |
445 // an application other than the top application is in the foreground |
454 // an application other than the top application is in the foreground |
446 SetNeedToReturnToForegroundAppStatusL( !TopAppIsDisplayedL() ); |
455 TPhoneCmdParamBoolean booleanParam; |
|
456 booleanParam.SetBoolean( !TopAppIsDisplayedL() ); |
|
457 iViewCommandHandle->ExecuteCommandL( |
|
458 EPhoneViewSetNeedToReturnToForegroundAppStatus, |
|
459 &booleanParam ); |
447 |
460 |
448 // Bring Phone app in the foreground |
461 // Bring Phone app in the foreground |
449 TPhoneCmdParamInteger uidParam; |
462 TPhoneCmdParamInteger uidParam; |
450 uidParam.SetInteger( KUidPhoneApplication.iUid ); |
463 uidParam.SetInteger( KUidPhoneApplication.iUid ); |
451 iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |
464 iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |