396 // CPhoneConference:HandleIdleL |
396 // CPhoneConference:HandleIdleL |
397 // ----------------------------------------------------------- |
397 // ----------------------------------------------------------- |
398 // |
398 // |
399 void CPhoneConference::HandleIdleL( TInt aCallId ) |
399 void CPhoneConference::HandleIdleL( TInt aCallId ) |
400 { |
400 { |
401 __LOGMETHODSTARTEND( EPhoneUIStates, |
401 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConference::HandleIdleL()"); |
402 "CPhoneConference::HandleIdleL()"); |
|
403 // Re-enable global notes |
402 // Re-enable global notes |
404 TPhoneCmdParamBoolean globalNotifierParam; |
403 TPhoneCmdParamBoolean globalNotifierParam; |
405 globalNotifierParam.SetBoolean( EFalse ); |
404 globalNotifierParam.SetBoolean( EFalse ); |
406 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
405 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
407 &globalNotifierParam ); |
406 &globalNotifierParam ); |
408 |
|
409 // Stop capturing keys |
407 // Stop capturing keys |
410 CaptureKeysDuringCallNotificationL( EFalse ); |
408 CaptureKeysDuringCallNotificationL( EFalse ); |
411 |
409 |
412 // If dialler is not open then close menu bar. |
410 // If dialler is not open then close menu bar. |
413 if ( !IsNumberEntryUsedL() ) |
411 if ( !IsNumberEntryUsedL() ) |
441 // |
439 // |
442 void CPhoneConference::HandleConferenceIdleL() |
440 void CPhoneConference::HandleConferenceIdleL() |
443 { |
441 { |
444 __LOGMETHODSTARTEND( EPhoneUIStates, |
442 __LOGMETHODSTARTEND( EPhoneUIStates, |
445 "CPhoneConference::HandleConferenceIdleL()"); |
443 "CPhoneConference::HandleConferenceIdleL()"); |
446 BeginTransEffectLC( ENumberEntryClose ); |
444 TransitionHandlerL().BeginTransEffectLC( EPhoneTransEffectPhoneUiClose ); |
447 BeginUiUpdateLC(); |
445 TransitionHandlerL().BeginUiUpdateLC(); |
448 |
|
449 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble ); |
446 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble ); |
450 |
|
451 TPhoneCmdParamInteger activeCallCount; |
447 TPhoneCmdParamInteger activeCallCount; |
452 iViewCommandHandle->ExecuteCommandL( |
448 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCountOfActiveCalls, &activeCallCount ); |
453 EPhoneViewGetCountOfActiveCalls, &activeCallCount ); |
449 |
454 |
|
455 switch( activeCallCount.Integer() ) |
450 switch( activeCallCount.Integer() ) |
456 { |
451 { |
457 case ENoActiveCalls: |
452 case ENoActiveCalls: |
458 MakeStateTransitionToIdleL(); |
453 MakeStateTransitionToIdleL(); |
459 break; |
454 break; |
460 |
|
461 case EOneActiveCall: |
455 case EOneActiveCall: |
462 { |
456 if ( !MakeTransitionToWaitingInSingleL() ) |
463 // Fetch ringing call's id from view |
|
464 TPhoneCmdParamCallStateData callStateData; |
|
465 callStateData.SetCallState( EPEStateRinging ); |
|
466 iViewCommandHandle->HandleCommandL( |
|
467 EPhoneViewGetCallIdByState, &callStateData ); |
|
468 |
|
469 if( callStateData.CallId() > KErrNotFound ) |
|
470 { |
|
471 CPhonePubSubProxy::Instance()->ChangePropertyValue( |
|
472 KPSUidScreenSaver, |
|
473 KScreenSaverAllowScreenSaver, |
|
474 EPhoneScreensaverNotAllowed ); |
|
475 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
|
476 iStateMachine->ChangeState( EPhoneStateWaitingInSingle ); |
|
477 } |
|
478 else |
|
479 { |
457 { |
480 MakeStateTransitionToSingleL(); |
458 MakeStateTransitionToSingleL(); |
481 } |
459 } |
482 } |
|
483 break; |
460 break; |
484 |
461 |
485 case ETwoActiveCalls: |
462 case ETwoActiveCalls: |
486 MakeStateTransitionToTwoSinglesL(); |
463 MakeStateTransitionToTwoSinglesL(); |
487 break; |
464 break; |
488 |
465 |
489 default: |
466 default: |
490 MakeStateTransitionToTwoSinglesL(); |
467 MakeStateTransitionToTwoSinglesL(); |
491 break; |
468 break; |
492 } |
469 } |
493 EndUiUpdate(); |
470 TransitionHandlerL().EndUiUpdateAndEffect(); |
494 EndTransEffect(); |
|
495 } |
471 } |
496 |
472 |
497 // ----------------------------------------------------------- |
473 // ----------------------------------------------------------- |
498 // CPhoneConference::HandleHeldConferenceL |
474 // CPhoneConference::HandleHeldConferenceL |
499 // ----------------------------------------------------------- |
475 // ----------------------------------------------------------- |
705 // |
676 // |
706 void CPhoneConference::MakeStateTransitionToIdleL() |
677 void CPhoneConference::MakeStateTransitionToIdleL() |
707 { |
678 { |
708 __LOGMETHODSTARTEND( EPhoneUIStates, |
679 __LOGMETHODSTARTEND( EPhoneUIStates, |
709 "CPhoneConference::MakeStateTransitionToIdleL()"); |
680 "CPhoneConference::MakeStateTransitionToIdleL()"); |
710 |
|
711 SetDefaultFlagsL(); |
681 SetDefaultFlagsL(); |
712 |
682 |
713 if ( IsNumberEntryUsedL() ) |
683 if ( IsNumberEntryUsedL() ) |
714 { |
684 { |
715 if ( NeedToReturnToForegroundAppL() ) |
685 if ( NeedToReturnToForegroundAppL() ) |
716 { |
686 { |
717 // Return phone to the background if menu application is needed to foreground. |
687 // Return phone to the background if menu application is needed to foreground. |
718 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground ); |
688 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground ); |
719 |
|
720 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility ); |
689 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility ); |
721 |
|
722 // Set Number Entry CBA |
690 // Set Number Entry CBA |
723 iCbaManager->SetCbaL( EPhoneNumberAcqCBA ); |
691 iCbaManager->SetCbaL( EPhoneNumberAcqCBA ); |
724 } |
692 } |
725 else |
693 else |
726 { |
694 { |
727 // Show the number entry if it exists |
695 // Show the number entry if it exists |
728 SetNumberEntryVisibilityL(ETrue); |
696 SetNumberEntryVisibilityL(ETrue); |
729 |
|
730 // Close dtmf dialer when call is disconnected. |
697 // Close dtmf dialer when call is disconnected. |
731 if ( iOnScreenDialer && IsDTMFEditorVisibleL() ) |
698 if ( iOnScreenDialer && IsDTMFEditorVisibleL() ) |
732 { |
699 { |
733 CloseDTMFEditorL(); |
700 CloseDTMFEditorL(); |
734 // Display idle screen and update CBAs |
701 // Display idle screen and update CBAs |
735 DisplayIdleScreenL(); |
702 DisplayIdleScreenL(); |
736 } |
703 } |
737 } |
704 } |
738 } |
705 } |
739 else if ( !TopAppIsDisplayedL() || NeedToReturnToForegroundAppL() ) |
706 else if ( !TopAppIsDisplayedL() || NeedToReturnToForegroundAppL() ) |
740 { |
707 { |
741 // Close menu bar, if it is displayed |
|
742 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
708 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
743 |
|
744 // Continue displaying current app but set up the |
709 // Continue displaying current app but set up the |
745 // idle screen in the background |
710 // idle screen in the background |
746 SetupIdleScreenInBackgroundL(); |
711 SetupIdleScreenInBackgroundL(); |
747 } |
712 } |
748 else |
713 else |
749 { |
714 { |
750 // Close menu bar, if it is displayed |
|
751 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
715 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
752 |
|
753 // Display idle screen |
|
754 DisplayIdleScreenL(); |
716 DisplayIdleScreenL(); |
755 } |
717 } |
756 |
718 |
757 // Display call termination note, if necessary |
719 // Display call termination note, if necessary |
758 DisplayCallTerminationNoteL(); |
720 DisplayCallTerminationNoteL(); |
759 |
|
760 UpdateCbaL( EPhoneEmptyCBA ); |
721 UpdateCbaL( EPhoneEmptyCBA ); |
761 // Go to idle state |
|
762 iStateMachine->ChangeState( EPhoneStateIdle ); |
722 iStateMachine->ChangeState( EPhoneStateIdle ); |
763 } |
723 } |
764 |
724 |
765 // ----------------------------------------------------------- |
725 // ----------------------------------------------------------- |
|
726 // CPhoneConference::MakeTransitionToWaitingInSingleL |
|
727 // ----------------------------------------------------------- |
|
728 // |
|
729 TBool CPhoneConference::MakeTransitionToWaitingInSingleL() |
|
730 { |
|
731 __LOGMETHODSTARTEND( EPhoneUIStates, |
|
732 "CPhoneConference::MakeTransitionToWaitingInSingleL()"); |
|
733 TBool retValue(EFalse); |
|
734 TPhoneCmdParamCallStateData callStateData; |
|
735 callStateData.SetCallState( EPEStateRinging ); |
|
736 iViewCommandHandle->HandleCommandL( |
|
737 EPhoneViewGetCallIdByState, &callStateData ); |
|
738 |
|
739 if ( callStateData.CallId() > KErrNotFound ) |
|
740 { |
|
741 CPhonePubSubProxy::Instance()->ChangePropertyValue( |
|
742 KPSUidScreenSaver, |
|
743 KScreenSaverAllowScreenSaver, |
|
744 EPhoneScreensaverNotAllowed ); |
|
745 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
|
746 iStateMachine->ChangeState( EPhoneStateWaitingInSingle ); |
|
747 retValue = ETrue; |
|
748 } |
|
749 return retValue; |
|
750 } |
|
751 |
|
752 // ----------------------------------------------------------- |
766 // CPhoneConference::MakeStateTransitionToSingleL |
753 // CPhoneConference::MakeStateTransitionToSingleL |
767 // ----------------------------------------------------------- |
754 // ----------------------------------------------------------- |
768 // |
755 // |
769 void CPhoneConference::MakeStateTransitionToSingleL() |
756 void CPhoneConference::MakeStateTransitionToSingleL() |
770 { |
757 { |
771 __LOGMETHODSTARTEND( EPhoneUIStates, |
758 __LOGMETHODSTARTEND( EPhoneUIStates, |
772 "CPhoneConference::MakeStateTransitionToSingleL()"); |
759 "CPhoneConference::MakeStateTransitionToSingleL()"); |
773 // Close menu bar, if it is displayed |
|
774 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
760 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
775 |
761 SetTouchPaneButtons( EPhoneIncallButtons ); |
776 |
|
777 SetTouchPaneButtons( EPhoneIncallButtons ); |
|
778 |
|
779 // Go to single state |
|
780 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
762 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
781 iStateMachine->ChangeState( EPhoneStateSingle ); |
763 iStateMachine->ChangeState( EPhoneStateSingle ); |
782 } |
764 } |
783 |
765 |
784 // ----------------------------------------------------------- |
766 // ----------------------------------------------------------- |
785 // CPhoneConference::MakeTransitionToTwoSinglesL |
767 // CPhoneConference::MakeTransitionToTwoSinglesL |
786 // ----------------------------------------------------------- |
768 // ----------------------------------------------------------- |
787 // |
769 // |
788 void CPhoneConference::MakeStateTransitionToTwoSinglesL() |
770 void CPhoneConference::MakeStateTransitionToTwoSinglesL() |
789 { |
771 { |
790 __LOGMETHODSTARTEND( EPhoneUIStates, |
772 __LOGMETHODSTARTEND( EPhoneUIStates, |
791 "CPhoneConference::MakeStateTransitionToTwoSinglesL()"); |
773 "CPhoneConference::MakeStateTransitionToTwoSinglesL()"); |
792 // Close menu bar, if it is displayed |
|
793 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
774 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
794 |
775 SetTouchPaneButtons( EPhoneTwoSinglesButtons ); |
795 |
|
796 SetTouchPaneButtons( EPhoneTwoSinglesButtons ); |
|
797 |
|
798 // Set Two singles softkeys |
|
799 UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA ); |
776 UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA ); |
800 |
777 iStateMachine->ChangeState( EPhoneStateTwoSingles ); |
801 // Go to two singles state |
|
802 iStateMachine->ChangeState( EPhoneStateTwoSingles ); |
|
803 } |
778 } |
804 |
779 |
805 // ----------------------------------------------------------- |
780 // ----------------------------------------------------------- |
806 // CPhoneConference::CloseSelectionListL |
781 // CPhoneConference::CloseSelectionListL |
807 // ----------------------------------------------------------- |
782 // ----------------------------------------------------------- |
924 |
894 |
925 // Indicate that the menu application on foreground needs to be sent back to the foreground |
895 // Indicate that the menu application on foreground needs to be sent back to the foreground |
926 // after call is ended. |
896 // after call is ended. |
927 SetNeedToReturnToForegroundAppStatusL( !TopAppIsDisplayedL() ); |
897 SetNeedToReturnToForegroundAppStatusL( !TopAppIsDisplayedL() ); |
928 |
898 |
|
899 // Get allow waiting call header param value. |
929 TPhoneCmdParamBoolean dialerParam; |
900 TPhoneCmdParamBoolean dialerParam; |
930 dialerParam.SetBoolean( ETrue ); |
901 dialerParam.SetBoolean( ETrue ); |
931 |
|
932 // Get allow waiting call header param value. |
|
933 AllowShowingOfWaitingCallHeaderL( dialerParam ); |
902 AllowShowingOfWaitingCallHeaderL( dialerParam ); |
934 |
903 |
935 CloseSelectionListL(); |
904 CloseSelectionListL(); |
936 |
905 |
937 // Close fast swap window if it's displayed |
906 // Close fast swap window if it's displayed |
938 EikonEnv()->DismissTaskList(); |
907 EikonEnv()->DismissTaskList(); |
939 |
908 |
940 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
909 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
941 |
910 |
942 // Display incoming call |
|
943 DisplayIncomingCallL( aCallId, dialerParam ); |
911 DisplayIncomingCallL( aCallId, dialerParam ); |
944 |
912 TransitionHandlerL().EndUiUpdateAndEffect(); |
945 EndUiUpdate(); |
913 |
946 EndTransEffect(); |
|
947 |
|
948 // Go to incoming state |
|
949 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
914 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
950 iStateMachine->ChangeState( EPhoneStateConferenceAndWaiting ); |
915 iStateMachine->ChangeState( EPhoneStateConferenceAndWaiting ); |
951 } |
916 } |
952 |
917 |
953 // ----------------------------------------------------------- |
918 // ----------------------------------------------------------- |
1014 } |
979 } |
1015 else |
980 else |
1016 { |
981 { |
1017 SetTouchPaneButtons( EPhoneTwoSinglesButtons ); |
982 SetTouchPaneButtons( EPhoneTwoSinglesButtons ); |
1018 } |
983 } |
1019 EndUiUpdate(); |
984 TransitionHandlerL().EndUiUpdate(); |
1020 } |
985 } |
1021 |
986 |
1022 // ----------------------------------------------------------- |
987 // ----------------------------------------------------------- |
1023 // CPhoneConference::OpenParticipantsListL |
988 // CPhoneConference::OpenParticipantsListL |
1024 // ----------------------------------------------------------- |
989 // ----------------------------------------------------------- |
1025 // |
990 // |
1026 void CPhoneConference::OpenParticipantsListL() |
991 void CPhoneConference::OpenParticipantsListL() |
1027 { |
992 { |
1028 BeginUiUpdateLC(); |
993 TransitionHandlerL().BeginUiUpdateLC(); |
1029 |
994 |
1030 TPhoneCmdParamBoolean booleanParam; |
995 TPhoneCmdParamBoolean booleanParam; |
1031 booleanParam.SetBoolean( ETrue ); |
996 booleanParam.SetBoolean( ETrue ); |
1032 |
997 |
1033 iViewCommandHandle->ExecuteCommandL( EPhoneViewOpenConferenceList, |
998 iViewCommandHandle->ExecuteCommandL( EPhoneViewOpenConferenceList, |
1034 &booleanParam ); |
999 &booleanParam ); |
1035 |
1000 |
1036 SetTouchPaneButtons( EPhoneParticipantListButtons ); |
1001 SetTouchPaneButtons( EPhoneParticipantListButtons ); |
1037 |
1002 |
1038 EndUiUpdate(); |
1003 TransitionHandlerL().EndUiUpdate(); |
1039 |
1004 |
1040 iCbaManager->SetCbaL( EPhoneParticipantListCBA ); |
1005 iCbaManager->SetCbaL( EPhoneParticipantListCBA ); |
1041 |
1006 |
1042 // Find out is conference held or not |
1007 // Find out is conference held or not |
1043 TPhoneCmdParamCallStateData callStateData; |
1008 TPhoneCmdParamCallStateData callStateData; |