78 // Re-enable global notes |
76 // Re-enable global notes |
79 TPhoneCmdParamBoolean globalNotifierParam; |
77 TPhoneCmdParamBoolean globalNotifierParam; |
80 globalNotifierParam.SetBoolean( EFalse ); |
78 globalNotifierParam.SetBoolean( EFalse ); |
81 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
79 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
82 &globalNotifierParam ); |
80 &globalNotifierParam ); |
83 |
|
84 CPhonePubSubProxy::Instance()->ChangePropertyValue( |
|
85 KPSUidScreenSaver, |
|
86 KScreenSaverAllowScreenSaver, |
|
87 EPhoneScreensaverAllowed ); |
|
88 } |
81 } |
89 |
82 |
90 // ----------------------------------------------------------- |
83 // ----------------------------------------------------------- |
91 // CPhoneTwoSingles::NewL() |
84 // CPhoneTwoSingles::NewL() |
92 // Constructor |
85 // Constructor |
143 default: |
136 default: |
144 CPhoneGsmInCall::HandlePhoneEngineMessageL( aMessage, aCallId ); |
137 CPhoneGsmInCall::HandlePhoneEngineMessageL( aMessage, aCallId ); |
145 break; |
138 break; |
146 } |
139 } |
147 } |
140 } |
148 |
|
149 // ----------------------------------------------------------- |
|
150 // CPhoneTwoSingles::OpenMenuBarL |
|
151 // ----------------------------------------------------------- |
|
152 // |
|
153 EXPORT_C void CPhoneTwoSingles::OpenMenuBarL() |
|
154 { |
|
155 __LOGMETHODSTARTEND( EPhoneUIStates, |
|
156 "CPhoneTwoSingles::OpenMenuBarL()"); |
|
157 TInt resourceId; |
|
158 |
|
159 if ( iOnScreenDialer && IsDTMFEditorVisibleL() ) |
|
160 { |
|
161 resourceId = EPhoneDtmfDialerMenubar; |
|
162 } |
|
163 if ( iOnScreenDialer && IsCustomizedDialerVisibleL() ) |
|
164 { |
|
165 resourceId = CustomizedDialerMenuResourceIdL(); |
|
166 } |
|
167 else if ( IsNumberEntryVisibleL() ) |
|
168 { |
|
169 resourceId = EPhoneCallActiveAndHeldMenubarWithNumberEntry; |
|
170 } |
|
171 else |
|
172 { |
|
173 resourceId = EPhoneCallActiveAndHeldMenubar; |
|
174 } |
|
175 |
|
176 TPhoneCmdParamInteger integerParam; |
|
177 integerParam.SetInteger( |
|
178 CPhoneMainResourceResolver::Instance()-> |
|
179 ResolveResourceID( resourceId ) ); |
|
180 |
|
181 // Set Hold flag to view |
|
182 TPhoneCmdParamBoolean holdFlag; |
|
183 holdFlag.SetBoolean( EFalse ); |
|
184 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
|
185 |
|
186 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarOpen, |
|
187 &integerParam ); |
|
188 } |
|
189 |
141 |
190 // ----------------------------------------------------------- |
142 // ----------------------------------------------------------- |
191 // CPhoneTwoSingles:HandleIdleL |
143 // CPhoneTwoSingles:HandleIdleL |
192 // ----------------------------------------------------------- |
144 // ----------------------------------------------------------- |
193 // |
145 // |
205 EPhoneViewGetCountOfActiveCalls, &activeCallCount ); |
157 EPhoneViewGetCountOfActiveCalls, &activeCallCount ); |
206 |
158 |
207 switch( activeCallCount.Integer() ) |
159 switch( activeCallCount.Integer() ) |
208 { |
160 { |
209 case EOneActiveCall: |
161 case EOneActiveCall: |
210 { |
162 { |
211 // Close menu bar if number entry is not open. |
163 if ( IsNumberEntryUsedL() ) |
212 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
164 { |
|
165 // Show the number entry if it exists |
|
166 SetNumberEntryVisibilityL(ETrue); |
|
167 } |
|
168 else |
|
169 { |
213 |
170 |
214 // Set incall CBAs |
171 // Set incall CBAs |
215 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
172 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
|
173 } |
216 |
174 |
217 TPhoneCmdParamCallStateData callStateData; |
175 TPhoneCmdParamCallStateData callStateData; |
218 callStateData.SetCallState( EPEStateHeld ); |
176 callStateData.SetCallState( EPEStateHeld ); |
219 iViewCommandHandle->HandleCommandL( |
177 iViewCommandHandle->HandleCommandL( |
220 EPhoneViewGetCallIdByState, &callStateData ); |
178 EPhoneViewGetCallIdByState, &callStateData ); |
394 void CPhoneTwoSingles::HandleIncomingL( TInt aCallId ) |
357 void CPhoneTwoSingles::HandleIncomingL( TInt aCallId ) |
395 { |
358 { |
396 __LOGMETHODSTARTEND( EPhoneUIStates, |
359 __LOGMETHODSTARTEND( EPhoneUIStates, |
397 "CPhoneTwoSingles::HandleIncomingL()"); |
360 "CPhoneTwoSingles::HandleIncomingL()"); |
398 |
361 |
399 CPhonePubSubProxy::Instance()->ChangePropertyValue( |
|
400 KPSUidScreenSaver, |
|
401 KScreenSaverAllowScreenSaver, |
|
402 EPhoneScreensaverNotAllowed ); |
|
403 |
|
404 IsNumberEntryUsedL() ? |
|
405 BeginTransEffectLC( ECallUiAppear ) : |
|
406 BeginTransEffectLC( ENumberEntryOpen ); |
|
407 BeginUiUpdateLC(); |
362 BeginUiUpdateLC(); |
408 |
|
409 // Hide the number entry if it exists |
|
410 if ( IsNumberEntryUsedL() ) |
|
411 { |
|
412 SetNumberEntryVisibilityL( EFalse ); |
|
413 } |
|
414 |
363 |
415 TPhoneCmdParamBoolean dialerParam; |
364 TPhoneCmdParamBoolean dialerParam; |
416 dialerParam.SetBoolean( ETrue ); |
365 dialerParam.SetBoolean( ETrue ); |
417 |
366 |
418 // Get allow waiting call header param value. |
367 // Get allow waiting call header param value. |
419 AllowShowingOfWaitingCallHeaderL( dialerParam ); |
368 AllowShowingOfWaitingCallHeaderL( dialerParam ); |
420 |
369 |
421 // Close fast swap window if it's displayed |
370 // Close fast swap window if it's displayed |
422 EikonEnv()->DismissTaskList(); |
371 CEikonEnv::Static()->DismissTaskList(); |
423 |
372 |
424 // Display incoming call |
373 // Display incoming call |
425 DisplayIncomingCallL( aCallId, dialerParam ); |
374 DisplayIncomingCallL( aCallId, dialerParam ); |
426 |
375 |
427 // Set touch controls |
376 // Check if HW Keys or Call UI should be disabled |
428 SetTouchPaneButtonDisabled( EPhoneCallComingCmdAnswer ); |
377 CheckDisableHWKeysAndCallUIL(); |
429 |
378 |
430 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
379 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
431 |
380 |
432 EndUiUpdate(); |
381 EndUiUpdate(); |
433 EndTransEffect(); |
|
434 |
382 |
435 // Go to incoming state |
383 // Go to incoming state |
436 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
384 iCbaManager->SetCbaL( EPhoneCallHandlingIncomingRejectCBA ); |
|
385 |
437 iStateMachine->ChangeState( EPhoneStateTwoSinglesAndWaiting ); |
386 iStateMachine->ChangeState( EPhoneStateTwoSinglesAndWaiting ); |
438 } |
387 } |
439 |
388 |
440 // ----------------------------------------------------------- |
389 // ----------------------------------------------------------- |
441 // CPhoneTwoSingles::DisplayIncomingCallL |
390 // CPhoneTwoSingles::DisplayIncomingCallL |
442 // ----------------------------------------------------------- |
391 // ----------------------------------------------------------- |
443 // |
392 // |
444 void CPhoneTwoSingles::DisplayIncomingCallL( |
393 void CPhoneTwoSingles::DisplayIncomingCallL( |
445 TInt aCallId, |
394 TInt aCallId, |
446 const TPhoneCmdParamBoolean /*aCommandParam*/ ) |
395 const TPhoneCmdParamBoolean aCommandParam ) |
447 { |
396 { |
448 __LOGMETHODSTARTEND( EPhoneUIStates, |
397 __LOGMETHODSTARTEND( EPhoneUIStates, |
449 "CPhoneTwoSingles::DisplayIncomingCallL()"); |
398 "CPhoneTwoSingles::DisplayIncomingCallL()"); |
450 // Close menu bar, if it is displayed |
399 |
451 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
400 // Cannot delete active note, e.g. New call query, |
452 |
401 // but show waiting note with or without caller name |
453 // Remove any phone dialogs if they are displayed |
402 if ( IsAnyQueryActiveL() || |
454 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
403 ( !aCommandParam.Boolean() && iOnScreenDialer ) ) |
|
404 { |
|
405 CallWaitingNoteL( aCallId ); |
|
406 } |
|
407 else |
|
408 { |
|
409 // Remove any phone dialogs if they are displayed |
|
410 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
|
411 } |
455 |
412 |
456 // Indicate that the Phone needs to be sent to the background if |
413 // Indicate that the Phone needs to be sent to the background if |
457 // an application other than the top application is in the foreground |
414 // an application other than the top application is in the foreground |
458 SetNeedToReturnToForegroundAppStatusL( !TopAppIsDisplayedL() ); |
415 TPhoneCmdParamBoolean booleanParam; |
|
416 booleanParam.SetBoolean( !TopAppIsDisplayedL() ); |
|
417 iViewCommandHandle->ExecuteCommandL( |
|
418 EPhoneViewSetNeedToSendToBackgroundStatus, |
|
419 &booleanParam ); |
459 |
420 |
460 // Bring Phone app in the foreground |
421 // Bring Phone app in the foreground |
461 TPhoneCmdParamInteger uidParam; |
422 TPhoneCmdParamInteger uidParam; |
462 uidParam.SetInteger( KUidPhoneApplication.iUid ); |
423 uidParam.SetInteger( KUidPhoneApplication.iUid ); |
463 iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |
424 iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |