126 __LOGMETHODSTARTEND( EPhoneUIStates, |
126 __LOGMETHODSTARTEND( EPhoneUIStates, |
127 "CPhoneSingleAndAlerting::HandleKeyMessageL()"); |
127 "CPhoneSingleAndAlerting::HandleKeyMessageL()"); |
128 switch ( aCode ) |
128 switch ( aCode ) |
129 { |
129 { |
130 case EKeyYes: // send-key |
130 case EKeyYes: // send-key |
131 if ( CPhoneState::IsNumberEntryUsedL() ) |
131 if ( iNumberEntryManager->IsNumberEntryUsedL() ) |
132 { |
132 { |
133 CallFromNumberEntryL(); |
133 iNumberEntryManager->CallFromNumberEntryL(); |
134 } |
134 } |
135 else |
135 else |
136 { |
136 { |
137 CPhoneState::SendGlobalErrorNoteL( |
137 CPhoneState::SendGlobalErrorNoteL( |
138 EPhoneNoteTextNotAllowed, ETrue ); |
138 EPhoneNoteTextNotAllowed, ETrue ); |
148 else |
148 else |
149 { |
149 { |
150 DisconnectOutgoingCallL(); |
150 DisconnectOutgoingCallL(); |
151 } |
151 } |
152 |
152 |
153 if ( IsNumberEntryUsedL() ) |
153 if ( iNumberEntryManager->IsNumberEntryUsedL() ) |
154 { |
154 { |
155 iViewCommandHandle->ExecuteCommandL( |
155 iViewCommandHandle->ExecuteCommandL( |
156 EPhoneViewRemoveNumberEntry ); |
156 EPhoneViewRemoveNumberEntry ); |
157 // Do state-specific operation when number entry is cleared |
157 // Do state-specific operation when number entry is cleared |
158 HandleNumberEntryClearedL(); |
158 HandleNumberEntryClearedL(); |
178 iViewCommandHandle->HandleCommandL( |
178 iViewCommandHandle->HandleCommandL( |
179 EPhoneViewGetCallIdByState, &callStateData ); |
179 EPhoneViewGetCallIdByState, &callStateData ); |
180 |
180 |
181 if( callStateData.CallId() == aCallId ) |
181 if( callStateData.CallId() == aCallId ) |
182 { |
182 { |
183 TPhoneCmdParamBoolean booleanParam; |
|
184 booleanParam.SetBoolean( EFalse ); |
|
185 iViewCommandHandle->ExecuteCommandL( |
|
186 EPhoneViewSetNeedToSendToBackgroundStatus, &booleanParam ); |
|
187 |
|
188 BeginUiUpdateLC(); |
183 BeginUiUpdateLC(); |
189 |
184 |
190 TPhoneCmdParamCallHeaderData callHeaderParam; |
185 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId ); |
191 callHeaderParam.SetCallState( EPEStateConnected ); |
186 |
192 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
187 UpdateUiCommands(); |
193 &callHeaderParam ); |
|
194 |
|
195 SetTouchPaneButtons( EPhoneTwoSinglesButtons ); |
|
196 EndUiUpdate(); |
188 EndUiUpdate(); |
197 |
189 |
198 TPhoneCmdParamBoolean holdFlag; |
|
199 holdFlag.SetBoolean( EFalse ); |
|
200 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
|
201 |
|
202 UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA ); |
|
203 iStateMachine->ChangeState( EPhoneStateTwoSingles ); |
190 iStateMachine->ChangeState( EPhoneStateTwoSingles ); |
204 } |
191 } |
205 else |
192 else |
206 { |
193 { |
207 TPhoneCmdParamCallHeaderData callHeaderParam; |
194 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId ); |
208 callHeaderParam.SetCallState( EPEStateConnected ); |
|
209 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
|
210 &callHeaderParam ); |
|
211 |
|
212 TPhoneCmdParamBoolean holdFlag; |
|
213 holdFlag.SetBoolean( EFalse ); |
|
214 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
|
215 } |
195 } |
216 } |
196 } |
217 // ----------------------------------------------------------- |
197 // ----------------------------------------------------------- |
218 // CPhoneSingleAndAlerting::HandleIdleL |
198 // CPhoneSingleAndAlerting::HandleIdleL |
219 // ----------------------------------------------------------- |
199 // ----------------------------------------------------------- |
222 { |
202 { |
223 __LOGMETHODSTARTEND( EPhoneUIStates, |
203 __LOGMETHODSTARTEND( EPhoneUIStates, |
224 "CPhoneSingleAndAlerting::HandleIdleL()"); |
204 "CPhoneSingleAndAlerting::HandleIdleL()"); |
225 BeginUiUpdateLC(); |
205 BeginUiUpdateLC(); |
226 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
206 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
227 |
|
228 if ( !TopAppIsDisplayedL() ) |
|
229 { |
|
230 // Continue displaying current app but set up the |
|
231 // idle screen in the background |
|
232 SetupIdleScreenInBackgroundL(); |
|
233 } |
|
234 |
207 |
235 TPhoneCmdParamInteger countParam; |
208 TPhoneCmdParamInteger countParam; |
236 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCountOfActiveCalls, &countParam); |
209 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCountOfActiveCalls, &countParam); |
237 |
210 |
238 if ( countParam.Integer() ) |
211 if ( countParam.Integer() ) |
239 { |
212 { |
240 SetTouchPaneButtons( EPhoneIncallButtons ); |
213 UpdateUiCommands(); |
241 TPhoneCmdParamBoolean holdFlag; |
|
242 holdFlag.SetBoolean( ETrue ); |
|
243 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
|
244 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
|
245 iStateMachine->ChangeState( EPhoneStateSingle ); |
214 iStateMachine->ChangeState( EPhoneStateSingle ); |
246 } |
215 } |
247 else |
216 else |
248 { |
217 { |
249 DisplayCallTerminationNoteL(); |
218 DisplayCallTerminationNoteL(); |
250 SetTouchPaneButtons( EPhoneCallSetupButtons ); |
219 UpdateUiCommands(); |
251 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
|
252 iStateMachine->ChangeState( EPhoneStateAlerting ); |
220 iStateMachine->ChangeState( EPhoneStateAlerting ); |
253 } |
221 } |
254 EndUiUpdate(); |
222 EndUiUpdate(); |
255 } |
223 } |
256 |
|
257 // ----------------------------------------------------------- |
|
258 // CPhoneSingleAndAlerting::UpdateInCallCbaL |
|
259 // ----------------------------------------------------------- |
|
260 // |
|
261 void CPhoneSingleAndAlerting::UpdateInCallCbaL() |
|
262 { |
|
263 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneSingleAndAlerting::UpdateInCallCbaL() "); |
|
264 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
|
265 } |
|
266 |
224 |
267 // End of File |
225 // End of File |