307 EXPORT_C void CPhoneStateInCall::HandleIdleL( TInt aCallId ) |
307 EXPORT_C void CPhoneStateInCall::HandleIdleL( TInt aCallId ) |
308 { |
308 { |
309 __LOGMETHODSTARTEND(EPhoneControl, |
309 __LOGMETHODSTARTEND(EPhoneControl, |
310 "CPhoneStateInCall::HandleIdleL()" ); |
310 "CPhoneStateInCall::HandleIdleL()" ); |
311 __ASSERT_DEBUG( aCallId >= 0, Panic( EPhoneCtrlParameterNotInitialized ) ); |
311 __ASSERT_DEBUG( aCallId >= 0, Panic( EPhoneCtrlParameterNotInitialized ) ); |
312 TransitionHandlerL().IdleCallUiUpdateLC(); |
312 IsNumberEntryUsedL() ? |
313 |
313 BeginTransEffectLC( ECallUiDisappear ) : |
|
314 BeginTransEffectLC( ENumberEntryClose ); |
|
315 BeginUiUpdateLC(); |
314 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
316 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
315 iViewCommandHandle->ExecuteCommandL( EPhoneViewHideToolbar ); |
317 iViewCommandHandle->ExecuteCommandL( EPhoneViewHideToolbar ); |
316 SetDefaultFlagsL(); |
318 SetDefaultFlagsL(); |
317 |
319 |
318 if ( IsNumberEntryUsedL() ) |
320 if ( IsNumberEntryUsedL() ) |
319 { |
321 { |
320 // Show the number entry if it exists and update cba's. |
322 if ( NeedToReturnToForegroundAppL() ) |
321 SetNumberEntryVisibilityL( ETrue ); |
323 { |
322 // Close dtmf dialer when call is disconnected. |
324 // Return phone to the background if menu application is needed to foreground. |
323 if ( IsDTMFEditorVisibleL() ) |
325 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground ); |
324 { |
326 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility ); |
325 CloseDTMFEditorL(); |
327 iCbaManager->SetCbaL( EPhoneNumberAcqCBA ); |
326 // Display idle screen and update CBA's |
328 } |
327 DisplayIdleScreenL(); |
329 else |
328 } |
330 { |
329 else if ( iOnScreenDialer && IsCustomizedDialerVisibleL() ) |
331 // Show the number entry if it exists and update cba's. |
330 { |
332 SetNumberEntryVisibilityL( ETrue ); |
331 CloseCustomizedDialerL(); |
333 // Close dtmf dialer when call is disconnected. |
332 // Display idle screen and update CBA's |
334 if ( IsDTMFEditorVisibleL() ) |
333 DisplayIdleScreenL(); |
335 { |
334 } |
336 CloseDTMFEditorL(); |
335 } |
337 // Display idle screen and update CBA's |
|
338 DisplayIdleScreenL(); |
|
339 } |
|
340 else if ( iOnScreenDialer && IsCustomizedDialerVisibleL() ) |
|
341 { |
|
342 CloseCustomizedDialerL(); |
|
343 // Display idle screen and update CBA's |
|
344 DisplayIdleScreenL(); |
|
345 } |
|
346 } |
|
347 } |
336 else |
348 else |
337 { |
349 { |
338 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
350 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
339 if ( !TopAppIsDisplayedL() || IsAutoLockOn() || NeedToReturnToForegroundAppL() ) |
351 if ( !TopAppIsDisplayedL() || IsAutoLockOn() || NeedToReturnToForegroundAppL() ) |
340 { |
352 { |
348 DisplayIdleScreenL(); |
360 DisplayIdleScreenL(); |
349 } |
361 } |
350 } |
362 } |
351 |
363 |
352 DeleteTouchPaneButtons(); |
364 DeleteTouchPaneButtons(); |
353 TransitionHandlerL().EndUiUpdateAndEffect(); |
365 EndUiUpdate(); |
|
366 EndTransEffect(); |
354 DisplayCallTerminationNoteL(); |
367 DisplayCallTerminationNoteL(); |
355 iStateMachine->ChangeState( EPhoneStateIdle ); |
368 iStateMachine->ChangeState( EPhoneStateIdle ); |
356 iViewCommandHandle->ExecuteCommandL( EPhoneViewHideToolbar ); |
369 iViewCommandHandle->ExecuteCommandL( EPhoneViewHideToolbar ); |
357 } |
370 } |
358 |
371 |
402 if ( !IsNumberEntryUsedL() ) |
415 if ( !IsNumberEntryUsedL() ) |
403 { |
416 { |
404 // Go to current state implementation |
417 // Go to current state implementation |
405 UpdateInCallCbaL(); |
418 UpdateInCallCbaL(); |
406 } |
419 } |
407 TBool audioMute = iStateMachine->PhoneEngineInfo()->AudioMute(); |
|
408 TPhoneCmdParamCallStateData callStateData; |
|
409 callStateData.SetCallState( EPEStateConnected ); |
|
410 iViewCommandHandle->HandleCommandL( EPhoneViewGetCallIdByState, &callStateData ); |
|
411 TInt call = callStateData.CallId(); |
|
412 if ( call != KErrNotFound && iStateMachine->PhoneEngineInfo()->CallType( call ) == EPECallTypeVoIP |
|
413 && audioMute ) |
|
414 { |
|
415 TPhoneCmdParamBoolean dtmfSendFlag; |
|
416 dtmfSendFlag.SetBoolean( ETrue ); |
|
417 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetVoipCallDTMFVisibilityFlag, |
|
418 &dtmfSendFlag ); |
|
419 } |
|
420 else |
|
421 { |
|
422 TPhoneCmdParamBoolean dtmfSendFlag; |
|
423 dtmfSendFlag.SetBoolean( EFalse ); |
|
424 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetVoipCallDTMFVisibilityFlag, |
|
425 &dtmfSendFlag ); |
|
426 } |
|
427 } |
420 } |
428 |
421 |
429 // ----------------------------------------------------------- |
422 // ----------------------------------------------------------- |
430 // CPhoneStateInCall::HandleAudioOutputChangedL |
423 // CPhoneStateInCall::HandleAudioOutputChangedL |
431 // ----------------------------------------------------------- |
424 // ----------------------------------------------------------- |
604 TBool commandStatus = ETrue; |
597 TBool commandStatus = ETrue; |
605 |
598 |
606 switch( aCommand ) |
599 switch( aCommand ) |
607 { |
600 { |
608 case EPhoneInCallCmdDialer: |
601 case EPhoneInCallCmdDialer: |
609 TransitionHandlerL(). |
602 BeginTransEffectLC( ECallUiDisappear ); |
610 BeginTransEffectLC( EPhoneTransEffectCallUiDisappear ); |
|
611 if ( !IsNumberEntryUsedL() ) |
603 if ( !IsNumberEntryUsedL() ) |
612 { |
604 { |
613 CreateNumberEntryL(); |
605 CreateNumberEntryL(); |
614 } |
606 } |
615 SetNumberEntryVisibilityL( ETrue ); |
607 SetNumberEntryVisibilityL( ETrue ); |
616 TransitionHandlerL().EndTransEffect(); |
608 EndTransEffect(); |
617 break; |
609 break; |
618 |
610 |
619 case EPhoneCmdOptions: |
611 case EPhoneCmdOptions: |
620 OpenMenuBarL(); |
612 OpenMenuBarL(); |
621 break; |
613 break; |
845 break; |
837 break; |
846 |
838 |
847 case EPhoneViewOpenCallHandling: |
839 case EPhoneViewOpenCallHandling: |
848 if ( iOnScreenDialer && IsNumberEntryUsedL() ) |
840 if ( iOnScreenDialer && IsNumberEntryUsedL() ) |
849 { |
841 { |
850 TransitionHandlerL(). |
842 BeginTransEffectLC( ECallUiAppear ); |
851 BeginTransEffectLC( EPhoneTransEffectCallUiAppear ); |
|
852 // Remove number entry from screen |
843 // Remove number entry from screen |
853 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
844 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
854 TransitionHandlerL().EndTransEffect(); |
845 EndTransEffect(); |
855 HandleNumberEntryClearedL(); |
846 HandleNumberEntryClearedL(); |
856 } |
847 } |
857 commandStatus = CPhoneState::HandleCommandL( aCommand ); |
848 commandStatus = CPhoneState::HandleCommandL( aCommand ); |
858 break; |
849 break; |
859 |
850 |
924 "CPhoneStateInCall::LaunchNewCallQueryL()" ); |
915 "CPhoneStateInCall::LaunchNewCallQueryL()" ); |
925 |
916 |
926 if ( iOnScreenDialer ) |
917 if ( iOnScreenDialer ) |
927 { |
918 { |
928 //In touch, just activate dialer |
919 //In touch, just activate dialer |
929 TransitionHandlerL(). |
920 BeginTransEffectLC( ECallUiDisappear ); |
930 BeginTransEffectLC( EPhoneTransEffectCallUiDisappear ); |
|
931 if ( IsNumberEntryUsedL() ) |
921 if ( IsNumberEntryUsedL() ) |
932 { |
922 { |
933 SetNumberEntryVisibilityL(ETrue); |
923 SetNumberEntryVisibilityL(ETrue); |
934 } |
924 } |
935 else |
925 else |
936 { |
926 { |
937 CreateNumberEntryL(); |
927 CreateNumberEntryL(); |
938 SetNumberEntryVisibilityL(ETrue); |
928 SetNumberEntryVisibilityL(ETrue); |
939 } |
929 } |
940 TransitionHandlerL().EndTransEffect(); |
930 EndTransEffect(); |
941 } |
931 } |
942 else |
932 else |
943 { |
933 { |
944 HBufC *text = HBufC::NewLC( KPhoneNumberEntryBufferSize ); |
934 HBufC *text = HBufC::NewLC( KPhoneNumberEntryBufferSize ); |
945 TPtr ptr( text->Des() ); |
935 TPtr ptr( text->Des() ); |