phoneapp/phoneuistates/src/cphonetwosingles.cpp
branchRCL_3
changeset 81 c26cc2a7c548
parent 69 8baf28733c3d
equal deleted inserted replaced
73:e30d4a1b8bad 81:c26cc2a7c548
    74 EXPORT_C void CPhoneTwoSingles::ConstructL()
    74 EXPORT_C void CPhoneTwoSingles::ConstructL()
    75     {
    75     {
    76     CPhoneGsmInCall::ConstructL();
    76     CPhoneGsmInCall::ConstructL();
    77     
    77     
    78     // Re-enable global notes
    78     // Re-enable global notes
    79     TPhoneCmdParamBoolean globalNotifierParam;
    79     EnableGlobalNotifiersL();
    80     globalNotifierParam.SetBoolean( EFalse );
       
    81     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
       
    82         &globalNotifierParam );
       
    83     
    80     
    84     CPhonePubSubProxy::Instance()->ChangePropertyValue(
    81     CPhonePubSubProxy::Instance()->ChangePropertyValue(
    85                     KPSUidScreenSaver,
    82                     KPSUidScreenSaver,
    86                     KScreenSaverAllowScreenSaver,
    83                     KScreenSaverAllowScreenSaver,
    87                     EPhoneScreensaverAllowed );
    84                     EPhoneScreensaverAllowed );
   193 //    
   190 //    
   194 void CPhoneTwoSingles::HandleIdleL( TInt aCallId )
   191 void CPhoneTwoSingles::HandleIdleL( TInt aCallId )
   195     {
   192     {
   196     __LOGMETHODSTARTEND( EPhoneUIStates, 
   193     __LOGMETHODSTARTEND( EPhoneUIStates, 
   197         "CPhoneTwoSingles::HandleIdleL()");
   194         "CPhoneTwoSingles::HandleIdleL()");
   198     TransitionHandlerL().BeginUiUpdateLC();
   195     BeginUiUpdateLC();
   199 
   196 
   200     // Remove call 
   197     // Remove call 
   201     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
   198     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
   202 
   199 
   203     TPhoneCmdParamInteger activeCallCount;
   200     TPhoneCmdParamInteger activeCallCount;
   243             }
   240             }
   244             
   241             
   245         default:
   242         default:
   246             break;
   243             break;
   247         }
   244         }
   248     TransitionHandlerL().EndUiUpdate(); 
   245     EndUiUpdate(); 
   249     }
   246     }
   250 
   247 
   251 // -----------------------------------------------------------
   248 // -----------------------------------------------------------
   252 // CPhoneTwoSingles::HandleKeyMessageL
   249 // CPhoneTwoSingles::HandleKeyMessageL
   253 // -----------------------------------------------------------
   250 // -----------------------------------------------------------
   353     StringLoader::Load( 
   350     StringLoader::Load( 
   354         conferenceText, 
   351         conferenceText, 
   355         callLabelId, 
   352         callLabelId, 
   356         CCoeEnv::Static() );
   353         CCoeEnv::Static() );
   357     callHeaderParam.SetCLIText( conferenceText, CBubbleManager::ERight );
   354     callHeaderParam.SetCLIText( conferenceText, CBubbleManager::ERight );
   358     TransitionHandlerL().BeginUiUpdateLC();
   355     BeginUiUpdateLC();
   359     
   356     
   360     callHeaderParam.SetCiphering(
   357     callHeaderParam.SetCiphering(
   361         iStateMachine->PhoneEngineInfo()->IsSecureCall( aCallId ) );
   358         iStateMachine->PhoneEngineInfo()->IsSecureCall( aCallId ) );
   362         
   359         
   363     callHeaderParam.SetCipheringIndicatorAllowed(
   360     callHeaderParam.SetCipheringIndicatorAllowed(
   376     holdFlag.SetBoolean( EFalse );
   373     holdFlag.SetBoolean( EFalse );
   377     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
   374     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
   378 
   375 
   379     SetTouchPaneButtons( EPhoneConferenceButtons );
   376     SetTouchPaneButtons( EPhoneConferenceButtons );
   380     SetTouchPaneButtonEnabled( EPhoneInCallCmdPrivate );
   377     SetTouchPaneButtonEnabled( EPhoneInCallCmdPrivate );
   381     TransitionHandlerL().EndUiUpdate();
   378     EndUiUpdate();
   382     
   379     
   383     UpdateCbaL( EPhoneCallHandlingInCallCBA );
   380     UpdateCbaL( EPhoneCallHandlingInCallCBA );
       
   381     
       
   382     // Go to conference state
   384     // No need for CBA update
   383     // No need for CBA update
   385     iStateMachine->ChangeState( EPhoneStateConference );
   384     iStateMachine->ChangeState( EPhoneStateConference );
   386     }
   385     }
   387 
   386 
   388 // -----------------------------------------------------------
   387 // -----------------------------------------------------------
   390 // -----------------------------------------------------------
   389 // -----------------------------------------------------------
   391 //
   390 //
   392 void CPhoneTwoSingles::HandleIncomingL( TInt aCallId )
   391 void CPhoneTwoSingles::HandleIncomingL( TInt aCallId )
   393     {
   392     {
   394     __LOGMETHODSTARTEND( EPhoneUIStates, 
   393     __LOGMETHODSTARTEND( EPhoneUIStates, 
   395             "CPhoneTwoSingles::HandleIncomingL()");
   394         "CPhoneTwoSingles::HandleIncomingL()");
       
   395     
   396     CPhonePubSubProxy::Instance()->ChangePropertyValue(
   396     CPhonePubSubProxy::Instance()->ChangePropertyValue(
   397                     KPSUidScreenSaver,
   397                     KPSUidScreenSaver,
   398                     KScreenSaverAllowScreenSaver,
   398                     KScreenSaverAllowScreenSaver,
   399                     EPhoneScreensaverNotAllowed );
   399                     EPhoneScreensaverNotAllowed );
   400     TransitionHandlerL().IncomingCallUiUpdateLC();
   400     
       
   401     IsNumberEntryUsedL() ? 
       
   402         BeginTransEffectLC( ECallUiAppear ) :
       
   403         BeginTransEffectLC( ENumberEntryOpen );
       
   404     BeginUiUpdateLC();
   401     
   405     
   402     // Hide the number entry if it exists
   406     // Hide the number entry if it exists
   403     if ( IsNumberEntryUsedL() )
   407     if ( IsNumberEntryUsedL() )
   404         {
   408         {
   405         SetNumberEntryVisibilityL( EFalse );    
   409         SetNumberEntryVisibilityL( EFalse );    
   406         }
   410         }
   407     
   411     
   408     // Get allow waiting call header param value.
       
   409     TPhoneCmdParamBoolean dialerParam;
   412     TPhoneCmdParamBoolean dialerParam;
   410     dialerParam.SetBoolean( ETrue );
   413     dialerParam.SetBoolean( ETrue );
       
   414     
       
   415     // Get allow waiting call header param value.
   411     AllowShowingOfWaitingCallHeaderL( dialerParam );
   416     AllowShowingOfWaitingCallHeaderL( dialerParam );
   412     
   417     
   413     // Close fast swap window if it's displayed
   418     // Close fast swap window if it's displayed
   414     EikonEnv()->DismissTaskList();
   419     CEikonEnv::Static()->DismissTaskList();
   415 
   420 
       
   421     // Display incoming call
   416     DisplayIncomingCallL( aCallId, dialerParam );
   422     DisplayIncomingCallL( aCallId, dialerParam );
   417     
   423     
   418     // Set touch controls
   424     // Set touch controls
   419     SetTouchPaneButtonDisabled( EPhoneCallComingCmdAnswer );
   425     SetTouchPaneButtonDisabled( EPhoneCallComingCmdAnswer );
       
   426     
   420     SetTouchPaneButtons( EPhoneWaitingCallButtons );
   427     SetTouchPaneButtons( EPhoneWaitingCallButtons );
   421 
   428 
   422     TransitionHandlerL().EndUiUpdateAndEffect();
   429     EndUiUpdate();
   423 
   430     EndTransEffect();
       
   431 
       
   432     // Go to incoming state
   424     UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   433     UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   425     iStateMachine->ChangeState( EPhoneStateTwoSinglesAndWaiting );        
   434     iStateMachine->ChangeState( EPhoneStateTwoSinglesAndWaiting );        
   426     }
   435     }
   427 
   436 
   428 // -----------------------------------------------------------
   437 // -----------------------------------------------------------
   429 // CPhoneTwoSingles::DisplayIncomingCallL
   438 // CPhoneTwoSingles::DisplayIncomingCallL
   430 // -----------------------------------------------------------
   439 // -----------------------------------------------------------
   431 //
   440 //
   432 void CPhoneTwoSingles::DisplayIncomingCallL( 
   441 void CPhoneTwoSingles::DisplayIncomingCallL( 
   433     TInt aCallId, 
   442     TInt aCallId, 
   434     const TPhoneCmdParamBoolean /*aCommandParam*/ )
   443     const TPhoneCmdParamBoolean aCommandParam )
   435     {
   444     {
   436     __LOGMETHODSTARTEND( EPhoneUIStates,
   445     __LOGMETHODSTARTEND( EPhoneUIStates,
   437          "CPhoneTwoSingles::DisplayIncomingCallL()"); 
   446          "CPhoneTwoSingles::DisplayIncomingCallL()"); 
   438     // Close menu bar, if it is displayed
   447     // Close menu bar, if it is displayed
   439     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
   448     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
   441     // Remove any phone dialogs if they are displayed
   450     // Remove any phone dialogs if they are displayed
   442     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
   451     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
   443 
   452 
   444     // Indicate that the Phone needs to be sent to the background if
   453     // Indicate that the Phone needs to be sent to the background if
   445     // an application other than the top application is in the foreground
   454     // an application other than the top application is in the foreground
   446     SetNeedToReturnToForegroundAppStatusL( !TopAppIsDisplayedL() );
   455     TPhoneCmdParamBoolean booleanParam;
       
   456     booleanParam.SetBoolean( !TopAppIsDisplayedL() );
       
   457     iViewCommandHandle->ExecuteCommandL( 
       
   458         EPhoneViewSetNeedToReturnToForegroundAppStatus,
       
   459         &booleanParam );
   447 
   460 
   448     // Bring Phone app in the foreground
   461     // Bring Phone app in the foreground
   449     TPhoneCmdParamInteger uidParam;
   462     TPhoneCmdParamInteger uidParam;
   450     uidParam.SetInteger( KUidPhoneApplication.iUid );
   463     uidParam.SetInteger( KUidPhoneApplication.iUid );
   451     iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,
   464     iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,