184 // ----------------------------------------------------------- |
179 // ----------------------------------------------------------- |
185 // |
180 // |
186 void CPhoneConferenceAndCallSetup::HandleConnectingL( TInt aCallId ) |
181 void CPhoneConferenceAndCallSetup::HandleConnectingL( TInt aCallId ) |
187 { |
182 { |
188 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneConferenceAndCallSetup::HandleConnectingL()"); |
183 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneConferenceAndCallSetup::HandleConnectingL()"); |
189 |
|
190 BeginUiUpdateLC(); |
184 BeginUiUpdateLC(); |
191 |
|
192 UpdateRemoteInfoDataL ( aCallId ); |
185 UpdateRemoteInfoDataL ( aCallId ); |
193 |
|
194 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveGlobalNote ); |
186 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveGlobalNote ); |
195 |
187 |
196 // Re-enable global notes |
|
197 TPhoneCmdParamBoolean globalNotifierParam; |
188 TPhoneCmdParamBoolean globalNotifierParam; |
198 globalNotifierParam.SetBoolean( EFalse ); |
189 globalNotifierParam.SetBoolean( EFalse ); |
199 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
190 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
200 &globalNotifierParam ); |
191 &globalNotifierParam ); |
201 |
192 |
202 // Stop capturing keys |
193 if ( !IsNumberEntryVisibleL() ) |
203 CaptureKeysDuringCallNotificationL( EFalse ); |
|
204 |
|
205 // Remove the number entry if it isn't DTMF dialer |
|
206 if ( !iOnScreenDialer || !IsNumberEntryVisibleL() ) |
|
207 { |
194 { |
208 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
195 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
209 } |
196 } |
210 |
197 |
211 // Set Hold flag to view EFalse that IHF is on RSK not unhold |
198 // Set Hold flag to view EFalse that IHF is on RSK not unhold |
212 TPhoneCmdParamBoolean holdFlag; |
199 TPhoneCmdParamBoolean holdFlag; |
213 holdFlag.SetBoolean( EFalse ); |
200 holdFlag.SetBoolean( EFalse ); |
214 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
201 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
215 |
202 |
216 // Updated connecting cba's |
|
217 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
203 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
218 |
|
219 TPhoneCmdParamCallHeaderData callHeaderParam; |
204 TPhoneCmdParamCallHeaderData callHeaderParam; |
220 callHeaderParam.SetCallState( EPEStateConnecting ); |
205 callHeaderParam.SetCallState( EPEStateConnecting ); |
221 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
206 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
222 &callHeaderParam ); |
207 &callHeaderParam ); |
223 |
|
224 EndUiUpdate(); |
208 EndUiUpdate(); |
225 } |
209 } |
226 |
210 |
227 // ----------------------------------------------------------- |
211 // ----------------------------------------------------------- |
228 // CPhoneConferenceAndCallSetup::HandleConnectedL |
212 // CPhoneConferenceAndCallSetup::HandleConnectedL |
229 // ----------------------------------------------------------- |
213 // ----------------------------------------------------------- |
230 // |
214 // |
231 void CPhoneConferenceAndCallSetup::HandleConnectedL( TInt aCallId ) |
215 void CPhoneConferenceAndCallSetup::HandleConnectedL( TInt aCallId ) |
232 { |
216 { |
233 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneConferenceAndCallSetup::HandleConnectedL()"); |
217 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneConferenceAndCallSetup::HandleConnectedL()"); |
234 |
|
235 // Keep Phone in the foreground |
|
236 TPhoneCmdParamBoolean booleanParam; |
218 TPhoneCmdParamBoolean booleanParam; |
237 booleanParam.SetBoolean( EFalse ); |
219 booleanParam.SetBoolean( EFalse ); |
238 iViewCommandHandle->ExecuteCommandL( |
220 iViewCommandHandle->ExecuteCommandL( |
239 EPhoneViewSetNeedToSendToBackgroundStatus, &booleanParam ); |
221 EPhoneViewSetNeedToSendToBackgroundStatus, &booleanParam ); |
240 |
|
241 BeginUiUpdateLC(); |
222 BeginUiUpdateLC(); |
242 |
|
243 // Show bubble |
|
244 TPhoneCmdParamCallHeaderData callHeaderParam; |
223 TPhoneCmdParamCallHeaderData callHeaderParam; |
245 callHeaderParam.SetCallState( EPEStateConnected ); |
224 callHeaderParam.SetCallState( EPEStateConnected ); |
246 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
225 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
247 &callHeaderParam ); |
226 &callHeaderParam ); |
248 |
227 |
249 // Capturing keys and number entry must be removed because some |
228 if ( !IsNumberEntryVisibleL() ) |
250 // networks jump over connecting state directly to connected state. |
|
251 CaptureKeysDuringCallNotificationL( EFalse ); |
|
252 |
|
253 // Remove the number entry if it isn't DTMF dialer |
|
254 if ( !iOnScreenDialer || !IsNumberEntryVisibleL() ) |
|
255 { |
229 { |
256 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
230 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
257 } |
231 } |
258 |
|
259 SetTouchPaneButtons( EPhoneConferenceAndSingleButtons ); |
232 SetTouchPaneButtons( EPhoneConferenceAndSingleButtons ); |
260 EndUiUpdate(); |
233 EndUiUpdate(); |
261 |
|
262 UpdateCbaL ( EPhoneCallHandlingNewCallSwapCBA ); |
234 UpdateCbaL ( EPhoneCallHandlingNewCallSwapCBA ); |
263 |
235 iStateMachine->ChangeState( EPhoneStateConferenceAndSingle ); |
264 iStateMachine->ChangeState( EPhoneStateConferenceAndSingle ); |
|
265 } |
236 } |
266 |
237 |
267 // ----------------------------------------------------------- |
238 // ----------------------------------------------------------- |
268 // CPhoneConferenceAndCallSetup:HandleIdleL |
239 // CPhoneConferenceAndCallSetup:HandleIdleL |
269 // ----------------------------------------------------------- |
240 // ----------------------------------------------------------- |
270 // |
241 // |
271 void CPhoneConferenceAndCallSetup::HandleIdleL( TInt aCallId ) |
242 void CPhoneConferenceAndCallSetup::HandleIdleL( TInt aCallId ) |
272 { |
243 { |
273 __LOGMETHODSTARTEND( EPhoneUIStates, |
244 __LOGMETHODSTARTEND( EPhoneUIStates, |
274 "CPhoneConferenceAndCallSetup::HandleIdleL()"); |
245 "CPhoneConferenceAndCallSetup::HandleIdleL()"); |
275 // Re-enable global notes |
|
276 TPhoneCmdParamBoolean globalNotifierParam; |
246 TPhoneCmdParamBoolean globalNotifierParam; |
277 globalNotifierParam.SetBoolean( EFalse ); |
247 globalNotifierParam.SetBoolean( EFalse ); |
278 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
248 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
279 &globalNotifierParam ); |
249 &globalNotifierParam ); |
280 |
250 |
281 // Stop capturing keys |
|
282 CaptureKeysDuringCallNotificationL( EFalse ); |
|
283 |
|
284 TPhoneCmdParamBoolean conferenceExistsForCallId; |
251 TPhoneCmdParamBoolean conferenceExistsForCallId; |
285 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCallExistsInConference, |
252 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCallExistsInConference, |
286 aCallId, &conferenceExistsForCallId ); |
253 aCallId, &conferenceExistsForCallId ); |
287 |
254 |
288 if( conferenceExistsForCallId.Boolean() ) |
255 if( conferenceExistsForCallId.Boolean() ) |
289 { |
256 { |
290 // Remove 'Conference on hold' global note |
257 // Remove 'Conference on hold' global note |
291 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveGlobalNote ); |
258 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveGlobalNote ); |
292 |
259 iViewCommandHandle->ExecuteCommandL( |
293 // Remove conference member from conference bubble |
260 EPhoneViewRemoveFromConference, |
294 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveFromConference, |
261 aCallId ); |
295 aCallId ); |
|
296 |
262 |
297 //Check if removed call was last one to be able to be in conference mode |
263 //Check if removed call was last one to be able to be in conference mode |
298 //If there is no confrence call, go to single and call setup state |
264 //If there is no confrence call, go to single and call setup state |
299 TPhoneCmdParamBoolean conferenceExists; |
265 TPhoneCmdParamBoolean conferenceExists; |
300 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, |
266 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, |
301 &conferenceExists ); |
267 &conferenceExists ); |
302 |
|
303 __PHONELOG1( EBasic, EPhoneControl, |
268 __PHONELOG1( EBasic, EPhoneControl, |
304 "CPhoneConferenceAndCallSetup::HandleIdleL - conferenceExists =%d ", |
269 "CPhoneConferenceAndCallSetup::HandleIdleL - conferenceExists =%d ", |
305 conferenceExists.Boolean() ); |
270 conferenceExists.Boolean() ); |
306 |
271 |
307 if( !conferenceExists.Boolean() ) |
272 if( !conferenceExists.Boolean() ) |
310 { |
275 { |
311 iStateMachine->ChangeState( EPhoneStateAlertingInSingle ); |
276 iStateMachine->ChangeState( EPhoneStateAlertingInSingle ); |
312 } |
277 } |
313 else |
278 else |
314 { |
279 { |
315 iStateMachine->ChangeState( EPhoneStateCallSetupInSingle ); |
280 iStateMachine->ChangeState( EPhoneStateCallSetupInSingle ); |
316 } |
281 } |
317 } |
282 } |
318 } |
283 } |
319 else |
284 else |
320 { |
285 { |
321 // Remove outgoing call |
286 // Remove outgoing call |
322 BeginUiUpdateLC(); |
287 BeginUiUpdateLC(); |
323 |
|
324 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
288 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
325 |
|
326 CheckIfRestoreNEContentAfterDtmfDialer(); |
|
327 |
289 |
328 if ( IsNumberEntryUsedL() ) |
290 if ( IsNumberEntryUsedL() ) |
329 { |
291 { |
330 // Show the number entry if it exists |
|
331 SetNumberEntryVisibilityL(ETrue); |
292 SetNumberEntryVisibilityL(ETrue); |
332 } |
293 } |
333 |
294 |
334 SetTouchPaneButtons( EPhoneConferenceButtons ); |
295 SetTouchPaneButtons( EPhoneConferenceButtons ); |
335 EndUiUpdate(); |
296 EndUiUpdate(); |
336 |
|
337 // Go to conference state |
|
338 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
297 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
339 iStateMachine->ChangeState( EPhoneStateConference ); |
298 iStateMachine->ChangeState( EPhoneStateConference ); |
340 } |
299 } |
341 |
|
342 } |
300 } |
343 |
301 |
344 |
302 |
345 // ----------------------------------------------------------- |
303 // ----------------------------------------------------------- |
346 // CPhoneConferenceAndCallSetup::UpdateInCallCbaL |
304 // CPhoneConferenceAndCallSetup::UpdateInCallCbaL |
347 // ----------------------------------------------------------- |
305 // ----------------------------------------------------------- |
348 // |
306 // |
349 void CPhoneConferenceAndCallSetup::UpdateInCallCbaL() |
307 void CPhoneConferenceAndCallSetup::UpdateInCallCbaL() |
350 { |
308 { |
351 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneConferenceAndCallSetup::UpdateInCallCbaL() "); |
309 __LOGMETHODSTARTEND(EPhoneControl, "CPhoneConferenceAndCallSetup::UpdateInCallCbaL() "); |
352 |
|
353 if ( iAlerting ) |
310 if ( iAlerting ) |
354 { |
311 { |
355 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
312 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
356 } |
313 } |
357 else |
314 else |