phoneapp/phoneuicontrol/src/cphonestateidle.cpp
changeset 22 6bb1b21d2484
parent 21 92ab7f8d0eab
child 51 f39ed5e045e0
equal deleted inserted replaced
21:92ab7f8d0eab 22:6bb1b21d2484
    25 #include <aknnotedialog.h> // For CAknNoteDialog::EErrorTone
    25 #include <aknnotedialog.h> // For CAknNoteDialog::EErrorTone
    26 #include <apgcli.h>
    26 #include <apgcli.h>
    27 #include <telephonyvariant.hrh>
    27 #include <telephonyvariant.hrh>
    28 #include <featmgr.h>
    28 #include <featmgr.h>
    29 #include <settingsinternalcrkeys.h>
    29 #include <settingsinternalcrkeys.h>
    30 #include <ScreensaverInternalPSKeys.h>
       
    31 #include <mpeengineinfo.h>
    30 #include <mpeengineinfo.h>
    32 #include <activeidle2domainpskeys.h>
    31 #include <activeidle2domainpskeys.h>
    33 #include <mpeclientinformation.h>
    32 #include <mpeclientinformation.h>
    34 #include <bldvariant.hrh>
    33 #include <bldvariant.hrh>
    35 
    34 
    54 #include "cphonemainresourceresolver.h"
    53 #include "cphonemainresourceresolver.h"
    55 #include "cphonecenrepproxy.h"
    54 #include "cphonecenrepproxy.h"
    56 #include "cphonepubsubproxy.h"
    55 #include "cphonepubsubproxy.h"
    57 #include "phonelogger.h"
    56 #include "phonelogger.h"
    58 #include "phoneui.pan"
    57 #include "phoneui.pan"
    59 // <-- QT PHONE START --> 
       
    60 //#include "phoneconstants.h"
       
    61 //#include <activeidle2domainpskeys.h>
       
    62 // <-- QT PHONE END --> 
       
    63 #include "mphonecustomization.h"
    58 #include "mphonecustomization.h"
    64 
    59 
    65 //CONSTANTS
    60 //CONSTANTS
    66 const TInt  KMaxParamLength = 1024;
    61 const TInt  KMaxParamLength = 1024;
    67 
    62 
   392     HandleAudioAvailableOutputChangedL();
   387     HandleAudioAvailableOutputChangedL();
   393     
   388     
   394     iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNaviPaneAudioVolume );
   389     iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNaviPaneAudioVolume );
   395 
   390 
   396     SetRingingTonePlaybackL( aCallId );
   391     SetRingingTonePlaybackL( aCallId );
   397     
   392 
   398     CPhonePubSubProxy::Instance()->ChangePropertyValue(
       
   399         KPSUidScreenSaver,
       
   400         KScreenSaverAllowScreenSaver,
       
   401         EPhoneScreensaverNotAllowed );
       
   402     
       
   403     BeginTransEffectLC( ENumberEntryClose );
   393     BeginTransEffectLC( ENumberEntryClose );
   404     BeginUiUpdateLC();
   394     BeginUiUpdateLC();
   405     
   395     
   406     // Hide the number entry if it exists
   396     // Hide the number entry if it exists
   407     if ( IsNumberEntryUsedL() )
   397     if ( IsNumberEntryUsedL() )
   408         {
   398         {
   409         SetNumberEntryVisibilityL(EFalse);    
   399         SetNumberEntryVisibilityL(EFalse);    
   410         }
   400         }
   411      
   401      
   412     // Close fast swap window if it's displayed
       
   413 // <-- QT PHONE START --> 
       
   414 //    CEikonEnv::Static()->DismissTaskList();
       
   415 
       
   416 
       
   417     // Display incoming call
   402     // Display incoming call
   418     DisplayIncomingCallL( aCallId );
   403     DisplayIncomingCallL( aCallId );
   419     
   404     
   420     // Show incoming call buttons
   405     // Show incoming call buttons
   421     SetTouchPaneButtons( EPhoneIncomingCallButtons );
   406     SetTouchPaneButtons( EPhoneIncomingCallButtons );
   422     
   407     
   423 // <-- QT PHONE END --> 
       
   424 
       
   425     // Disable HW keys and Call UI if needed
   408     // Disable HW keys and Call UI if needed
   426     CheckDisableHWKeysAndCallUIL();
   409     CheckDisableHWKeysAndCallUIL();
       
   410     
       
   411     SetBackButtonActive(EFalse);
   427     
   412     
   428     EndUiUpdate();
   413     EndUiUpdate();
   429     
   414     
   430     EndTransEffect();
   415     EndTransEffect();
   431     
   416     
   456     BeginTransEffectLC( ENumberEntryClose );
   441     BeginTransEffectLC( ENumberEntryClose );
   457     BeginUiUpdateLC();
   442     BeginUiUpdateLC();
   458     
   443     
   459     SetNumberEntryVisibilityL(EFalse);
   444     SetNumberEntryVisibilityL(EFalse);
   460 
   445 
   461     // <-- QT PHONE START -->
       
   462     // Display call setup 
   446     // Display call setup 
   463     DisplayCallSetupL( aCallId );  
   447     DisplayCallSetupL( aCallId );  
   464     
   448     
   465     // Show call setup buttons
   449     // Show call setup buttons
   466     SetTouchPaneButtons( EPhoneCallSetupButtons );          
   450     SetTouchPaneButtons( EPhoneCallSetupButtons );          
   467     // <-- QT PHONE END -->
       
   468     
   451     
   469     EndUiUpdate();
   452     EndUiUpdate();
   470     
   453     
   471     // Remove any phone dialogs if they are displayed
   454     // Remove any phone dialogs if they are displayed
   472     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
   455     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
   839 // CPhoneStateIdle::HandlePhoneForegroundEventL
   822 // CPhoneStateIdle::HandlePhoneForegroundEventL
   840 // -----------------------------------------------------------
   823 // -----------------------------------------------------------
   841 
   824 
   842 EXPORT_C void CPhoneStateIdle::HandlePhoneForegroundEventL()
   825 EXPORT_C void CPhoneStateIdle::HandlePhoneForegroundEventL()
   843     {
   826     {
   844 // <-- QT PHONE START --> 
       
   845     /*__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::HandlePhoneForegroundEventL( ) ");
       
   846     
       
   847     TPhoneCmdParamBoolean isSecurityMode;      
       
   848     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetSecurityModeStatus, &isSecurityMode );
       
   849 
       
   850     TBool activatePhone = CPhonePubSubProxy::Instance()->Value(
       
   851                     KPSUidAiInformation, KActiveIdleState ) == EPSAiNumberEntry;
       
   852     
       
   853     if ( activatePhone )
       
   854         {
       
   855         // If activatePhone is true then user has pressed some numeric
       
   856         // key and icon must be set to FSW. In this case number entry is not yet open so it
       
   857         // it is not enough to call EPhoneViewUpdateFSW.
       
   858         iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdatePhoneIconToFSW );
       
   859         }
       
   860     // If number entry is used update FSW accordingly.
       
   861     else if ( IsNumberEntryUsedL() )
       
   862         {
       
   863         // If numberentry is used then we need to call EPhoneViewSetDialerControlVisible 
       
   864         // to ensure that numberentry/dialler is drawn to UI.
       
   865         TPhoneViewResponseId respond = 
       
   866             iViewCommandHandle->HandleCommandL( EPhoneViewSetDialerControlVisible );
       
   867         
       
   868         if ( respond && IsNumberEntryVisibleL() )
       
   869             {
       
   870             // Set Number Entry CBA
       
   871             iCbaManager->SetCbaL( EPhoneNumberAcqCBA );
       
   872             }
       
   873         
       
   874         // If dialer is open add icon to FSW list.
       
   875         iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateFSW );
       
   876         }
       
   877     else if ( !IsNumberEntryUsedL() && !isSecurityMode.Boolean() )
       
   878         {
       
   879         // Bring Idle app to the foreground
       
   880         iViewCommandHandle->ExecuteCommandL( EPhoneViewBringIdleToForeground );
       
   881         }*/
       
   882 // <-- QT PHONE END --> 
       
   883     }
   827     }
   884 
   828 
   885 // -----------------------------------------------------------
   829 // -----------------------------------------------------------
   886 // CPhoneStateIdle::HandlePhoneFocusLostEventL
   830 // CPhoneStateIdle::HandlePhoneFocusLostEventL
   887 // -----------------------------------------------------------
   831 // -----------------------------------------------------------
  1088     keyEvent.iModifiers = 0;
  1032     keyEvent.iModifiers = 0;
  1089     keyEvent.iRepeats = 0;
  1033     keyEvent.iRepeats = 0;
  1090     wsSession.SimulateKeyEvent( keyEvent );
  1034     wsSession.SimulateKeyEvent( keyEvent );
  1091     wsSession.Flush();  
  1035     wsSession.Flush();  
  1092 
  1036 
  1093 // <-- QT PHONE START -->     
       
  1094     iViewCommandHandle->ExecuteCommandL( EPhoneAppShutDown );
  1037     iViewCommandHandle->ExecuteCommandL( EPhoneAppShutDown );
  1095 // <-- QT PHONE END --> 
       
  1096     }
  1038     }
  1097 
  1039 
  1098 // -----------------------------------------------------------
  1040 // -----------------------------------------------------------
  1099 // CPhoneStateIdle::HandleEndKeyPressL
  1041 // CPhoneStateIdle::HandleEndKeyPressL
  1100 // -----------------------------------------------------------
  1042 // -----------------------------------------------------------