131 |
131 |
132 case MEngineMonitor::EPEMessageHeldConference: |
132 case MEngineMonitor::EPEMessageHeldConference: |
133 case MEngineMonitor::EPEMessageConnectedConference: |
133 case MEngineMonitor::EPEMessageConnectedConference: |
134 { |
134 { |
135 TPhoneCmdParamInteger callIdParam; |
135 TPhoneCmdParamInteger callIdParam; |
136 iViewCommandHandle->ExecuteCommandL( |
136 iViewCommandHandle->ExecuteCommand( |
137 EPhoneViewGetExpandedBubbleCallId, &callIdParam ); |
137 EPhoneViewGetExpandedBubbleCallId, &callIdParam ); |
138 CPhoneConference::HandlePhoneEngineMessageL( aMessage, |
138 CPhoneConference::HandlePhoneEngineMessageL( aMessage, |
139 aCallId ); |
139 aCallId ); |
140 if ( KConferenceCallId == callIdParam.Integer() ) |
140 if ( KConferenceCallId == callIdParam.Integer() ) |
141 { |
141 { |
161 { |
161 { |
162 __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleKeyMessageL()"); |
162 __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleKeyMessageL()"); |
163 switch ( aCode ) |
163 switch ( aCode ) |
164 { |
164 { |
165 case EKeyYes: // send-key |
165 case EKeyYes: // send-key |
166 if( IsNumberEntryVisibleL() ) |
166 if( iNumberEntryManager->IsNumberEntryVisibleL() ) |
167 { |
167 { |
168 CallFromNumberEntryL(); |
168 iNumberEntryManager->CallFromNumberEntryL(); |
169 } |
169 } |
170 else |
170 else |
171 { |
171 { |
172 iStateMachine->SendPhoneEngineMessage( |
172 iStateMachine->SendPhoneEngineMessage( |
173 MPEPhoneModel::EPEMessageAnswer ); |
173 MPEPhoneModel::EPEMessageAnswer ); |
178 CPhoneConference::HandleKeyMessageL( aMessage, aCode ); |
178 CPhoneConference::HandleKeyMessageL( aMessage, aCode ); |
179 break; |
179 break; |
180 } |
180 } |
181 } |
181 } |
182 |
182 |
183 // ----------------------------------------------------------- |
|
184 // CPhoneConferenceAndWaiting::HandleKeyEventL |
|
185 // ----------------------------------------------------------- |
|
186 // |
|
187 void CPhoneConferenceAndWaiting::HandleKeyEventL( |
|
188 const TKeyEvent& aKeyEvent, |
|
189 TEventCode /*aEventCode*/ ) |
|
190 { |
|
191 if( EKeyDeviceF == aKeyEvent.iCode ) |
|
192 { |
|
193 __PHONELOG( EBasic, EPhoneUIStates, |
|
194 "CPhoneConferenceAndWaiting::HandleKeyMessageL-deviceF" ); |
|
195 HandleHoldSwitchL(); |
|
196 } |
|
197 } |
|
198 |
183 |
199 // ----------------------------------------------------------- |
184 // ----------------------------------------------------------- |
200 // CPhoneConferenceAndWaiting::HandleConnectedL |
185 // CPhoneConferenceAndWaiting::HandleConnectedL |
201 // ----------------------------------------------------------- |
186 // ----------------------------------------------------------- |
202 // |
187 // |
219 MakeStateTransitionToConferenceAndSingleL( aCallId ); |
204 MakeStateTransitionToConferenceAndSingleL( aCallId ); |
220 } |
205 } |
221 else |
206 else |
222 { |
207 { |
223 // member of conference call which is on hold |
208 // member of conference call which is on hold |
224 TPhoneCmdParamCallHeaderData callHeaderParam; |
209 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId ); |
225 callHeaderParam.SetCallState( EPEStateConnected ); |
|
226 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
|
227 &callHeaderParam ); |
|
228 } |
210 } |
229 } |
211 } |
230 |
212 |
231 // ----------------------------------------------------------- |
213 // ----------------------------------------------------------- |
232 // CPhoneConferenceAndWaiting::MakeStateTransitionToConferenceAndSingleL |
214 // CPhoneConferenceAndWaiting::MakeStateTransitionToConferenceAndSingleL |
233 // ----------------------------------------------------------- |
215 // ----------------------------------------------------------- |
234 // |
216 // |
235 void CPhoneConferenceAndWaiting::MakeStateTransitionToConferenceAndSingleL( TInt aCallId ) |
217 void CPhoneConferenceAndWaiting::MakeStateTransitionToConferenceAndSingleL( TInt aCallId ) |
236 { |
218 { |
237 __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::MakeStateTransitionToConferenceAndSingleL()"); |
219 __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::MakeStateTransitionToConferenceAndSingleL()"); |
238 if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke ) |
220 |
239 && iStateMachine->PhoneStorage()->IsScreenLocked() ) |
|
240 { |
|
241 EnableCallUIL(); |
|
242 } |
|
243 |
|
244 iStateMachine->PhoneStorage()->ResetBlockedKeysList(); |
|
245 BeginUiUpdateLC(); |
221 BeginUiUpdateLC(); |
246 UpdateRemoteInfoDataL ( aCallId ); |
222 UpdateRemoteInfoDataL ( aCallId ); |
247 |
223 |
248 TPhoneCmdParamCallHeaderData callHeaderParam; |
224 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId ); |
249 callHeaderParam.SetCallState( EPEStateConnected ); |
225 |
250 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
226 iNumberEntryManager->SetVisibilityIfNumberEntryUsedL( ETrue ); |
251 &callHeaderParam ); |
227 UpdateUiCommands(); |
252 |
|
253 if ( IsNumberEntryUsedL() ) |
|
254 { |
|
255 if ( NeedToSendToBackgroundL() ) |
|
256 { |
|
257 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
|
258 } |
|
259 else |
|
260 { |
|
261 SetNumberEntryVisibilityL(ETrue); |
|
262 } |
|
263 } |
|
264 else |
|
265 { |
|
266 UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA ); |
|
267 } |
|
268 SetTouchPaneButtons( EPhoneConferenceAndSingleButtons ); |
|
269 EndUiUpdate(); |
228 EndUiUpdate(); |
270 iStateMachine->ChangeState( EPhoneStateConferenceAndSingle ); |
229 iStateMachine->ChangeState( EPhoneStateConferenceAndSingle ); |
271 } |
230 } |
272 |
231 |
273 // ----------------------------------------------------------- |
232 // ----------------------------------------------------------- |
289 if( iRingingCallId == aCallId ) |
248 if( iRingingCallId == aCallId ) |
290 { |
249 { |
291 |
250 |
292 BeginUiUpdateLC(); |
251 BeginUiUpdateLC(); |
293 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
252 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
294 |
253 iNumberEntryManager->SetVisibilityIfNumberEntryUsedL(ETrue); |
295 if ( IsNumberEntryUsedL() ) |
|
296 { |
|
297 if ( NeedToSendToBackgroundL() ) |
|
298 { |
|
299 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground ); |
|
300 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
|
301 } |
|
302 else |
|
303 { |
|
304 SetNumberEntryVisibilityL(ETrue); |
|
305 } |
|
306 } |
|
307 else |
|
308 { |
|
309 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
|
310 // If numberentry is not open just check NeedToSendToBackgroundL and |
|
311 // sendbackround if needed. |
|
312 if ( NeedToSendToBackgroundL() ) |
|
313 { |
|
314 // Return phone to the background if send to background is needed. |
|
315 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground ); |
|
316 } |
|
317 } |
|
318 |
254 |
319 if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke ) |
255 UpdateUiCommands(); |
320 && iStateMachine->PhoneStorage()->IsScreenLocked() ) |
|
321 { |
|
322 EnableCallUIL(); |
|
323 } |
|
324 iStateMachine->PhoneStorage()->ResetBlockedKeysList(); |
|
325 SetTouchPaneButtons( EPhoneConferenceButtons ); |
|
326 EndUiUpdate(); |
256 EndUiUpdate(); |
327 iStateMachine->ChangeState( EPhoneStateConference ); |
257 iStateMachine->ChangeState( EPhoneStateConference ); |
328 } |
258 } |
329 else |
259 else |
330 { |
260 { |
356 iViewCommandHandle->ExecuteCommandL( |
286 iViewCommandHandle->ExecuteCommandL( |
357 EPhoneViewGetCountOfActiveCalls, &activeCallCount ); |
287 EPhoneViewGetCountOfActiveCalls, &activeCallCount ); |
358 switch( activeCallCount.Integer() ) |
288 switch( activeCallCount.Integer() ) |
359 { |
289 { |
360 case ENoActiveCalls: // Go to incoming state |
290 case ENoActiveCalls: // Go to incoming state |
361 { |
291 { |
362 TPhoneCmdParamCallHeaderData callHeaderParam; |
|
363 callHeaderParam.SetCallState( EPEStateRinging ); |
|
364 |
|
365 // Set Hold flag to view |
|
366 TPhoneCmdParamBoolean holdFlag; |
|
367 holdFlag.SetBoolean( EFalse ); |
|
368 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
|
369 |
|
370 BringIncomingToForegroundL(); |
292 BringIncomingToForegroundL(); |
371 SetCallHeaderTextsForCallComingInL( iRingingCallId, EFalse, &callHeaderParam ); |
|
372 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, |
293 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, |
373 iRingingCallId ,&callHeaderParam ); |
294 iRingingCallId ); |
374 iCbaManager->UpdateIncomingCbaL( iRingingCallId ); |
295 |
375 |
296 if ( iNumberEntryManager->IsNumberEntryVisibleL() ) |
376 if ( IsNumberEntryVisibleL() ) |
|
377 { |
297 { |
378 SetNumberEntryVisibilityL(EFalse); |
298 iNumberEntryManager->SetNumberEntryVisibilityL(EFalse); |
379 } |
299 } |
380 CheckDisableHWKeysAndCallUIL(); |
300 |
381 |
|
382 SetTouchPaneButtons( EPhoneIncomingCallButtons ); |
|
383 SetRingingTonePlaybackL( iRingingCallId ); |
301 SetRingingTonePlaybackL( iRingingCallId ); |
|
302 UpdateUiCommands(); |
384 SetBackButtonActive(EFalse); |
303 SetBackButtonActive(EFalse); |
385 iStateMachine->ChangeState( EPhoneStateIncoming ); |
304 iStateMachine->ChangeState( EPhoneStateIncoming ); |
386 } |
305 } |
387 break; |
306 break; |
388 |
307 |
389 case EOneActiveCall: |
308 case EOneActiveCall: |
390 if ( IsNumberEntryUsedL() ) |
309 iNumberEntryManager->SetVisibilityIfNumberEntryUsedL( ETrue ); |
391 { |
310 UpdateUiCommands(); |
392 SetNumberEntryVisibilityL(ETrue); |
|
393 } |
|
394 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
|
395 CheckDisableHWKeysAndCallUIL(); |
|
396 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
|
397 iStateMachine->ChangeState( EPhoneStateWaitingInSingle ); |
311 iStateMachine->ChangeState( EPhoneStateWaitingInSingle ); |
398 break; |
312 break; |
399 |
313 |
400 case ETwoActiveCalls: |
314 case ETwoActiveCalls: |
401 if ( IsNumberEntryUsedL() ) |
315 iNumberEntryManager->SetVisibilityIfNumberEntryUsedL( ETrue ); |
402 { |
316 |
403 SetNumberEntryVisibilityL(ETrue); |
317 UpdateUiCommands(); |
404 } |
|
405 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
|
406 CheckDisableHWKeysAndCallUIL(); |
|
407 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
|
408 iStateMachine->ChangeState( EPhoneStateTwoSinglesAndWaiting ); |
318 iStateMachine->ChangeState( EPhoneStateTwoSinglesAndWaiting ); |
409 break; |
319 break; |
410 |
320 |
411 default: |
321 default: |
412 // Too many active calls to handle reliable state change now. |
322 // Too many active calls to handle reliable state change now. |
417 } |
327 } |
418 EndUiUpdate(); |
328 EndUiUpdate(); |
419 } |
329 } |
420 |
330 |
421 // ----------------------------------------------------------- |
331 // ----------------------------------------------------------- |
422 // CPhoneConferenceAndWaiting::UpdateInCallCbaL |
|
423 // ----------------------------------------------------------- |
|
424 // |
|
425 void CPhoneConferenceAndWaiting::UpdateInCallCbaL() |
|
426 { |
|
427 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndWaiting::UpdateInCallCbaL() "); |
|
428 UpdateCbaL ( EPhoneCallHandlingCallWaitingCBA ); |
|
429 } |
|
430 |
|
431 // ----------------------------------------------------------- |
|
432 // CPhoneConferenceAndWaiting::HandleDiallingL |
332 // CPhoneConferenceAndWaiting::HandleDiallingL |
433 // ----------------------------------------------------------- |
333 // ----------------------------------------------------------- |
434 // |
334 // |
435 void CPhoneConferenceAndWaiting::HandleDiallingL( TInt aCallId ) |
335 void CPhoneConferenceAndWaiting::HandleDialingL( TInt aCallId ) |
436 { |
336 { |
437 __LOGMETHODSTARTEND( EPhoneUIStates, |
337 __LOGMETHODSTARTEND( EPhoneUIStates, |
438 "CPhoneConferenceAndWaiting::HandleDiallingL()"); |
338 "CPhoneConferenceAndWaiting::HandleDialingL()"); |
439 BeginUiUpdateLC(); |
339 DisplayCallHeaderL( aCallId, ESetNEVisibilityFalse ); |
440 SetNumberEntryVisibilityL(EFalse); |
|
441 DisplayCallSetupL( aCallId ); |
|
442 SetTouchPaneButtons( EPhoneCallSetupButtons ); |
|
443 EndUiUpdate(); |
|
444 UpdateCbaL( EPhoneCallHandlingCallSetupCBA ); |
|
445 iStateMachine->ChangeState( EPhoneStateConferenceAndWaitingAndCallSetup ); |
340 iStateMachine->ChangeState( EPhoneStateConferenceAndWaitingAndCallSetup ); |
446 } |
341 } |
447 |
342 |
448 // ----------------------------------------------------------- |
343 // ----------------------------------------------------------- |
449 // CPhoneConferenceAndWaiting::HandleWentOneToOneL |
344 // CPhoneConferenceAndWaiting::HandleWentOneToOneL |
470 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, |
365 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, |
471 &conferenceBubbleExists ); |
366 &conferenceBubbleExists ); |
472 if( conferenceBubbleExists.Boolean() && |
367 if( conferenceBubbleExists.Boolean() && |
473 ( iRingingCallId != KErrNotFound ) ) |
368 ( iRingingCallId != KErrNotFound ) ) |
474 { |
369 { |
475 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
370 UpdateUiCommands(); |
476 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
|
477 iStateMachine->ChangeState( EPhoneStateConferenceAndSingleAndWaiting ); |
371 iStateMachine->ChangeState( EPhoneStateConferenceAndSingleAndWaiting ); |
478 } |
372 } |
479 EndUiUpdate(); |
373 EndUiUpdate(); |
480 } |
374 } |
481 |
375 |