147 ClearNumberEntryContentCache(); |
147 ClearNumberEntryContentCache(); |
148 } |
148 } |
149 |
149 |
150 if ( CPhoneState::IsNumberEntryUsedL() ) |
150 if ( CPhoneState::IsNumberEntryUsedL() ) |
151 { |
151 { |
152 if ( iOnScreenDialer && IsDTMFEditorVisibleL() ) |
152 // Remove number entry from screen |
153 { |
153 iViewCommandHandle->ExecuteCommandL( |
154 CloseDTMFEditorL(); |
154 EPhoneViewRemoveNumberEntry ); |
155 } |
155 // Do state-specific operation when number entry is cleared |
156 else |
156 HandleNumberEntryClearedL(); |
157 { |
|
158 // Remove number entry from screen |
|
159 iViewCommandHandle->ExecuteCommandL( |
|
160 EPhoneViewRemoveNumberEntry ); |
|
161 // Do state-specific operation when number entry is cleared |
|
162 HandleNumberEntryClearedL(); |
|
163 } |
|
164 } |
157 } |
165 if ( !TopAppIsDisplayedL() ) |
158 if ( !TopAppIsDisplayedL() ) |
166 { |
159 { |
167 // Bring app to foreground |
160 // Bring app to foreground |
168 TPhoneCmdParamInteger uidParam; |
161 TPhoneCmdParamInteger uidParam; |
243 MPEPhoneModel::EPEMessageReleaseAll ); |
236 MPEPhoneModel::EPEMessageReleaseAll ); |
244 break; |
237 break; |
245 |
238 |
246 case EPhoneDtmfDialerCancel: |
239 case EPhoneDtmfDialerCancel: |
247 { |
240 { |
248 CloseDTMFEditorL(); |
|
249 } |
241 } |
250 break; |
242 break; |
251 |
243 |
252 default: |
244 default: |
253 commandStatus = CPhoneGsmInCall::HandleCommandL( aCommand ); |
245 commandStatus = CPhoneGsmInCall::HandleCommandL( aCommand ); |
254 break; |
246 break; |
255 } |
247 } |
256 |
248 |
257 return commandStatus; |
249 return commandStatus; |
258 } |
|
259 |
|
260 // ----------------------------------------------------------- |
|
261 // CPhoneSingleAndCallSetupAndWaiting::OpenMenuBarL |
|
262 // ----------------------------------------------------------- |
|
263 // |
|
264 void CPhoneSingleAndCallSetupAndWaiting::OpenMenuBarL() |
|
265 { |
|
266 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndCallSetupAndWaiting::OpenMenuBarL() "); |
|
267 TInt resourceId; |
|
268 |
|
269 if ( iOnScreenDialer && IsDTMFEditorVisibleL() ) |
|
270 { |
|
271 resourceId = EPhoneDtmfDialerMenubar; |
|
272 } |
|
273 else if ( IsNumberEntryVisibleL() ) |
|
274 { |
|
275 resourceId = EPhoneAlertingHeldAndWaitingCallMenuBarWithNumberEntry; |
|
276 } |
|
277 else |
|
278 { |
|
279 resourceId = EPhoneAlertingHeldAndWaitingCallMenuBar; |
|
280 } |
|
281 |
|
282 TPhoneCmdParamInteger integerParam; |
|
283 integerParam.SetInteger( |
|
284 CPhoneMainResourceResolver::Instance()-> |
|
285 ResolveResourceID( resourceId ) ); |
|
286 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarOpen, |
|
287 &integerParam ); |
|
288 } |
250 } |
289 |
251 |
290 // ----------------------------------------------------------- |
252 // ----------------------------------------------------------- |
291 // CPhoneSingleAndCallSetupAndWaiting:HandleIdleL |
253 // CPhoneSingleAndCallSetupAndWaiting:HandleIdleL |
292 // ----------------------------------------------------------- |
254 // ----------------------------------------------------------- |
382 void CPhoneSingleAndCallSetupAndWaiting::HandleConnectingL( TInt aCallId ) |
344 void CPhoneSingleAndCallSetupAndWaiting::HandleConnectingL( TInt aCallId ) |
383 { |
345 { |
384 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndCallSetupAndWaiting::HandleConnectingL() "); |
346 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndCallSetupAndWaiting::HandleConnectingL() "); |
385 |
347 |
386 // Remove the number entry if it isn't DTMF dialer |
348 // Remove the number entry if it isn't DTMF dialer |
387 if ( !iOnScreenDialer || !IsNumberEntryVisibleL() || !IsDTMFEditorVisibleL() ) |
349 if ( !iOnScreenDialer || !IsNumberEntryVisibleL() ) |
388 { |
350 { |
389 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
351 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
390 } |
352 } |
391 |
353 |
392 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveGlobalNote ); |
354 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveGlobalNote ); |
428 // Keep Phone in the foreground |
390 // Keep Phone in the foreground |
429 TPhoneCmdParamBoolean booleanParam; |
391 TPhoneCmdParamBoolean booleanParam; |
430 booleanParam.SetBoolean( EFalse ); |
392 booleanParam.SetBoolean( EFalse ); |
431 iViewCommandHandle->ExecuteCommandL( |
393 iViewCommandHandle->ExecuteCommandL( |
432 EPhoneViewSetNeedToSendToBackgroundStatus, &booleanParam ); |
394 EPhoneViewSetNeedToSendToBackgroundStatus, &booleanParam ); |
433 |
|
434 // Close menu bar, if it is displayed |
|
435 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
436 |
395 |
437 // Show bubble |
396 // Show bubble |
438 TPhoneCmdParamCallHeaderData callHeaderParam; |
397 TPhoneCmdParamCallHeaderData callHeaderParam; |
439 callHeaderParam.SetCallState( EPEStateConnected ); |
398 callHeaderParam.SetCallState( EPEStateConnected ); |
440 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
399 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
443 // Capturing keys and number entry must be removed because some |
402 // Capturing keys and number entry must be removed because some |
444 // networks jump over connecting state directly to connected state. |
403 // networks jump over connecting state directly to connected state. |
445 CaptureKeysDuringCallNotificationL( EFalse ); |
404 CaptureKeysDuringCallNotificationL( EFalse ); |
446 |
405 |
447 // Remove the number entry if it isn't DTMF dialer |
406 // Remove the number entry if it isn't DTMF dialer |
448 if ( !iOnScreenDialer || !IsNumberEntryVisibleL() || !IsDTMFEditorVisibleL() ) |
407 if ( !iOnScreenDialer || !IsNumberEntryVisibleL() ) |
449 { |
408 { |
450 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
409 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
451 } |
410 } |
452 |
411 |
453 if ( aCallId != iWaitingCallId ) |
412 if ( aCallId != iWaitingCallId ) |
470 void CPhoneSingleAndCallSetupAndWaiting::StateChangeToCallSetupAndWaitingL( TInt aCallId ) |
429 void CPhoneSingleAndCallSetupAndWaiting::StateChangeToCallSetupAndWaitingL( TInt aCallId ) |
471 { |
430 { |
472 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndCallSetupAndWaiting::StateChangeToCallSetupAndWaitingL() "); |
431 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndCallSetupAndWaiting::StateChangeToCallSetupAndWaitingL() "); |
473 // Remove call |
432 // Remove call |
474 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
433 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
475 |
|
476 // Close menu bar, if it is displayed |
|
477 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
478 |
434 |
479 // Reset Hold flag to view |
435 // Reset Hold flag to view |
480 TPhoneCmdParamBoolean holdFlag; |
436 TPhoneCmdParamBoolean holdFlag; |
481 holdFlag.SetBoolean( EFalse ); |
437 holdFlag.SetBoolean( EFalse ); |
482 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
438 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
483 |
439 |
484 BeginUiUpdateLC(); |
440 BeginUiUpdateLC(); |
485 |
441 |
486 SetTouchPaneButtons( EPhoneCallSetupButtons ); |
442 SetTouchPaneButtons( EPhoneCallSetupButtons ); |
487 SetToolbarDimming( ETrue ); |
|
488 SetToolbarButtonLoudspeakerEnabled(); |
443 SetToolbarButtonLoudspeakerEnabled(); |
489 |
444 |
490 EndUiUpdate(); |
445 EndUiUpdate(); |
491 |
446 |
492 // Go to Call Setup And Waiting state |
447 // Go to Call Setup And Waiting state |
511 // Show number entry |
466 // Show number entry |
512 TPhoneCmdParamBoolean booleanParam; |
467 TPhoneCmdParamBoolean booleanParam; |
513 booleanParam.SetBoolean( ETrue ); |
468 booleanParam.SetBoolean( ETrue ); |
514 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetNumberEntryVisible, &booleanParam ); |
469 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetNumberEntryVisible, &booleanParam ); |
515 } |
470 } |
516 |
|
517 // Close menu bar, if it is displayed |
|
518 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
519 |
471 |
520 // Set Hold flag to view |
472 // Set Hold flag to view |
521 TPhoneCmdParamBoolean holdFlag; |
473 TPhoneCmdParamBoolean holdFlag; |
522 holdFlag.SetBoolean( ETrue ); |
474 holdFlag.SetBoolean( ETrue ); |
523 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
475 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
540 { |
492 { |
541 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndCallSetupAndWaiting::StateChangeToSingleAndAlertingL() "); |
493 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndCallSetupAndWaiting::StateChangeToSingleAndAlertingL() "); |
542 // Remove call |
494 // Remove call |
543 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
495 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
544 |
496 |
545 // Close menu bar, if it is displayed |
|
546 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
547 |
|
548 // Remove the number entry if it isn't DTMF dialer |
497 // Remove the number entry if it isn't DTMF dialer |
549 if ( !iOnScreenDialer || !IsNumberEntryVisibleL() || !IsDTMFEditorVisibleL() ) |
498 if ( !iOnScreenDialer || !IsNumberEntryVisibleL() ) |
550 { |
499 { |
551 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
500 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
552 } |
501 } |
553 |
502 |
554 // Set Hold flag to view EFalse that dtmf menu item not delete |
503 // Set Hold flag to view EFalse that dtmf menu item not delete |
575 __LOGMETHODSTARTEND( EPhoneUIStates, |
524 __LOGMETHODSTARTEND( EPhoneUIStates, |
576 "CPhoneSingleAndCallSetupAndWaiting::StateChangeToTwoSinglesL()"); |
525 "CPhoneSingleAndCallSetupAndWaiting::StateChangeToTwoSinglesL()"); |
577 |
526 |
578 BeginUiUpdateLC(); |
527 BeginUiUpdateLC(); |
579 |
528 |
580 SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer ); |
|
581 SetTouchPaneButtons( EPhoneTwoSinglesButtons ); |
529 SetTouchPaneButtons( EPhoneTwoSinglesButtons ); |
582 |
530 |
583 EndUiUpdate(); |
531 EndUiUpdate(); |
584 |
532 |
585 // Go to two singles state |
533 // Go to two singles state |
597 "CPhoneSingleAndCallSetupAndWaiting::StateChangeToTwoSinglesAndWaitingL()"); |
545 "CPhoneSingleAndCallSetupAndWaiting::StateChangeToTwoSinglesAndWaitingL()"); |
598 |
546 |
599 BeginUiUpdateLC(); |
547 BeginUiUpdateLC(); |
600 |
548 |
601 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
549 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
602 SetTouchPaneButtonDisabled( EPhoneCallComingCmdAnswer ); |
|
603 |
550 |
604 EndUiUpdate(); |
551 EndUiUpdate(); |
605 |
552 |
606 // Go to two singles state and waiting |
553 // Go to two singles state and waiting |
607 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
554 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |