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