26 #include "mphonestatemachine.h" |
26 #include "mphonestatemachine.h" |
27 #include "tphonecmdparamboolean.h" |
27 #include "tphonecmdparamboolean.h" |
28 #include "tphonecmdparaminteger.h" |
28 #include "tphonecmdparaminteger.h" |
29 #include "tphonecmdparamcallheaderdata.h" |
29 #include "tphonecmdparamcallheaderdata.h" |
30 #include "tphonecmdparamglobalnote.h" |
30 #include "tphonecmdparamglobalnote.h" |
31 #include "tphonecmdparamcallstatedata.h" |
|
32 #include "phoneviewcommanddefinitions.h" |
31 #include "phoneviewcommanddefinitions.h" |
33 #include "phoneui.hrh" |
32 #include "phoneui.hrh" |
34 #include "cphonemainresourceresolver.h" |
33 #include "cphonemainresourceresolver.h" |
35 #include "phonerssbase.h" |
34 #include "phonerssbase.h" |
36 #include "phonestatedefinitionsgsm.h" |
35 #include "phonestatedefinitionsgsm.h" |
37 #include "phonelogger.h" |
36 #include "phonelogger.h" |
38 #include "cphonemediatorfactory.h" |
37 #include "cphonemediatorfactory.h" |
39 #include "cphonemediatorsender.h" |
38 #include "cphonemediatorsender.h" |
|
39 #include "phonecallutil.h" |
40 |
40 |
41 // ================= MEMBER FUNCTIONS ======================= |
41 // ================= MEMBER FUNCTIONS ======================= |
42 |
42 |
43 // C++ default constructor can NOT contain any code, that |
43 // C++ default constructor can NOT contain any code, that |
44 // might leave. |
44 // might leave. |
129 "CPhoneCallSetupAndWaiting::HandleIdleL()"); |
129 "CPhoneCallSetupAndWaiting::HandleIdleL()"); |
130 BeginUiUpdateLC(); |
130 BeginUiUpdateLC(); |
131 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
131 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
132 |
132 |
133 // Find out do we have waiting or outgoing call left |
133 // Find out do we have waiting or outgoing call left |
134 TPhoneCmdParamCallStateData callStateData; |
134 TInt callId = PhoneCallUtil::CallIdByState( EPEStateRinging ); |
135 callStateData.SetCallState( EPEStateRinging ); |
135 |
136 iViewCommandHandle->HandleCommandL( EPhoneViewGetCallIdByState, |
136 if( callId > KErrNotFound ) |
137 &callStateData ); |
|
138 |
|
139 if( callStateData.CallId() > KErrNotFound ) |
|
140 { |
137 { |
141 BringIncomingToForegroundL(); |
138 BringIncomingToForegroundL(); |
142 SetRingingTonePlaybackL( callStateData.CallId() ); |
139 SetRingingTonePlaybackL( callId ); |
143 UpdateCallHeaderAndUiCommandsL( callStateData.CallId() ); |
140 UpdateCallHeaderAndUiCommandsL( callId ); |
144 SetBackButtonActive(EFalse); |
141 SetBackButtonActive(EFalse); |
145 iStateMachine->ChangeState( EPhoneStateIncoming ); |
142 iStateMachine->ChangeState( EPhoneStateIncoming ); |
146 } |
143 } |
147 else // waiting call was terminated. |
144 else // waiting call was terminated. |
148 { |
145 { |