phoneapp/phoneuistates/src/cphoneemergency.cpp
branchRCL_3
changeset 81 c26cc2a7c548
parent 69 8baf28733c3d
equal deleted inserted replaced
73:e30d4a1b8bad 81:c26cc2a7c548
   205     {
   205     {
   206     __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneEmergency::HandleIdleL() ");
   206     __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneEmergency::HandleIdleL() ");
   207 
   207 
   208     // Re-enable global notes, this enables secui (if needed) to come on top
   208     // Re-enable global notes, this enables secui (if needed) to come on top
   209     // if call creation was rejected by user
   209     // if call creation was rejected by user
   210     TPhoneCmdParamBoolean globalNotifierParam;
   210     EnableGlobalNotifiersL();
   211     globalNotifierParam.SetBoolean( EFalse );
       
   212     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
       
   213         &globalNotifierParam );
       
   214 
   211 
   215     if ( iOnScreenDialer && IsDTMFEditorVisibleL() )
   212     if ( iOnScreenDialer && IsDTMFEditorVisibleL() )
   216         {
   213         {
   217         CloseDTMFEditorL();
   214         CloseDTMFEditorL();
   218         }
   215         }
   330     // because PE messages are processed asynchronously.
   327     // because PE messages are processed asynchronously.
   331     __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneEmergency::HandleDialingL() ");
   328     __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneEmergency::HandleDialingL() ");
   332 
   329 
   333     if ( aCallId == KPEEmergencyCallId )
   330     if ( aCallId == KPEEmergencyCallId )
   334         {
   331         {
   335         if ( !IsSimOk() || IsSimStateNotPresentWithSecurityModeEnabled() )
   332         if ( !IsSimOk() )
   336             {
   333             {
   337             TPhoneCmdParamBoolean visibleMode;
   334             TPhoneCmdParamBoolean visibleMode;
   338             visibleMode.SetBoolean( ETrue );
   335             visibleMode.SetBoolean( ETrue );
   339             iViewCommandHandle->ExecuteCommandL( EPhoneViewSetStatusPaneVisible, &visibleMode );
   336             iViewCommandHandle->ExecuteCommandL( EPhoneViewSetStatusPaneVisible, &visibleMode );
   340             }
   337             }
   349         // Do it already here. Otherwice a white/black toolbar area is shortly shown and
   346         // Do it already here. Otherwice a white/black toolbar area is shortly shown and
   350         // a white screen can be a result when touching it.
   347         // a white screen can be a result when touching it.
   351         iViewCommandHandle->HandleCommandL( EPhoneViewShowToolbar );
   348         iViewCommandHandle->HandleCommandL( EPhoneViewShowToolbar );
   352 
   349 
   353         // Disable global notes when the phone is dialling
   350         // Disable global notes when the phone is dialling
   354         TPhoneCmdParamBoolean globalNotifierParam;
   351         DisableGlobalNotifiersL();
   355         globalNotifierParam.SetBoolean( ETrue );
       
   356         iViewCommandHandle->ExecuteCommandL(
       
   357             EPhoneViewSetGlobalNotifiersDisabled,
       
   358             &globalNotifierParam );
       
   359 
   352 
   360         // Capture keys when the phone is dialling
   353         // Capture keys when the phone is dialling
   361         CaptureKeysDuringCallNotificationL( ETrue );
   354         CaptureKeysDuringCallNotificationL( ETrue );
   362 
   355 
   363         // Indicate that the Phone needs to be sent to the background if
   356         // Indicate that the Phone needs to be sent to the background if
   364         // an application other than the top application is in the foreground
   357         // an application other than the top application is in the foreground
   365         SetNeedToReturnToForegroundAppStatusL( !TopAppIsDisplayedL() );
   358         TPhoneCmdParamBoolean booleanParam;
   366         
   359         booleanParam.SetBoolean( !TopAppIsDisplayedL() );
       
   360         iViewCommandHandle->ExecuteCommandL(
       
   361                 EPhoneViewSetNeedToReturnToForegroundAppStatus,
       
   362             &booleanParam );
       
   363 
   367         // Bring Phone app in the foreground
   364         // Bring Phone app in the foreground
   368         TPhoneCmdParamInteger uidParam;
   365         TPhoneCmdParamInteger uidParam;
   369         uidParam.SetInteger( KUidPhoneApplication.iUid );
   366         uidParam.SetInteger( KUidPhoneApplication.iUid );
   370         iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,
   367         iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,
   371             &uidParam );
   368             &uidParam );
   403     __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneEmergency::HandleConnectingL() ");
   400     __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneEmergency::HandleConnectingL() ");
   404 
   401 
   405     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveGlobalNote );
   402     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveGlobalNote );
   406 
   403 
   407     // Re-enable global notes
   404     // Re-enable global notes
   408     TPhoneCmdParamBoolean globalNotifierParam;
   405     EnableGlobalNotifiersL();
   409     globalNotifierParam.SetBoolean( EFalse );
   406     EnableEikonNotifiersL();
   410     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
       
   411         &globalNotifierParam );
       
   412     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetEikonNotifiersDisabled,
       
   413           &globalNotifierParam );
       
   414 
   407 
   415     if(  TouchCallHandlingSupported() )
   408     if(  TouchCallHandlingSupported() )
   416         {
   409         {
   417         if ( !IsSimStateNotPresentWithSecurityModeEnabled() )
   410         if ( !IsSimStateNotPresentWithSecurityModeEnabled() )
   418             {
   411             {
   443     emergencyHeaderParam.SetCiphering(
   436     emergencyHeaderParam.SetCiphering(
   444         iStateMachine->PhoneEngineInfo()->IsSecureCall( aCallId ) );
   437         iStateMachine->PhoneEngineInfo()->IsSecureCall( aCallId ) );
   445     emergencyHeaderParam.SetCipheringIndicatorAllowed(
   438     emergencyHeaderParam.SetCipheringIndicatorAllowed(
   446         iStateMachine->PhoneEngineInfo()->SecureSpecified() );
   439         iStateMachine->PhoneEngineInfo()->SecureSpecified() );
   447 
   440 
   448     TransitionHandlerL().BeginUiUpdateLC();
   441     BeginUiUpdateLC();
   449 
   442 
   450     // Notify the view
   443     // Notify the view
   451     iViewCommandHandle->ExecuteCommandL(
   444     iViewCommandHandle->ExecuteCommandL(
   452         EPhoneViewCreateEmergencyCallHeader,
   445         EPhoneViewCreateEmergencyCallHeader,
   453         aCallId,
   446         aCallId,
   459     iViewCommandHandle->ExecuteCommandL(
   452     iViewCommandHandle->ExecuteCommandL(
   460         EPhoneViewUpdateBubble,
   453         EPhoneViewUpdateBubble,
   461         aCallId,
   454         aCallId,
   462         &headerParam );
   455         &headerParam );
   463 
   456 
   464     TransitionHandlerL().EndUiUpdate();
   457     EndUiUpdate();
   465 
   458 
   466     UpdateInCallCbaL();
   459     UpdateInCallCbaL();
   467     }
   460     }
   468 
   461 
   469 // -----------------------------------------------------------
   462 // -----------------------------------------------------------
   472 //
   465 //
   473 void CPhoneEmergency::HandleConnectedL( TInt aCallId )
   466 void CPhoneEmergency::HandleConnectedL( TInt aCallId )
   474     {
   467     {
   475     __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneEmergency::HandleConnectedL() ");
   468     __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneEmergency::HandleConnectedL() ");
   476 
   469 
   477     TransitionHandlerL().BeginUiUpdateLC();
   470     BeginUiUpdateLC();
   478 
   471 
   479     TPhoneCmdParamCallHeaderData emergencyHeaderParam;
   472     TPhoneCmdParamCallHeaderData emergencyHeaderParam;
   480     emergencyHeaderParam.SetCallState( EPEStateConnected );
   473     emergencyHeaderParam.SetCallState( EPEStateConnected );
   481     // Notify the view
   474     // Notify the view
   482     iViewCommandHandle->ExecuteCommandL(
   475     iViewCommandHandle->ExecuteCommandL(
   483         EPhoneViewUpdateBubble,
   476         EPhoneViewUpdateBubble,
   484         aCallId,
   477         aCallId,
   485         &emergencyHeaderParam );
   478         &emergencyHeaderParam );
   486 
   479 
   487     TransitionHandlerL().EndUiUpdate();
   480     EndUiUpdate();
   488     SetToolbarDimming( ETrue );
   481     SetToolbarDimming( ETrue );
   489     UpdateInCallCbaL();
   482     UpdateInCallCbaL();
   490     }
   483     }
   491 
   484 
   492 // -----------------------------------------------------------
   485 // -----------------------------------------------------------