phoneapp/phoneuicontrol/src/cphonestateidle.cpp
branchRCL_3
changeset 58 40a3f856b14d
parent 57 94dc1107e8b2
child 61 41a7f70b3818
equal deleted inserted replaced
57:94dc1107e8b2 58:40a3f856b14d
    75 EXPORT_C CPhoneStateIdle::CPhoneStateIdle( 
    75 EXPORT_C CPhoneStateIdle::CPhoneStateIdle( 
    76     MPhoneStateMachine* aStateMachine, 
    76     MPhoneStateMachine* aStateMachine, 
    77     MPhoneViewCommandHandle* aViewCommandHandle,
    77     MPhoneViewCommandHandle* aViewCommandHandle,
    78     MPhoneCustomization* aCustomization ) : 
    78     MPhoneCustomization* aCustomization ) : 
    79     CPhoneState( aStateMachine, aViewCommandHandle, aCustomization ),
    79     CPhoneState( aStateMachine, aViewCommandHandle, aCustomization ),
    80     iBubbleInitialized( EFalse )
    80     iCallInitialized( EFalse )
    81     {
    81     {
    82     }
    82     }
    83 
    83 
    84 // Destructor
    84 // Destructor
    85 EXPORT_C CPhoneStateIdle::~CPhoneStateIdle()
    85 EXPORT_C CPhoneStateIdle::~CPhoneStateIdle()
   100     boolean.SetBoolean( ETrue );
   100     boolean.SetBoolean( ETrue );
   101     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetSendKeyDialerActivationFlag, 
   101     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetSendKeyDialerActivationFlag, 
   102                 &boolean );
   102                 &boolean );
   103     
   103     
   104     iViewCommandHandle->ExecuteCommandL( EPhoneViewCreatePhoneBookServices ); 
   104     iViewCommandHandle->ExecuteCommandL( EPhoneViewCreatePhoneBookServices ); 
       
   105 
       
   106     // If Sim is not ok and we are not at foreground, bring ourselves to foreground
       
   107     // so that the security note can be seen.
       
   108     TPhoneCmdParamInteger foregroundAppParam;
       
   109     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetForegroundApplication,
       
   110                                          &foregroundAppParam );
       
   111 
       
   112     if ( !IsSimOk() )
       
   113         {
       
   114         TPhoneCmdParamInteger uidParam;
       
   115         // Bring Phone app in the foreground
       
   116         uidParam.SetInteger( KUidPhoneApplication.iUid );
       
   117         iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,
       
   118             &uidParam );
       
   119 
       
   120         // Set Phone as the top application
       
   121         iViewCommandHandle->ExecuteCommandL( EPhoneViewSetTopApplication,
       
   122             &uidParam );
       
   123         }
   105     }
   124     }
   106 
   125 
   107 // -----------------------------------------------------------
   126 // -----------------------------------------------------------
   108 // CPhoneStateIdle::NewL()
   127 // CPhoneStateIdle::NewL()
   109 // -----------------------------------------------------------
   128 // -----------------------------------------------------------
   333     {
   352     {
   334     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::HandlePhoneEngineMessageL( ) ");
   353     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::HandlePhoneEngineMessageL( ) ");
   335     switch ( aMessage )
   354     switch ( aMessage )
   336         {
   355         {
   337         case MEngineMonitor::EPEMessageInitiatedMoCall:
   356         case MEngineMonitor::EPEMessageInitiatedMoCall:
   338            if( !IsBubbleInitialized() &&
   357             SetCallInitialized( ETrue );
   339               ( EPECallTypeCSVoice == 
       
   340                 iStateMachine->PhoneEngineInfo()->CallType(aCallId) ) )
       
   341                 {
       
   342                 // Display call setup ASAP.
       
   343                 DisplayInitializingCallL( aCallId );
       
   344                 }
       
   345             break;
   358             break;
   346                     
   359                     
   347         case MEngineMonitor::EPEMessageIncoming:
   360         case MEngineMonitor::EPEMessageIncoming:
   348             HandleIncomingL( aCallId );
   361             HandleIncomingL( aCallId );
   349             break;
   362             break;
   383         case MEngineMonitor::EPEMessageIdle:
   396         case MEngineMonitor::EPEMessageIdle:
   384             HandleIdleL( aCallId );
   397             HandleIdleL( aCallId );
   385             break;
   398             break;
   386             
   399             
   387         case MEngineMonitor::EPEMessageInValidEmergencyNumber:
   400         case MEngineMonitor::EPEMessageInValidEmergencyNumber:
   388             // if sim is ok then there is no need show this note.
   401             SendGlobalWarningNoteL( EPhoneEmergencyCallsOnly );
   389             if ( !IsSimOk() )
       
   390                 {
       
   391                 SendGlobalWarningNoteL( EPhoneEmergencyCallsOnly );
       
   392                 }
       
   393             break;
   402             break;
   394             
   403             
   395         case MEngineMonitor::EPEMessageValidEmergencyNumber:
   404         case MEngineMonitor::EPEMessageValidEmergencyNumber:
   396             /* DisplayInitializingCallL calls EPEMessageCheckEmergencyNumber which
   405             DialVoiceCallL();
   397             means that engine will send EPEMessageInValidEmergencyNumber or
       
   398             EPEMessageValidEmergencyNumber response to phoneapp. If phoneengine
       
   399             sends EPEMessageValidEmergencyNumber then iBubbleInitialized should be
       
   400             set to EFalse this way we dont initializing call bubble behind attempting emergency 
       
   401             call dialog.*/
       
   402             if ( IsBubbleInitialized() )
       
   403                 {
       
   404                 SetBubbleInitialized( EFalse );
       
   405                 }
       
   406             else
       
   407                 {
       
   408                 DialVoiceCallL();
       
   409                 }
       
   410             break; 
   406             break; 
   411         
   407         
   412         default:
   408         default:
   413             CPhoneState::HandlePhoneEngineMessageL( aMessage, aCallId );
   409             CPhoneState::HandlePhoneEngineMessageL( aMessage, aCallId );
   414             break;
   410             break;
   434     CPhonePubSubProxy::Instance()->ChangePropertyValue(
   430     CPhonePubSubProxy::Instance()->ChangePropertyValue(
   435         KPSUidScreenSaver,
   431         KPSUidScreenSaver,
   436         KScreenSaverAllowScreenSaver,
   432         KScreenSaverAllowScreenSaver,
   437         EPhoneScreensaverNotAllowed );
   433         EPhoneScreensaverNotAllowed );
   438     
   434     
       
   435     IsNumberEntryUsedL() ? 
       
   436         BeginTransEffectLC( ECallUiAppear ) :
       
   437         BeginTransEffectLC( ENumberEntryOpen );
   439     BeginUiUpdateLC();
   438     BeginUiUpdateLC();
   440     
   439     
   441     // Hide the number entry if it exists
   440     // Hide the number entry if it exists
   442     if ( IsNumberEntryUsedL() )
   441     if ( IsNumberEntryUsedL() )
   443         {
   442         {
   444         SetNumberEntryVisibilityL(EFalse);    
   443         SetNumberEntryVisibilityL(EFalse);    
   445         }
   444         }
   446      
   445      
   447     // Close fast swap window if it's displayed
   446     // Close fast swap window if it's displayed
   448     CEikonEnv::Static()->DismissTaskList();
   447     EikonEnv()->DismissTaskList();
   449 
   448 
   450     // Show incoming call buttons
   449     // Show incoming call buttons
   451     SetTouchPaneButtons( EPhoneIncomingCallButtons );
   450     SetTouchPaneButtons( EPhoneIncomingCallButtons );
   452     SetTouchPaneButtonEnabled( EPhoneCallComingCmdSilent );
   451     SetTouchPaneButtonEnabled( EPhoneCallComingCmdSilent );
   453     SetTouchPaneButtonEnabled( EPhoneInCallCmdHold );
   452     SetTouchPaneButtonEnabled( EPhoneInCallCmdHold );
   454     
   453     
   455     // Display incoming call
   454     // Display incoming call
   456     DisplayIncomingCallL( aCallId );
   455     DisplayIncomingCallL( aCallId );
   457 
   456 
   458     EndUiUpdate();
   457     EndUiUpdate();
       
   458     EndTransEffect();
   459     
   459     
   460     // Go to incoming state
   460     // Go to incoming state
   461     iCbaManager->UpdateIncomingCbaL( aCallId );
   461     iCbaManager->UpdateIncomingCbaL( aCallId );
   462     UpdateSilenceButtonDimming();
   462     UpdateSilenceButtonDimming();
   463     UpdateIncomingContextMenuL( aCallId );
   463     UpdateIncomingContextMenuL( aCallId );
   465     SetToolbarDimming( ETrue );
   465     SetToolbarDimming( ETrue );
   466     //request that dimmed toolbar is visible.
   466     //request that dimmed toolbar is visible.
   467     iViewCommandHandle->HandleCommandL( EPhoneViewShowToolbar );
   467     iViewCommandHandle->HandleCommandL( EPhoneViewShowToolbar );
   468     
   468     
   469     ChangeTo( EPhoneStateIncoming );
   469     ChangeTo( EPhoneStateIncoming );
   470          
   470     }
   471     // Reset divert indication
   471 
   472     SetDivertIndication( EFalse );
   472 // -----------------------------------------------------------
   473     }
   473 // CPhoneStateIdle::HandleDialingL
   474 
       
   475 // -----------------------------------------------------------
       
   476 // CPhoneStateIdle::HandleDiallingL
       
   477 // Default handling for dialling message
   474 // Default handling for dialling message
   478 // (other items were commented in a header).
   475 // (other items were commented in a header).
   479 // -----------------------------------------------------------
   476 // -----------------------------------------------------------
   480 //
   477 //
   481 EXPORT_C void CPhoneStateIdle::HandleDialingL( TInt aCallId )
   478 EXPORT_C void CPhoneStateIdle::HandleDialingL( TInt aCallId )
   482     {
   479     {    
   483     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::HandleDialingL( ) ");
   480     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::HandleDialingL( ) ");
   484     if( IsBubbleInitialized() )
   481     // Indicate that the Phone needs to be sent to the background if
   485         {
   482     // an application other than phone or idle application is in the foreground
   486         UpdateCallBubbleL( aCallId );
   483     SetNeedToReturnToForegroundAppStatusL( !TopAppIsDisplayedL() );
   487         }
   484    
   488     else
   485     DisplayCallSetupL( aCallId );
   489         {
       
   490         ShowCallHandlingViewL( aCallId );
       
   491         }
       
   492     ChangeTo( EPhoneStateCallSetup );
   486     ChangeTo( EPhoneStateCallSetup );
   493     }
   487     }
   494 
   488 
   495 // -----------------------------------------------------------
   489 // -----------------------------------------------------------
   496 // CPhoneStateIdle::ShowCallHandlingViewL
   490 // CPhoneStateIdle::DoStateSpecificCallSetUpDefinitionsL
   497 // -----------------------------------------------------------
   491 // -----------------------------------------------------------
   498 //
   492 //
   499 void CPhoneStateIdle::ShowCallHandlingViewL( TInt aCallId )
   493 EXPORT_C void CPhoneStateIdle::DoStateSpecificCallSetUpDefinitionsL()
   500     {
   494     {
   501     __LOGMETHODSTARTEND(EPhoneControl, 
       
   502             "CPhoneStateIdle::ShowCallHandlingViewL( ) ");
       
   503     BeginUiUpdateLC();
       
   504     SetNumberEntryVisibilityL(EFalse);
       
   505 
       
   506     // Show call setup buttons
   495     // Show call setup buttons
   507     SetTouchPaneButtons( EPhoneCallSetupButtons );
   496     SetTouchPaneButtons( EPhoneCallSetupButtons );
   508     SetTouchPaneButtonDisabled( EPhoneInCallCmdHold );
   497     SetTouchPaneButtonDisabled( EPhoneInCallCmdHold );
   509     
       
   510     // Display call setup 
       
   511     DisplayCallSetupL( aCallId );
       
   512     EndUiUpdate();
       
   513     
       
   514     // Remove any phone dialogs if they are displayed
       
   515     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
       
   516     
       
   517     // Go to call setup state
       
   518     iCbaManager->UpdateCbaL( EPhoneCallHandlingCallSetupCBA );
       
   519 
   498 
   520     SetToolbarDimming( ETrue );
   499     SetToolbarDimming( ETrue );
   521     SetToolbarButtonLoudspeakerEnabled();
   500     SetToolbarButtonLoudspeakerEnabled();
   522     SetToolbarButtonHandsetEnabled();
   501     SetToolbarButtonHandsetEnabled();
       
   502     SetToolbarButtonBTHFEnabled();
   523     }
   503     }
   524 
   504 
   525 // -----------------------------------------------------------
   505 // -----------------------------------------------------------
   526 // CPhoneStateIdle::HandleConnectedL
   506 // CPhoneStateIdle::HandleConnectedL
   527 // Message Handling function for message EPEMessageConnected
   507 // Message Handling function for message EPEMessageConnected
   541         TPhoneCmdParamInteger uidParam;
   521         TPhoneCmdParamInteger uidParam;
   542         uidParam.SetInteger( KUidPhoneApplication.iUid );
   522         uidParam.SetInteger( KUidPhoneApplication.iUid );
   543         iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, 
   523         iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, 
   544             &uidParam );
   524             &uidParam );
   545         }
   525         }
   546  
   526     BeginTransEffectLC( ENumberEntryClose );
   547     BeginUiUpdateLC();
   527     BeginUiUpdateLC();
   548             
   528     
   549     // Remove the number entry
   529     // Remove the number entry
   550     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
   530     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
   551  
   531  
   552     // Display call setup header
   532     // Display call setup header
   553     DisplayCallSetupL( aCallId );
   533     DisplayCallSetupL( aCallId );
   558     // Update touch buttons
   538     // Update touch buttons
   559     SetTouchPaneButtons( EPhoneIncallButtons );
   539     SetTouchPaneButtons( EPhoneIncallButtons );
   560     SetToolbarDimming( EFalse );
   540     SetToolbarDimming( EFalse );
   561     
   541     
   562     EndUiUpdate();
   542     EndUiUpdate();
       
   543     EndTransEffect();
   563   
   544   
   564     // Go to single state
   545     // Go to single state
   565     iCbaManager->UpdateCbaL( EPhoneCallHandlingInCallCBA );
   546     iCbaManager->UpdateCbaL( EPhoneCallHandlingInCallCBA );
   566     ChangeTo( EPhoneStateSingle );
   547     ChangeTo( EPhoneStateSingle );
   567     }
   548     }
   578     switch( aCommand )
   559     switch( aCommand )
   579         {
   560         {
   580         case EPhoneCmdOptions:
   561         case EPhoneCmdOptions:
   581             {
   562             {
   582             // Open number entry menubar
   563             // Open number entry menubar
   583             TPhoneCmdParamInteger integerParam;  
       
   584                       
       
   585             TInt menuId( GetNumberAcqMenuIdL() );
   564             TInt menuId( GetNumberAcqMenuIdL() );
   586             integerParam.SetInteger( menuId );   
   565             TPhoneCmdParamInteger integerParam;
   587 
   566             integerParam.SetInteger( menuId );
   588             iViewCommandHandle->ExecuteCommandL( 
   567             iViewCommandHandle->ExecuteCommandL( 
   589                 EPhoneViewMenuBarOpen, &integerParam );
   568                 EPhoneViewMenuBarOpen, &integerParam );
   590             break;
   569             }
   591             }
   570             break;
   592         
       
   593         case EPhoneNumberAcqCmdCall:
   571         case EPhoneNumberAcqCmdCall:
   594             HandleVoiceCallCommandL( EFalse );
   572             HandleVoiceCallCommandL( EFalse );
   595             break;
   573             break;
   596         case EPhoneNumberAcqCmdSendCommand:
   574         case EPhoneNumberAcqCmdSendCommand:
   597             HandleSendCommandL();
   575             HandleSendCommandL();
   604         case EPhoneCmdBack:
   582         case EPhoneCmdBack:
   605             BeginTransEffectLC( ENumberEntryClose );
   583             BeginTransEffectLC( ENumberEntryClose );
   606             HandleBackCommandL();
   584             HandleBackCommandL();
   607             EndTransEffect();
   585             EndTransEffect();
   608             break;
   586             break;
       
   587         
       
   588         case EPhoneViewOpenNumberEntry:
       
   589             BeginTransEffectLC( ENumberEntryOpen );
       
   590             commandStatus = CPhoneState::HandleCommandL( aCommand );
       
   591             EndTransEffect();
       
   592             break;
   609             
   593             
   610         default:
   594         default:
   611             commandStatus = CPhoneState::HandleCommandL( aCommand );
   595             commandStatus = CPhoneState::HandleCommandL( aCommand );
   612             break;
   596             break;
   613         }
   597         }
   614 
       
   615     return commandStatus;
   598     return commandStatus;
   616 
       
   617     }
   599     }
   618 
   600 
   619 // -----------------------------------------------------------------------------
   601 // -----------------------------------------------------------------------------
   620 // CPhoneStateIdle::ProcessCommandL
   602 // CPhoneStateIdle::ProcessCommandL
   621 // -----------------------------------------------------------------------------
   603 // -----------------------------------------------------------------------------
   635                ResolveResourceID( EPhoneNumberAcqOkMenubar ) );
   617                ResolveResourceID( EPhoneNumberAcqOkMenubar ) );
   636            iViewCommandHandle->ExecuteCommandL( 
   618            iViewCommandHandle->ExecuteCommandL( 
   637                EPhoneViewMenuBarOpen, &integerParam );
   619                EPhoneViewMenuBarOpen, &integerParam );
   638            commandStatus = ETrue;
   620            commandStatus = ETrue;
   639            }
   621            }
   640            break;       
       
   641            
       
   642        case EPhoneViewOpenNumberEntry:   
       
   643            {
       
   644            BeginTransEffectLC( ENumberEntryOpen );
       
   645            commandStatus = CPhoneState::ProcessCommandL( aCommand );
       
   646            EndTransEffect();
       
   647            }
       
   648            break;
   622            break;
   649            
       
   650        default:
   623        default:
   651            commandStatus = CPhoneState::ProcessCommandL( aCommand );
   624            commandStatus = CPhoneState::ProcessCommandL( aCommand );
   652            break;
   625            break;
   653        }
   626        }
   654     return commandStatus;
   627     return commandStatus;
   792     // Capture keys when there is an incoming call
   765     // Capture keys when there is an incoming call
   793     CaptureKeysDuringCallNotificationL( ETrue );
   766     CaptureKeysDuringCallNotificationL( ETrue );
   794 
   767 
   795     // Indicate that the Foreground application needs to be sent to the foreground 
   768     // Indicate that the Foreground application needs to be sent to the foreground 
   796     // after call is ended.
   769     // after call is ended.
   797     TPhoneCmdParamBoolean booleanParam;
   770     SetNeedToReturnToForegroundAppStatusL( !TopAppIsDisplayedL() );
   798     booleanParam.SetBoolean( !TopAppIsDisplayedL() );
   771     
   799     iViewCommandHandle->ExecuteCommandL( 
       
   800         EPhoneViewSetNeedToReturnToForegroundAppStatus,
       
   801         &booleanParam );
       
   802 
       
   803     // Bring Phone app in the foreground
   772     // Bring Phone app in the foreground
   804     TPhoneCmdParamInteger uidParam;
   773     TPhoneCmdParamInteger uidParam;
   805     uidParam.SetInteger( KUidPhoneApplication.iUid );
   774     uidParam.SetInteger( KUidPhoneApplication.iUid );
   806     iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,
   775     iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,
   807         &uidParam );
   776         &uidParam );
   820     
   789     
   821     DisplayHeaderForCallComingInL( aCallId, EFalse ); //not waiting
   790     DisplayHeaderForCallComingInL( aCallId, EFalse ); //not waiting
   822     }
   791     }
   823 
   792 
   824 // -----------------------------------------------------------
   793 // -----------------------------------------------------------
   825 // CPhoneStateIdle::DisplayCallSetupL
       
   826 // -----------------------------------------------------------
       
   827 //
       
   828 EXPORT_C void CPhoneStateIdle::DisplayCallSetupL( TInt aCallId )
       
   829     {
       
   830     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::DisplayCallSetupL( ) ");
       
   831     __ASSERT_DEBUG( aCallId > KErrNotFound, Panic( EPhoneCtrlParameterNotInitialized ) );
       
   832     
       
   833     // Close menu bar, if it is displayed
       
   834     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
       
   835 
       
   836     // Capture keys when the phone is dialling
       
   837     CaptureKeysDuringCallNotificationL( ETrue );
       
   838     
       
   839     // Bring Phone app in the foreground
       
   840     TPhoneCmdParamInteger uidParam;
       
   841     uidParam.SetInteger( KUidPhoneApplication.iUid );
       
   842     iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,
       
   843         &uidParam );
       
   844 
       
   845     // Set Phone as the top application
       
   846     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetTopApplication,
       
   847         &uidParam ); 
       
   848 
       
   849     if( !IsBubbleInitialized() )
       
   850         {
       
   851         // Create and Display call setup header if update was not done.
       
   852         DisplayHeaderForOutgoingCallL( aCallId );
       
   853         }
       
   854     else 
       
   855         {
       
   856         /* Create and Display initializing call header, difference
       
   857         to DisplayHeaderForOutgoingCallL is that this doesnt load 
       
   858         CLI information to header.*/
       
   859         DisplayHeaderForInitializingCallL( aCallId );
       
   860         }
       
   861     }
       
   862 
       
   863 // -----------------------------------------------------------
       
   864 // CPhoneStateIdle::UpdateCallBubbleL
       
   865 // -----------------------------------------------------------
       
   866 //
       
   867 TBool CPhoneStateIdle::UpdateCallBubbleL( TInt aCallId )
       
   868     {
       
   869     __LOGMETHODSTARTEND(EPhoneControl, 
       
   870                 "CPhoneStateIdle::UpdateCallBubbleL( )");
       
   871     TBool retValue(EFalse);
       
   872     if( IsBubbleInitialized() )
       
   873         {
       
   874         // Call bubble is already initialized so it is 
       
   875         // enough just to update existing header with 
       
   876         // contacts,number...etc info.
       
   877         TPhoneCmdParamCallHeaderData callHeaderParam = 
       
   878                 UpdateCallHeaderInfoL( aCallId );
       
   879         iViewCommandHandle->ExecuteCommandL( 
       
   880                 EPhoneViewUpdateCallHeaderRemoteInfoData, 
       
   881                 aCallId, 
       
   882                 &callHeaderParam );
       
   883         // reset flag.
       
   884         SetBubbleInitialized( EFalse );
       
   885         retValue = ETrue;
       
   886         }
       
   887     __PHONELOG1( EBasic, EPhoneControl, 
       
   888             "PhoneUIControl: CPhoneStateIdle::UpdateCallBubbleL - retValue =%d ",
       
   889             retValue );
       
   890     return retValue;
       
   891     }
       
   892 
       
   893 // -----------------------------------------------------------
       
   894 // CPhoneStateIdle::DisplayInitializingCallL
       
   895 // -----------------------------------------------------------
       
   896 //
       
   897 void CPhoneStateIdle::DisplayInitializingCallL( TInt aCallId )
       
   898     {
       
   899     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::DisplayInitializingCallL( )");
       
   900     /*Set flag value to true before SendPhoneEngineMessage because if phone number
       
   901     is emergency number then EPEMessageValidEmergencyNumber message handling sets 
       
   902     iBubbleInitialized to false value and if value is false then initializing call 
       
   903     bubble shouldnt be shown.*/
       
   904     SetBubbleInitialized( ETrue );
       
   905     iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageCheckEmergencyNumber );
       
   906     if ( IsBubbleInitialized() )
       
   907         {
       
   908         ShowCallHandlingViewL( aCallId );
       
   909         }
       
   910     }
       
   911 
       
   912 // -----------------------------------------------------------
       
   913 // CPhoneStateIdle::HandleIdleForegroundEventL
   794 // CPhoneStateIdle::HandleIdleForegroundEventL
   914 // -----------------------------------------------------------
   795 // -----------------------------------------------------------
   915 //
   796 //
   916 EXPORT_C void CPhoneStateIdle::HandleIdleForegroundEventL()
   797 EXPORT_C void CPhoneStateIdle::HandleIdleForegroundEventL()
   917     {
   798     {
   970             }
   851             }
   971         
   852         
   972         // If dialer is open add icon to FSW list.
   853         // If dialer is open add icon to FSW list.
   973         iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateFSW );
   854         iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateFSW );
   974         }
   855         }
   975     /*iBubbleInitialized has to be checked because if it true then phoneapp 
   856     /*iCallInitialized has to be checked because if it true then phoneapp 
   976     is already showing call bubble and we cant bring idle to screen. */
   857     is already initializing call bubble and we cant bring idle to screen. */
   977     else if ( !IsNumberEntryUsedL() && 
   858     else if ( !IsNumberEntryUsedL() && 
   978               !iStateMachine->SecurityMode()->IsSecurityMode() &&
   859               !iStateMachine->SecurityMode()->IsSecurityMode() &&
   979               !IsBubbleInitialized() )
   860               !iCallInitialized )
   980         {
   861         {
   981         // Bring Idle app to the foreground
   862         // Bring Idle app to the foreground
   982         iViewCommandHandle->ExecuteCommandL( EPhoneViewBringIdleToForeground );
   863         iViewCommandHandle->ExecuteCommandL( EPhoneViewBringIdleToForeground );
   983         }
   864         }
   984     }
   865     }
  1002 // -----------------------------------------------------------
   883 // -----------------------------------------------------------
  1003 //
   884 //
  1004 void CPhoneStateIdle::HandleIdleL( TInt /*aCallId*/ )
   885 void CPhoneStateIdle::HandleIdleL( TInt /*aCallId*/ )
  1005     {
   886     {
  1006     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::HandleIdleL()" );
   887     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::HandleIdleL()" );
  1007         
       
  1008     // Remove all call headers
       
  1009     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveAllCallHeaders );
   888     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveAllCallHeaders );
  1010     
   889     CloseClearNumberEntryAndLoadEffectL( ECallUiDisappear );
  1011     // Close number entry
       
  1012     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
       
  1013 
       
  1014     // Remove all notes and dialogs
       
  1015     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
   890     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
  1016     // Reset flag.
   891     // Reset flag.
  1017     SetBubbleInitialized( EFalse );
   892     SetCallInitialized( EFalse );
  1018     }
   893     }
  1019  
   894  
  1020 // -----------------------------------------------------------
   895 // -----------------------------------------------------------
  1021 // CPhoneStateIdle::SpeedDialL
   896 // CPhoneStateIdle::SpeedDialL
  1022 // -----------------------------------------------------------
   897 // -----------------------------------------------------------
  1055     {
   930     {
  1056     __LOGMETHODSTARTEND(EPhoneControl, 
   931     __LOGMETHODSTARTEND(EPhoneControl, 
  1057     "CPhoneStateIdle::RemoveNumberEntryAndSetIdleToBackgroundIfNeededL( ) ");
   932     "CPhoneStateIdle::RemoveNumberEntryAndSetIdleToBackgroundIfNeededL( ) ");
  1058     if ( IsNumberEntryUsedL() )
   933     if ( IsNumberEntryUsedL() )
  1059         {
   934         {
       
   935         BeginTransEffectLC( ECallUiAppear );
  1060         /*NE should be removed because if speeddial dial is interupted during
   936         /*NE should be removed because if speeddial dial is interupted during
  1061         call setup phone should not return to NE/Dialler view.*/
   937         call setup phone should not return to NE/Dialler view.*/
  1062         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
   938         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
  1063         
   939         
  1064         /*It might be possible that some async operation was ongoing and 
   940         /*It might be possible that some async operation was ongoing and 
  1065         state has already in that case do not set idle to background. If 
   941         state has already in that case do not set idle to background.*/
  1066         there is initialized call then do not set idle to background.*/
   942         if ( iStateMachine->State() == this )
  1067         if ( ( iStateMachine->State() == this ) && 
   943             {
  1068             ( !IsBubbleInitialized() ) )
   944             iCbaManager->UpdateCbaL( EPhoneEmptyCBA );
  1069             {
   945             iViewCommandHandle->ExecuteCommandL( EPhoneViewSetIdleTopApplication );
  1070             SetupIdleScreenInBackgroundL();
   946             }
  1071             }
   947         EndTransEffect();
  1072         }
   948         }
  1073     }
   949     }
  1074 
   950 
  1075 // -----------------------------------------------------------
   951 // -----------------------------------------------------------
  1076 // CPhoneStateIdle::SpeedDialCanceledL
   952 // CPhoneStateIdle::SpeedDialCanceledL
  1160         &numberEntryCountParam );
  1036         &numberEntryCountParam );
  1161 
  1037 
  1162     if ( numberEntryCountParam.Integer() == 1 )
  1038     if ( numberEntryCountParam.Integer() == 1 )
  1163         {
  1039         {
  1164         // Remove the number entry window
  1040         // Remove the number entry window
  1165         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
  1041         iViewCommandHandle->ExecuteCommandL( EPhoneViewClearNumberEntryContent );
  1166         
  1042         
  1167         iStateMachine->SendPhoneEngineMessage( 
  1043         iStateMachine->SendPhoneEngineMessage( 
  1168                 MPEPhoneModel::EPEMessageEndDTMF );
  1044                 MPEPhoneModel::EPEMessageEndDTMF );
  1169 
  1045 
  1170         // Launch application.
  1046         // Launch application.
  1171         iViewCommandHandle->ExecuteCommandL(
  1047         iViewCommandHandle->ExecuteCommandL(
  1172             EPhoneViewLaunchApplication );
  1048             EPhoneViewLaunchApplication );
  1173 
  1049 
  1174         // Continue displaying current app but set up the 
       
  1175         // idle screen in the background
       
  1176         SetupIdleScreenInBackgroundL();
       
  1177         }
  1050         }
  1178     }
  1051     }
  1179 
  1052 
  1180 // -----------------------------------------------------------
  1053 // -----------------------------------------------------------
  1181 // CPhoneStateIdle:SendExitCommandL
  1054 // CPhoneStateIdle:SendExitCommandL
  1182 // -----------------------------------------------------------
  1055 // -----------------------------------------------------------
  1183 //
  1056 //
  1184 void CPhoneStateIdle::SendExitCommandL()
  1057 void CPhoneStateIdle::SendExitCommandL()
  1185     {
  1058     {
  1186     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::SendExitCommand( ) ");
  1059     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::SendExitCommand( ) ");
  1187     // Remove number entry from screen
  1060     // Remove number entry from screen 
  1188     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
  1061     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); 
  1189 
  1062 
  1190     // Simulate exit command
  1063     // Simulate exit command 
  1191     CEikonEnv& eikEnv = *CEikonEnv::Static();
  1064     RWsSession& wsSession = EikonEnv()->WsSession(); 
  1192     CCoeEnv& coeEnv = eikEnv;
  1065     TKeyEvent keyEvent; 
  1193     RWsSession& wsSession=coeEnv.WsSession();
  1066     keyEvent.iCode = EEikCmdExit; 
  1194     TKeyEvent keyEvent;
  1067     keyEvent.iScanCode = EEikCmdExit; 
  1195     keyEvent.iCode = EEikCmdExit;
  1068     keyEvent.iModifiers = 0; 
  1196     keyEvent.iScanCode = EEikCmdExit;
  1069     keyEvent.iRepeats = 0; 
  1197     keyEvent.iModifiers = 0;
  1070     wsSession.SimulateKeyEvent( keyEvent ); 
  1198     keyEvent.iRepeats = 0;
  1071     wsSession.Flush(); 
  1199     wsSession.SimulateKeyEvent( keyEvent );
       
  1200     wsSession.Flush();  
       
  1201     }
  1072     }
  1202 
  1073 
  1203 // -----------------------------------------------------------
  1074 // -----------------------------------------------------------
  1204 // CPhoneStateIdle::HandleEndKeyPressL
  1075 // CPhoneStateIdle::HandleEndKeyPressL
  1205 // -----------------------------------------------------------
  1076 // -----------------------------------------------------------
  1234                 iStateMachine->SendPhoneEngineMessage(
  1105                 iStateMachine->SendPhoneEngineMessage(
  1235                         MPEPhoneModel::EPEMessageTerminateAllConnections );   
  1106                         MPEPhoneModel::EPEMessageTerminateAllConnections );   
  1236 
  1107 
  1237                 if ( IsNumberEntryUsedL() )
  1108                 if ( IsNumberEntryUsedL() )
  1238                     {
  1109                     {
  1239                     BeginTransEffectLC( ENumberEntryClose );
  1110                     CloseClearNumberEntryAndLoadEffectL( ENumberEntryClose );
  1240                     // Remove number entry from screen
       
  1241                     iViewCommandHandle->ExecuteCommandL( 
       
  1242                         EPhoneViewRemoveNumberEntry );
       
  1243                     EndTransEffect();
       
  1244                     // Do state-specific operation when number entry is cleared
       
  1245                     HandleNumberEntryClearedL();
       
  1246                     
       
  1247                     // If long end key event occures then all calls are terminated and
  1111                     // If long end key event occures then all calls are terminated and
  1248                     // dialer is closed, therefore tel.icon must be removed from FSW.
  1112                     // dialer is closed, therefore tel.icon must be removed from FSW.
  1249                     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateFSW );
  1113                     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateFSW );
  1250                     }
  1114                     }
  1251                 if ( !TopAppIsDisplayedL() )
  1115                 if ( !TopAppIsDisplayedL() )
  1254                     DisplayIdleScreenL();
  1118                     DisplayIdleScreenL();
  1255                     }
  1119                     }
  1256                 }
  1120                 }
  1257             else if ( IsNumberEntryUsedL() && TopAppIsDisplayedL() )
  1121             else if ( IsNumberEntryUsedL() && TopAppIsDisplayedL() )
  1258                 {
  1122                 {
  1259                 // Remove number entry from screen with effect
  1123                 CloseClearNumberEntryAndLoadEffectL( ENumberEntryClose );
  1260                 BeginTransEffectLC( ENumberEntryClose );
       
  1261                 iViewCommandHandle->ExecuteCommandL( 
       
  1262                     EPhoneViewRemoveNumberEntry );
       
  1263                 EndTransEffect();
       
  1264                 // Do state-specific operation when number entry is cleared
       
  1265                 HandleNumberEntryClearedL();
       
  1266                 }
  1124                 }
  1267             else if ( !TopAppIsDisplayedL() )
  1125             else if ( !TopAppIsDisplayedL() )
  1268                 {
  1126                 {
  1269                 // Phone might not be the topmost app since it has
  1127                 // Phone might not be the topmost app since it has
  1270                 // some dialog/query open therefore we need to remove dialog/phone.
  1128                 // some dialog/query open therefore we need to remove dialog/phone.
  1271             
       
  1272                 if ( !IsSimStateNotPresentWithSecurityModeEnabled() )
  1129                 if ( !IsSimStateNotPresentWithSecurityModeEnabled() )
  1273                     {
  1130                     {
  1274                     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
  1131                     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
  1275                     }
  1132                     }
  1276                 // Remove number entry from screen
  1133                 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
  1277                 iViewCommandHandle->ExecuteCommandL( 
       
  1278                         EPhoneViewRemoveNumberEntry );
       
  1279                     
       
  1280                 // Bring Idle app to the foreground
       
  1281                 iViewCommandHandle->ExecuteCommandL( EPhoneViewBringIdleToForeground );
  1134                 iViewCommandHandle->ExecuteCommandL( EPhoneViewBringIdleToForeground );
  1282                 
       
  1283                 // Updates Task list
       
  1284                 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateFSW );
  1135                 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateFSW );
  1285 
       
  1286                 }
  1136                 }
  1287             }
  1137             }
  1288         else if ( IsNumberEntryUsedL() )
  1138         else if ( IsNumberEntryUsedL() )
  1289             {
  1139             {
  1290             // Remove number entry from screen
  1140             // Remove number entry from screen
  1300 // ---------------------------------------------------------
  1150 // ---------------------------------------------------------
  1301 //
  1151 //
  1302 EXPORT_C void CPhoneStateIdle::OnlyHashInNumberEntryL()
  1152 EXPORT_C void CPhoneStateIdle::OnlyHashInNumberEntryL()
  1303     {
  1153     {
  1304     __LOGMETHODSTARTEND( EPhoneControl, "CPhoneStateIdle::OnlyHashInNumberEntryL( ) ");
  1154     __LOGMETHODSTARTEND( EPhoneControl, "CPhoneStateIdle::OnlyHashInNumberEntryL( ) ");
  1305     
       
  1306     if ( CPhoneCenRepProxy::Instance()->IsTelephonyFeatureSupported( 
  1155     if ( CPhoneCenRepProxy::Instance()->IsTelephonyFeatureSupported( 
  1307         KTelephonyLVFlagMannerMode ) )
  1156         KTelephonyLVFlagMannerMode ) )
  1308         {
  1157         {
  1309         ChangeMannerModeL();
  1158         ChangeMannerModeL();
  1310         }            
  1159         }
  1311     else
  1160     else
  1312         {
  1161         {
  1313         StartAlsLineChangeTimerL();
  1162         StartAlsLineChangeTimerL();
  1314         }
  1163         }
  1315 
       
  1316     // Check if any application launch functionality
  1164     // Check if any application launch functionality
  1317     // is configured for pressing hash for a long time
  1165     // is configured for pressing hash for a long time
  1318     // the return value of CheckAppLaunchingL ignored.
  1166     // the return value of CheckAppLaunchingL ignored.
  1319     CheckAppLaunchingL( TKeyCode( KPhoneDtmfHashCharacter ) );
  1167     CheckAppLaunchingL( TKeyCode( KPhoneDtmfHashCharacter ) );
  1320     }
       
  1321 
       
  1322 // ---------------------------------------------------------
       
  1323 // CPhoneStateIdle::CanTransEffectTypeBeUsed
       
  1324 // ---------------------------------------------------------
       
  1325 //
       
  1326 EXPORT_C TBool CPhoneStateIdle::CanTransEffectTypeBeUsed( TStateTransEffectType aType )
       
  1327     {
       
  1328     TBool okToUse( EFalse );
       
  1329     // These effects can be used for transitions between
       
  1330     // phone and some other app.
       
  1331     if ( aType == ENumberEntryOpen || 
       
  1332          aType == ENumberEntryClose ||
       
  1333          aType == ENumberEntryCreate )
       
  1334         {
       
  1335         okToUse = ETrue;
       
  1336         }
       
  1337     return okToUse;
       
  1338     }
  1168     }
  1339 
  1169 
  1340 // ---------------------------------------------------------
  1170 // ---------------------------------------------------------
  1341 // CPhoneStateIdle::ChangeMannerModeL
  1171 // CPhoneStateIdle::ChangeMannerModeL
  1342 // ---------------------------------------------------------
  1172 // ---------------------------------------------------------
  1571             }
  1401             }
  1572         }    
  1402         }    
  1573     }
  1403     }
  1574 
  1404 
  1575 // -----------------------------------------------------------
  1405 // -----------------------------------------------------------
  1576 // CPhoneStateIdle::HandleVoiceCallCommandL()
  1406 // CPhoneStateIdle::GetNumberAcqMenuIdL()
  1577 // -----------------------------------------------------------
  1407 // -----------------------------------------------------------
  1578 //
  1408 //
  1579 TInt CPhoneStateIdle::GetNumberAcqMenuIdL()
  1409 TInt CPhoneStateIdle::GetNumberAcqMenuIdL()
  1580     {
  1410     {
  1581     TInt menuId = CPhoneMainResourceResolver::Instance()->
  1411     TInt menuId = CPhoneMainResourceResolver::Instance()->
  1594             menuId = integerParam.Integer();
  1424             menuId = integerParam.Integer();
  1595             }
  1425             }
  1596         }
  1426         }
  1597     return menuId;
  1427     return menuId;
  1598     }
  1428     }
  1599 
  1429 	
  1600 // -----------------------------------------------------------
  1430 // -----------------------------------------------------------
  1601 // CPhoneStateIdle::HandleErrorL
  1431 // CPhoneStateIdle::HandleErrorL
  1602 // -----------------------------------------------------------
  1432 // -----------------------------------------------------------
  1603 //
  1433 //
  1604 EXPORT_C void CPhoneStateIdle::HandleErrorL( const TPEErrorInfo& aErrorInfo )
  1434 EXPORT_C void CPhoneStateIdle::HandleErrorL( const TPEErrorInfo& aErrorInfo )
  1605     {
  1435     {
  1606     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneStateIdle::HandleErrorL() ");
  1436     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneStateIdle::HandleErrorL() ");
  1607     __PHONELOG1( EBasic, EPhoneControl, 
  1437     if( KErrNotFound < aErrorInfo.iCallId )
  1608             "PhoneUIControl: CPhoneStateIdle::HandleErrorL - aErrorInfo.iErrorCode =%d ",
  1438         {
  1609             aErrorInfo.iErrorCode );
  1439         SetCallInitialized( EFalse );
  1610     __PHONELOG1( EBasic, EPhoneControl,
       
  1611             "PhoneUIControl: CPhoneStateIdle::HandleErrorL - aErrorInfo.iCallId =%d ",
       
  1612             aErrorInfo.iCallId );
       
  1613     if( ( KErrNotFound < aErrorInfo.iCallId ) && 
       
  1614         ( ECCPErrorNone != aErrorInfo.iErrorCode ) &&
       
  1615           IsBubbleInitialized() )
       
  1616         {
       
  1617         HandleInitializingCallErrorL( aErrorInfo.iCallId );
       
  1618         SetBubbleInitialized( EFalse );
       
  1619         }
  1440         }
  1620     CPhoneState::HandleErrorL( aErrorInfo );
  1441     CPhoneState::HandleErrorL( aErrorInfo );
  1621     }
       
  1622 
       
  1623 // -----------------------------------------------------------
       
  1624 // CPhoneStateIdle::HandleInitializingCallErrorL
       
  1625 // -----------------------------------------------------------
       
  1626 //
       
  1627 void CPhoneStateIdle::HandleInitializingCallErrorL( TInt aCallId )
       
  1628     {
       
  1629     __LOGMETHODSTARTEND(
       
  1630             EPhoneControl, 
       
  1631             "CPhoneStateIdle::HandleInitializingCallErrorL()" );
       
  1632     // Remove call 
       
  1633     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
       
  1634     BeginUiUpdateLC();
       
  1635     SetDefaultFlagsL();
       
  1636     if ( IsNumberEntryUsedL() )
       
  1637         {
       
  1638         if ( NeedToReturnToForegroundAppL() )
       
  1639             {
       
  1640             iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
       
  1641             iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility );
       
  1642             iCbaManager->SetCbaL( EPhoneNumberAcqCBA );
       
  1643             }
       
  1644         else
       
  1645             {
       
  1646             // Show the number entry if it exists and update cba's.
       
  1647             SetNumberEntryVisibilityL( ETrue );
       
  1648             if ( IsDTMFEditorVisibleL() )
       
  1649                 {
       
  1650                 CloseDTMFEditorL();
       
  1651                 DisplayIdleScreenL();
       
  1652                 }
       
  1653             else if ( iOnScreenDialer && IsCustomizedDialerVisibleL() )
       
  1654                 {
       
  1655                 CloseCustomizedDialerL();
       
  1656                 DisplayIdleScreenL();
       
  1657                 } 
       
  1658             }
       
  1659         }
       
  1660     else
       
  1661         {
       
  1662         iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
       
  1663         if ( !TopAppIsDisplayedL() || IsAutoLockOn() || NeedToReturnToForegroundAppL() )
       
  1664             {
       
  1665             // Continue displaying current app but set up the 
       
  1666             // idle screen in the background
       
  1667             SetupIdleScreenInBackgroundL();
       
  1668             }
       
  1669         else
       
  1670             {
       
  1671             DisplayIdleScreenL();
       
  1672             }
       
  1673         }
       
  1674     DeleteTouchPaneButtons();
       
  1675     EndUiUpdate();
       
  1676     
       
  1677     // Display call termination note, if necessary
       
  1678     DisplayCallTerminationNoteL();
       
  1679     iViewCommandHandle->ExecuteCommandL( EPhoneViewHideToolbar );
       
  1680     }
       
  1681 
       
  1682 // -----------------------------------------------------------
       
  1683 // CPhoneStateIdle::SetBubbleInitialized
       
  1684 // -----------------------------------------------------------
       
  1685 //
       
  1686 void CPhoneStateIdle::SetBubbleInitialized( TBool aValue )
       
  1687     {
       
  1688     __PHONELOG1( EBasic, EPhoneControl, 
       
  1689             "PhoneUIControl: CPhoneStateIdle::SetBubbleInitialized - aValue =%d ",
       
  1690             aValue );
       
  1691     iBubbleInitialized = aValue;
       
  1692     }
       
  1693 
       
  1694 // -----------------------------------------------------------
       
  1695 // CPhoneStateIdle::IsBubbleInitialized
       
  1696 // -----------------------------------------------------------
       
  1697 //
       
  1698 TBool CPhoneStateIdle::IsBubbleInitialized()
       
  1699     {
       
  1700     __PHONELOG1( EBasic, EPhoneControl, 
       
  1701             "PhoneUIControl: CPhoneStateIdle::IsBubbleInitialized - iBubbleInitialized =%d ",
       
  1702             iBubbleInitialized );
       
  1703     return iBubbleInitialized;
       
  1704     }
  1442     }
  1705 
  1443 
  1706 // -----------------------------------------------------------
  1444 // -----------------------------------------------------------
  1707 // CPhoneStateIdle::ChangeTo
  1445 // CPhoneStateIdle::ChangeTo
  1708 // -----------------------------------------------------------
  1446 // -----------------------------------------------------------
  1710 void CPhoneStateIdle::ChangeTo( TInt aState )
  1448 void CPhoneStateIdle::ChangeTo( TInt aState )
  1711     {
  1449     {
  1712     __PHONELOG1( EBasic, EPhoneControl, 
  1450     __PHONELOG1( EBasic, EPhoneControl, 
  1713            "PhoneUIControl: CPhoneStateIdle::ChangeTo - aState =%d ",
  1451            "PhoneUIControl: CPhoneStateIdle::ChangeTo - aState =%d ",
  1714            aState );
  1452            aState );
  1715     SetBubbleInitialized( EFalse );
  1453     SetCallInitialized( EFalse );
  1716     iStateMachine->ChangeState( aState );
  1454     iStateMachine->ChangeState( aState );
  1717     }
  1455     }
  1718 
  1456 
       
  1457 // -----------------------------------------------------------
       
  1458 // CPhoneStateIdle::SetBubbleInitialized
       
  1459 // -----------------------------------------------------------
       
  1460 //
       
  1461 void CPhoneStateIdle::SetCallInitialized( TBool aValue )
       
  1462     {
       
  1463     __PHONELOG1( EBasic, EPhoneControl, 
       
  1464             "PhoneUIControl: CPhoneStateIdle::SetCallInitialized - iCallInitialized =%d ",
       
  1465             aValue );
       
  1466     iCallInitialized = aValue;
       
  1467     }
       
  1468 
       
  1469 // -----------------------------------------------------------
       
  1470 // CPhoneStateIdle::IsBubbleInitialized
       
  1471 // -----------------------------------------------------------
       
  1472 //
       
  1473 TBool CPhoneStateIdle::IsCallInitialized()
       
  1474     {
       
  1475     __PHONELOG1( EBasic, EPhoneControl, 
       
  1476             "PhoneUIControl: CPhoneStateIdle::IsCallInitialized - iCallInitialized =%d ",
       
  1477             iCallInitialized );
       
  1478     return iCallInitialized;
       
  1479     }
       
  1480 
  1719 // End of File
  1481 // End of File