221 case MEngineMonitor::EPEMessageIncoming: |
226 case MEngineMonitor::EPEMessageIncoming: |
222 HandleIncomingL( aCallId ); |
227 HandleIncomingL( aCallId ); |
223 break; |
228 break; |
224 |
229 |
225 case MEngineMonitor::EPEMessageDialing: |
230 case MEngineMonitor::EPEMessageDialing: |
226 HandleDiallingL( aCallId ); |
231 HandleDialingL( aCallId ); |
227 break; |
232 break; |
228 |
233 |
229 /* Flow through */ |
234 /* Flow through */ |
230 case MEngineMonitor::EPEMessageRemoteTerminated: |
235 case MEngineMonitor::EPEMessageRemoteTerminated: |
231 case MEngineMonitor::EPEMessageDisconnecting: |
236 case MEngineMonitor::EPEMessageDisconnecting: |
232 iViewCommandHandle->ExecuteCommandL( EPhoneViewHideNaviPaneAudioVolume ); |
237 iViewCommandHandle->ExecuteCommandL( EPhoneViewHideNaviPaneAudioVolume ); |
233 CPhoneGsmInCall::HandlePhoneEngineMessageL( aMessage, aCallId ); |
238 CPhoneGsmInCall::HandlePhoneEngineMessageL( aMessage, aCallId ); |
234 break; |
239 break; |
235 |
240 |
236 case MEngineMonitor::EPEMessageInValidEmergencyNumber: |
241 case MEngineMonitor::EPEMessageInValidEmergencyNumber: |
237 SendGlobalErrorNoteL( EPhoneNoteTextNotAllowed, ETrue ); |
242 SendGlobalErrorNoteL( EPhoneNoteTextNotAllowed ); |
238 break; |
243 break; |
239 |
244 |
240 case MEngineMonitor::EPEMessageValidEmergencyNumber: |
245 case MEngineMonitor::EPEMessageValidEmergencyNumber: |
241 DialVoiceCallL(); |
246 DialVoiceCallL(); |
242 break; |
247 break; |
286 break; |
293 break; |
287 |
294 |
288 /* Flow through */ |
295 /* Flow through */ |
289 case EPhoneCmdNoSwitchToVideo: |
296 case EPhoneCmdNoSwitchToVideo: |
290 case EPhoneCmdNoSwitchToVoice: |
297 case EPhoneCmdNoSwitchToVoice: |
|
298 // Sets touch buttons to correct status if 'No' command has occured. |
|
299 iViewCommandHandle->ExecuteCommand( EPhoneResetTouchButtons ); |
291 break; |
300 break; |
292 |
301 |
293 case EPhoneCmdYesSwitchToVoice: |
302 case EPhoneCmdYesSwitchToVoice: |
294 // Set current call id |
303 // Set current call id |
295 iStateMachine->SetCallId( iCallId ); |
304 iStateMachine->SetCallId( iCallId ); |
296 if( IsVideoCall( iCallId ) ) |
305 if( IsVideoCall( iCallId ) ) |
297 { |
306 { |
298 // Video call can be released only after we get response to VT Shutdown Command |
307 // Video call can be released only after we get response to VT Shutdown Command |
299 CPhoneMediatorFactory::Instance()->Sender()->IssueCommand( KMediatorVideoTelephonyDomain, |
308 CPhoneMediatorFactory::Instance()->Sender()->IssueCommand( KMediatorVideoTelephonyDomain, |
300 KCatPhoneToVideotelCommands, |
309 KCatPhoneToVideotelCommands, |
301 EVtCmdReleaseDataport, |
310 EVtCmdReleaseDataport, |
302 TVersion( KPhoneToVideotelCmdVersionMajor, |
311 TVersion( KPhoneToVideotelCmdVersionMajor, |
303 KPhoneToVideotelCmdVersionMinor, |
312 KPhoneToVideotelCmdVersionMinor, |
304 KPhoneToVideotelCmdVersionBuild ), |
313 KPhoneToVideotelCmdVersionBuild ), |
305 KNullDesC8, |
314 KNullDesC8, |
306 CPhoneSwitchToVideoOrVoiceCommand::NewL( *iStateMachine ) ); |
315 CPhoneSwitchToVideoOrVoiceCommand::NewL( *iStateMachine ) ); |
307 } |
316 } |
308 else |
317 else |
309 { |
318 { |
310 iStateMachine->SendPhoneEngineMessage( |
319 iStateMachine->SendPhoneEngineMessage( |
311 CPEPhoneModelIF::EPEMessageSwitchToVideoOrVoice ); |
320 CPEPhoneModelIF::EPEMessageSwitchToVideoOrVoice ); |
312 } |
321 } |
313 break; |
322 break; |
314 |
323 |
315 case EPhoneVideoSharing: |
324 case EPhoneVideoSharing: |
316 case EPhoneVideoSharingOpt2: |
325 case EPhoneVideoSharingOpt2: |
317 case EPhoneVideoSharingOpt3: |
326 case EPhoneVideoSharingOpt3: |
345 // ----------------------------------------------------------- |
372 // ----------------------------------------------------------- |
346 // |
373 // |
347 void CPhoneSingleCall::OpenVideoCallMenuBarL() |
374 void CPhoneSingleCall::OpenVideoCallMenuBarL() |
348 { |
375 { |
349 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleCall::OpenVideoCallMenuBarL()"); |
376 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleCall::OpenVideoCallMenuBarL()"); |
350 |
377 if( FeatureManager::FeatureSupported( KFeatureIdCsVideoTelephony ) ) |
|
378 { |
|
379 TInt resourceId; |
|
380 |
|
381 if ( IsNumberEntryUsedL() ) |
|
382 { |
|
383 resourceId = EPhoneVideoCallMenubarWithNumberEntry; |
|
384 } |
|
385 else |
|
386 { |
|
387 resourceId = EPhoneVideoCallMenubar; |
|
388 } |
|
389 |
|
390 TPhoneCmdParamInteger integerParam; |
|
391 integerParam.SetInteger( |
|
392 CPhoneMainResourceResolver::Instance()-> |
|
393 ResolveResourceID( resourceId ) ); |
|
394 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarOpen, |
|
395 &integerParam ); |
|
396 } |
351 } |
397 } |
352 |
398 |
353 // ----------------------------------------------------------- |
399 // ----------------------------------------------------------- |
354 // CPhoneSingleCall::HandleHeldL |
400 // CPhoneSingleCall::HandleHeldL |
355 // ----------------------------------------------------------- |
401 // ----------------------------------------------------------- |
419 HandleHoldNoteL( aCallId , EFalse ); |
464 HandleHoldNoteL( aCallId , EFalse ); |
420 } |
465 } |
421 } |
466 } |
422 |
467 |
423 UpdateInCallCbaL(); |
468 UpdateInCallCbaL(); |
424 SetTouchPaneButtons( EPhoneIncallButtons ); |
|
425 } |
469 } |
426 |
470 |
427 // ----------------------------------------------------------- |
471 // ----------------------------------------------------------- |
428 // CPhoneSingleCall::ToggleHold |
472 // CPhoneSingleCall::ToggleHold |
429 // ----------------------------------------------------------- |
473 // ----------------------------------------------------------- |
430 // |
474 // |
431 void CPhoneSingleCall::ToggleHoldL() |
475 void CPhoneSingleCall::ToggleHoldL() |
432 { |
476 { |
433 __LOGMETHODSTARTEND( EPhoneUIStates, |
477 __LOGMETHODSTARTEND( EPhoneUIStates, |
434 "CPhoneSingleCall::ToggleHoldL()"); |
478 "CPhoneSingleCall::ToggleHoldL()"); |
435 |
479 TPhoneCmdParamBoolean hold; |
436 TPECallControlCaps callControlCaps = |
480 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetHoldFlag, &hold ); |
437 iStateMachine->PhoneEngineInfo()->CallControlCaps( iCallId ); |
481 |
438 |
482 if( hold.Boolean() ) |
439 if ( callControlCaps & MCCECallObserver::ECCECapsHold ) |
483 { |
440 { |
484 SetCallResumeL(); |
441 iStateMachine->SetCallId( iCallId ); |
|
442 iStateMachine->SendPhoneEngineMessage( |
|
443 CPEPhoneModelIF::EPEMessageHold ); |
|
444 } |
|
445 else if ( callControlCaps & MCCECallObserver::ECCECapsResume ) |
|
446 { |
|
447 iStateMachine->SetCallId( iCallId ); |
|
448 iStateMachine->SendPhoneEngineMessage( |
|
449 CPEPhoneModelIF::EPEMessageResume ); |
|
450 } |
485 } |
451 else |
486 else |
452 { |
487 { |
453 SendGlobalInfoNoteL( EPhoneNoteTextNotAllowed, ETrue ); |
488 SetCallHoldL(); |
454 } |
489 } |
455 } |
490 } |
456 |
491 |
457 // ----------------------------------------------------------- |
492 // ----------------------------------------------------------- |
458 // CPhoneSingleCall::HandleIncomingL |
493 // CPhoneSingleCall::HandleIncomingL |
461 void CPhoneSingleCall::HandleIncomingL( TInt aCallId ) |
496 void CPhoneSingleCall::HandleIncomingL( TInt aCallId ) |
462 { |
497 { |
463 __LOGMETHODSTARTEND( EPhoneUIStates, |
498 __LOGMETHODSTARTEND( EPhoneUIStates, |
464 "CPhoneSingleCall::HandleIncomingL()"); |
499 "CPhoneSingleCall::HandleIncomingL()"); |
465 |
500 |
|
501 CPhonePubSubProxy::Instance()->ChangePropertyValue( |
|
502 KPSUidScreenSaver, |
|
503 KScreenSaverAllowScreenSaver, |
|
504 EPhoneScreensaverNotAllowed ); |
|
505 IsNumberEntryUsedL() ? |
|
506 BeginTransEffectLC( ECallUiAppear ) : |
|
507 BeginTransEffectLC( ENumberEntryOpen ); |
466 BeginUiUpdateLC(); |
508 BeginUiUpdateLC(); |
|
509 |
|
510 // Hide the number entry if it exists |
|
511 if ( IsNumberEntryUsedL() ) |
|
512 { |
|
513 SetNumberEntryVisibilityL( EFalse ); |
|
514 } |
467 |
515 |
468 TPhoneCmdParamBoolean dialerParam; |
516 TPhoneCmdParamBoolean dialerParam; |
469 dialerParam.SetBoolean( ETrue ); |
517 dialerParam.SetBoolean( ETrue ); |
470 |
518 |
471 // Get allow waiting call header param value. |
519 // Get allow waiting call header param value. |
472 AllowShowingOfWaitingCallHeaderL( dialerParam ); |
520 AllowShowingOfWaitingCallHeaderL( dialerParam ); |
473 |
521 |
|
522 // Close fast swap window if it's displayed |
|
523 EikonEnv()->DismissTaskList(); |
|
524 |
|
525 // Show incoming call buttons |
|
526 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
|
527 |
474 // Display incoming call |
528 // Display incoming call |
475 DisplayIncomingCallL( aCallId, dialerParam ); |
529 DisplayIncomingCallL( aCallId, dialerParam ); |
476 |
530 |
477 // Show incoming call buttons |
|
478 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
|
479 |
|
480 if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke ) |
|
481 && !CPhoneCenRepProxy::Instance()-> |
|
482 IsTelephonyFeatureSupported( KTelephonyLVFlagAllowUnlockOnIncoming ) |
|
483 && ( IsKeyLockOn() || IsAutoLockOn() ) ) |
|
484 { |
|
485 DisableCallUIL(); |
|
486 } |
|
487 else |
|
488 { |
|
489 // if keys have been locked, disable keylock without information note |
|
490 if ( IsKeyLockOn() ) |
|
491 { |
|
492 iViewCommandHandle->ExecuteCommandL( EPhoneViewDisableKeyLockWithoutNote ); |
|
493 } |
|
494 } |
|
495 |
|
496 if( CPhoneCenRepProxy::Instance()-> |
|
497 IsTelephonyFeatureSupported( KTelephonyLVFlagDisableCallControlHardKeysWhileLocked ) |
|
498 && ( IsKeyLockOn() || IsAutoLockOn() ) ) |
|
499 { |
|
500 DisableHWKeysL(); |
|
501 } |
|
502 |
|
503 EndUiUpdate(); |
531 EndUiUpdate(); |
504 |
532 EndTransEffect(); |
505 // This query is required to dismiss |
533 // This query is required to dismiss |
506 // Operation cannot be completed in waiting and single state |
534 // Operation cannot be completed in waiting and single state |
507 if ( iSwitchToVideoQuery ) |
535 if ( iSwitchToVideoQuery ) |
508 { |
536 { |
509 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveQuery ); |
537 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveQuery ); |
510 } |
538 } |
511 |
|
512 // Go to incoming state |
|
513 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
539 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
514 iStateMachine->ChangeState( EPhoneStateWaitingInSingle ); |
540 iStateMachine->ChangeState( EPhoneStateWaitingInSingle ); |
515 } |
541 } |
516 |
542 |
517 // ----------------------------------------------------------- |
543 // ----------------------------------------------------------- |
518 // CPhoneSingleCall::DisplayIncomingCallL |
544 // CPhoneSingleCall::DisplayIncomingCallL |
519 // ----------------------------------------------------------- |
545 // ----------------------------------------------------------- |
520 // |
546 // |
521 void CPhoneSingleCall::DisplayIncomingCallL( |
547 void CPhoneSingleCall::DisplayIncomingCallL( |
522 TInt aCallId, |
548 TInt aCallId, |
523 const TPhoneCmdParamBoolean aCommandParam ) |
549 const TPhoneCmdParamBoolean /*aCommandParam*/ ) |
524 { |
550 { |
525 __LOGMETHODSTARTEND( EPhoneUIStates, |
551 __LOGMETHODSTARTEND( EPhoneUIStates, |
526 "CPhoneSingleCall::DisplayIncomingCallL()"); |
552 "CPhoneSingleCall::DisplayIncomingCallL()"); |
527 |
553 // Close menu bar, if it is displayed |
528 // Cannot delete active note, e.g. New call query, |
554 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
529 // but show waiting note with or without caller name |
555 |
530 if ( IsAnyQueryActiveL() || |
556 // Remove any phone dialogs if they are displayed |
531 ( !aCommandParam.Boolean() && iOnScreenDialer ) ) |
557 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
532 { |
558 |
533 CallWaitingNoteL( aCallId ); |
559 // if keys have been locked, disable keylock without information note |
534 } |
560 if ( IsKeyLockOn() ) |
535 else |
561 { |
536 { |
562 iViewCommandHandle->ExecuteCommandL( EPhoneViewDisableKeyLockWithoutNote ); |
537 // Remove any phone dialogs if they are displayed |
|
538 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
|
539 } |
563 } |
540 |
564 |
541 // Indicate that the Phone needs to be sent to the background if |
565 // Indicate that the Phone needs to be sent to the background if |
542 // an application other than the top application is in the foreground |
566 // an application other than the top application is in the foreground |
543 TPhoneCmdParamBoolean booleanParam; |
567 SetNeedToReturnToForegroundAppStatusL( !TopAppIsDisplayedL() ); |
544 booleanParam.SetBoolean( !TopAppIsDisplayedL() ); |
568 |
545 iViewCommandHandle->ExecuteCommandL( |
|
546 EPhoneViewSetNeedToSendToBackgroundStatus, |
|
547 &booleanParam ); |
|
548 |
|
549 // Bring Phone app in the foreground |
569 // Bring Phone app in the foreground |
550 TPhoneCmdParamInteger uidParam; |
570 TPhoneCmdParamInteger uidParam; |
551 uidParam.SetInteger( KUidPhoneApplication.iUid ); |
571 uidParam.SetInteger( KUidPhoneApplication.iUid ); |
552 iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |
572 iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |
553 &uidParam ); |
573 &uidParam ); |
556 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetTopApplication, |
576 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetTopApplication, |
557 &uidParam ); |
577 &uidParam ); |
558 |
578 |
559 DisplayHeaderForCallComingInL( aCallId, ETrue ); //waiting call |
579 DisplayHeaderForCallComingInL( aCallId, ETrue ); //waiting call |
560 } |
580 } |
561 // ----------------------------------------------------------- |
581 |
562 // CPhoneSingleCall::HandleDiallingL |
582 // --------------------------------------------------------- |
563 // ----------------------------------------------------------- |
583 // CPhoneSingleCall::CallFromNewCallQueryL |
564 // |
584 // --------------------------------------------------------- |
565 void CPhoneSingleCall::HandleDiallingL( TInt aCallId ) |
585 // |
566 { |
586 void CPhoneSingleCall::CallFromNewCallQueryL() |
567 __LOGMETHODSTARTEND( EPhoneUIStates, |
587 { |
568 "CPhoneSingleCall::HandleDiallingL()"); |
588 __LOGMETHODSTARTEND( EPhoneUIStates, |
569 BeginUiUpdateLC(); |
589 "CPhoneSingleCall::CallFromNewCallQueryL()"); |
570 |
590 // First get the phone number from the dialog |
571 SetNumberEntryVisibilityL(EFalse); |
591 TPhoneCmdParamString phoneNumberParam; |
572 |
592 HBufC *content = HBufC::NewLC( KPhoneNumberEntryBufferSize ); |
|
593 TPtr ptr( content->Des() ); |
|
594 phoneNumberParam.SetString( &ptr ); |
|
595 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetTextQueryContent, |
|
596 &phoneNumberParam ); |
|
597 |
|
598 // Store the phone number |
|
599 iStateMachine->PhoneEngineInfo()->SetPhoneNumber( ptr ); |
|
600 |
|
601 // clean up stack |
|
602 CleanupStack::PopAndDestroy( content ); |
|
603 |
|
604 DialVoiceCallL(); |
|
605 } |
|
606 |
|
607 // ----------------------------------------------------------- |
|
608 // CPhoneSingleCall::HandleDialingL |
|
609 // ----------------------------------------------------------- |
|
610 // |
|
611 void CPhoneSingleCall::HandleDialingL( TInt aCallId ) |
|
612 { |
|
613 __LOGMETHODSTARTEND( EPhoneUIStates, |
|
614 "CPhoneSingleCall::HandleDialingL()"); |
|
615 |
|
616 CPhonePubSubProxy::Instance()->ChangePropertyValue( |
|
617 KPSUidScreenSaver, |
|
618 KScreenSaverAllowScreenSaver, |
|
619 EPhoneScreensaverNotAllowed ); |
573 // Display call setup |
620 // Display call setup |
574 DisplayCallSetupL( aCallId ); |
621 DisplayCallSetupL( aCallId ); |
575 |
622 iStateMachine->ChangeState( EPhoneStateCallSetupInSingle ); |
|
623 } |
|
624 |
|
625 // ----------------------------------------------------------- |
|
626 // CPhoneSingleCall::DoStateSpecificCallSetUpDefinitionsL |
|
627 // ----------------------------------------------------------- |
|
628 // |
|
629 EXPORT_C void CPhoneSingleCall::DoStateSpecificCallSetUpDefinitionsL() |
|
630 { |
576 // Show incoming call buttons |
631 // Show incoming call buttons |
577 SetTouchPaneButtons( EPhoneCallSetupAndSingleButtons ); |
632 SetTouchPaneButtons( EPhoneCallSetupAndSingleButtons ); |
578 |
633 } |
579 EndUiUpdate(); |
634 |
580 |
635 // ----------------------------------------------------------- |
581 // Go to call setup state |
636 // CPhoneSingleCall::SetCallHoldL |
582 UpdateCbaL( EPhoneCallHandlingCallSetupCBA ); |
637 // ----------------------------------------------------------- |
583 iStateMachine->ChangeState( EPhoneStateCallSetupInSingle ); |
638 // |
584 } |
639 void CPhoneSingleCall::SetCallHoldL() |
585 |
640 { |
586 // ----------------------------------------------------------- |
641 __LOGMETHODSTARTEND( EPhoneUIStates, |
587 // CPhoneSingleCall::DisplayCallSetupL |
642 "CPhoneSingleCall::SetCallHold()"); |
588 // ----------------------------------------------------------- |
643 |
589 // |
644 TPhoneCmdParamCallStateData callStateData; |
590 void CPhoneSingleCall::DisplayCallSetupL( TInt aCallId ) |
645 callStateData.SetCallId( iCallId ); |
591 { |
646 iViewCommandHandle->HandleCommandL( EPhoneViewGetCallState, |
592 __LOGMETHODSTARTEND( EPhoneUIStates, |
647 &callStateData ); |
593 "CPhoneSingleCall::DisplayCallSetupL()"); |
648 |
594 |
649 if( callStateData.CallState() == EPEStateConnected && !IsVideoCallActiveL() ) |
595 // Remove dialogs if necessary |
650 { |
596 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
651 iStateMachine->SetCallId( iCallId ); |
597 |
652 iStateMachine->SendPhoneEngineMessage( |
598 // Capture keys when the phone is dialling |
653 CPEPhoneModelIF::EPEMessageHold ); |
599 CaptureKeysDuringCallNotificationL( ETrue ); |
654 } |
600 |
655 else |
601 // Force telephony to the foreground |
656 { |
602 TPhoneCmdParamInteger uidParam; |
657 // Show not allowed note |
603 uidParam.SetInteger( KUidPhoneApplication.iUid ); |
658 SendGlobalInfoNoteL( EPhoneNoteTextNotAllowed ); |
604 iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |
659 } |
605 &uidParam ); |
660 } |
606 |
661 |
607 // Display call setup header |
662 // ----------------------------------------------------------- |
608 DisplayHeaderForOutgoingCallL( aCallId ); |
663 // CPhoneSingleCall::SetCallResumeL |
|
664 // ----------------------------------------------------------- |
|
665 // |
|
666 void CPhoneSingleCall::SetCallResumeL() |
|
667 { |
|
668 __LOGMETHODSTARTEND( EPhoneUIStates, |
|
669 "CPhoneSingleCall::SetCallHold()"); |
|
670 |
|
671 TPhoneCmdParamCallStateData callStateData; |
|
672 callStateData.SetCallId( iCallId ); |
|
673 iViewCommandHandle->HandleCommandL( EPhoneViewGetCallState, |
|
674 &callStateData ); |
|
675 |
|
676 if( callStateData.CallState() == EPEStateHeld ) |
|
677 { |
|
678 iStateMachine->SetCallId( iCallId ); |
|
679 iStateMachine->SendPhoneEngineMessage( |
|
680 CPEPhoneModelIF::EPEMessageResume ); |
|
681 } |
|
682 else |
|
683 { |
|
684 // Show not allowed note |
|
685 SendGlobalInfoNoteL( EPhoneNoteTextNotAllowed ); |
|
686 } |
609 } |
687 } |
610 |
688 |
611 // ----------------------------------------------------------- |
689 // ----------------------------------------------------------- |
612 // CPhoneSingleCall::SwitchToVideoL |
690 // CPhoneSingleCall::SwitchToVideoL |
613 // ----------------------------------------------------------- |
691 // ----------------------------------------------------------- |
616 { |
694 { |
617 __LOGMETHODSTARTEND( EPhoneUIStates, |
695 __LOGMETHODSTARTEND( EPhoneUIStates, |
618 "CPhoneSingleCall::SwitchToVideoL()"); |
696 "CPhoneSingleCall::SwitchToVideoL()"); |
619 |
697 |
620 if( FeatureManager::FeatureSupported( KFeatureIdCsVideoTelephony ) ) |
698 if( FeatureManager::FeatureSupported( KFeatureIdCsVideoTelephony ) ) |
621 { |
699 { |
622 TInt networkMode( CPhonePubSubProxy::Instance()->Value( KPSUidNetworkInfo, |
700 TInt networkMode( CPhonePubSubProxy::Instance()->Value( KPSUidNetworkInfo, |
623 KNWTelephonyNetworkMode ) ); |
701 KNWTelephonyNetworkMode ) ); |
624 TBool restoreOngoing( CPhonePubSubProxy::Instance()->Value( KUidSystemCategory, |
702 TBool restoreOngoing( CPhonePubSubProxy::Instance()->Value( KUidSystemCategory, |
625 conn::KUidBackupRestoreKey )); |
703 conn::KUidBackupRestoreKey )); |
|
704 |
|
705 TBool resetTouchButtons = EFalse; |
626 |
706 |
627 if ( networkMode != ENWNetworkModeWcdma ) |
707 if ( networkMode != ENWNetworkModeWcdma ) |
628 { |
708 { |
629 // We aren't in 3G, video call not possible |
709 // We aren't in 3G, video call not possible |
630 SendGlobalInfoNoteL( EPhoneInformationNoNetworkSupportForVideoCallNote ); |
710 SendGlobalInfoNoteL( EPhoneInformationNoNetworkSupportForVideoCallNote ); |
|
711 resetTouchButtons = ETrue; |
631 } |
712 } |
632 else if ( restoreOngoing & ( conn::EBURRestoreFull | conn::EBURRestorePartial )) |
713 else if ( restoreOngoing & ( conn::EBURRestoreFull | conn::EBURRestorePartial )) |
633 { |
714 { |
634 // MC restore ongoing |
715 // MC restore ongoing |
635 SendGlobalInfoNoteL( EPhoneInformationVideoCallNotAllowedDuringRestoreNote ); |
716 SendGlobalInfoNoteL( EPhoneInformationVideoCallNotAllowedDuringRestoreNote ); |
|
717 resetTouchButtons = ETrue; |
636 } |
718 } |
637 else |
719 else |
638 { |
720 { |
639 iSwitchToVideoQuery = ETrue; |
721 iSwitchToVideoQuery = ETrue; |
640 //ShowQueryL( EPhoneSwitchToVideoQuery ); |
722 ShowQueryL( EPhoneSwitchToVideoQuery ); |
641 iSwitchToVideoQuery = EFalse; |
723 iSwitchToVideoQuery = EFalse; |
642 } |
724 } |
|
725 |
|
726 if( resetTouchButtons ) |
|
727 { |
|
728 // Sets touch buttons to correct status if error has occured. |
|
729 iViewCommandHandle->ExecuteCommand( EPhoneResetTouchButtons ); |
|
730 } |
643 } |
731 } |
644 } |
732 } |
645 |
733 |
646 // ----------------------------------------------------------- |
734 // ----------------------------------------------------------- |
647 // CPhoneSingleCall::SwitchToVoiceL |
735 // CPhoneSingleCall::SwitchToVoiceL |