16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 // INCLUDES |
19 // INCLUDES |
20 #include <featmgr.h> |
20 #include <featmgr.h> |
21 #include <telephonyvariant.hrh> |
|
22 #include "cphoneincoming.h" |
21 #include "cphoneincoming.h" |
23 #include "phonerssbase.h" |
22 #include "phonerssbase.h" |
24 #include "phonelogger.h" |
23 #include "phonelogger.h" |
25 #include "cphonegeneralgsmmessageshandler.h" |
24 #include "cphonegeneralgsmmessageshandler.h" |
26 #include "phonestatedefinitionsgsm.h" |
25 #include "phonestatedefinitionsgsm.h" |
27 #include "tphonecmdparaminteger.h" |
26 #include "tphonecmdparaminteger.h" |
28 #include "tphonecmdparamboolean.h" |
27 #include "tphonecmdparamboolean.h" |
29 #include "phoneui.hrh" |
28 #include "phoneui.hrh" |
30 #include "mphonestatemachine.h" |
29 #include "mphonestatemachine.h" |
31 #include "mphonestorage.h" |
30 #include "mphonesecuritymodeobserver.h" |
32 #include "cphonecenrepproxy.h" |
|
33 #include "tphonecmdparamcallstatedata.h" |
31 #include "tphonecmdparamcallstatedata.h" |
34 |
32 |
35 // ================= MEMBER FUNCTIONS ======================= |
33 // ================= MEMBER FUNCTIONS ======================= |
36 |
34 |
37 // C++ default constructor can NOT contain any code, that |
35 // C++ default constructor can NOT contain any code, that |
117 aMessage, aCallId ); |
115 aMessage, aCallId ); |
118 } |
116 } |
119 break; |
117 break; |
120 |
118 |
121 case MEngineMonitor::EPEMessageRemoteHeld: |
119 case MEngineMonitor::EPEMessageRemoteHeld: |
122 SendGlobalInfoNoteL( EPhoneInformationRemotePutOnHoldNote, ETrue ); |
120 SendGlobalInfoNoteL( EPhoneInformationRemotePutOnHoldNote ); |
123 break; |
121 break; |
124 |
122 |
125 case MEngineMonitor::EPEMessageRemoteResumed: |
123 case MEngineMonitor::EPEMessageRemoteResumed: |
126 SendGlobalInfoNoteL( EPhoneInformationConnectedNote, ETrue ); |
124 SendGlobalInfoNoteL( EPhoneInformationConnectedNote ); |
127 break; |
125 break; |
|
126 |
|
127 case MEngineMonitor::EPEMessageShowVersion: |
|
128 { |
|
129 if ( iStateMachine->SecurityMode()->IsSecurityMode() ) |
|
130 { |
|
131 // Do nothing if security mode is enabled. |
|
132 return; |
|
133 } |
|
134 } |
|
135 // Fall through |
128 |
136 |
129 // fall through. |
137 // fall through. |
130 case MEngineMonitor::EPEMessageIssuingSSRequest: |
138 case MEngineMonitor::EPEMessageIssuingSSRequest: |
131 case MEngineMonitor::EPEMessageCallBarred: |
139 case MEngineMonitor::EPEMessageCallBarred: |
132 case MEngineMonitor::EPEMessageIssuedSSRequest: |
140 case MEngineMonitor::EPEMessageIssuedSSRequest: |
189 TPhoneCmdParamCallStateData callState; |
197 TPhoneCmdParamCallStateData callState; |
190 callState.SetCallState( EPEStateConnected ); |
198 callState.SetCallState( EPEStateConnected ); |
191 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCallIdByState, &callState ); |
199 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCallIdByState, &callState ); |
192 TInt connectedCall = callState.CallId(); |
200 TInt connectedCall = callState.CallId(); |
193 |
201 |
|
202 IsNumberEntryUsedL() ? |
|
203 BeginTransEffectLC( ECallUiAppear ) : |
|
204 BeginTransEffectLC( ENumberEntryOpen ); |
194 BeginUiUpdateLC(); |
205 BeginUiUpdateLC(); |
|
206 |
|
207 // Hide the number entry if it exists |
|
208 if ( IsNumberEntryUsedL() ) |
|
209 { |
|
210 SetNumberEntryVisibilityL( EFalse ); |
|
211 } |
195 |
212 |
196 TPhoneCmdParamBoolean dialerParam; |
213 TPhoneCmdParamBoolean dialerParam; |
197 dialerParam.SetBoolean( ETrue ); |
214 dialerParam.SetBoolean( ETrue ); |
198 |
215 |
199 AllowShowingOfWaitingCallHeaderL( dialerParam ); |
216 AllowShowingOfWaitingCallHeaderL( dialerParam ); |
200 |
217 |
201 // Close fast swap window if it's displayed |
218 // Close fast swap window if it's displayed |
202 CEikonEnv::Static()->DismissTaskList(); |
219 EikonEnv()->DismissTaskList(); |
203 |
220 |
204 // If the 1st incoming call became Connected, this is waiting call |
221 // If the 1st incoming call became Connected, this is waiting call |
205 // If the 1st incoming call went just Idle, this is a normal call |
222 // If the 1st incoming call went just Idle, this is a normal call |
206 if ( connectedCall > KErrNotFound ) |
223 if ( connectedCall > KErrNotFound ) |
207 { |
224 { |
215 if ( KErrNotFound == connectedCall ) |
232 if ( KErrNotFound == connectedCall ) |
216 { |
233 { |
217 dialerParam.SetBoolean( EFalse ); |
234 dialerParam.SetBoolean( EFalse ); |
218 } |
235 } |
219 |
236 |
|
237 SetToolbarDimming( EFalse ); |
220 // Display incoming call |
238 // Display incoming call |
221 DisplayIncomingCallL( aCallId, dialerParam ); |
239 DisplayIncomingCallL( aCallId, dialerParam ); |
222 |
240 |
223 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
|
224 |
|
225 if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke ) |
|
226 && !CPhoneCenRepProxy::Instance()-> |
|
227 IsTelephonyFeatureSupported( KTelephonyLVFlagAllowUnlockOnIncoming ) |
|
228 && ( IsKeyLockOn() || IsAutoLockOn() ) ) |
|
229 { |
|
230 DisableCallUIL(); |
|
231 } |
|
232 else |
|
233 { |
|
234 // if keys have been locked, disable keylock without information note |
|
235 if ( IsKeyLockOn() ) |
|
236 { |
|
237 iViewCommandHandle->ExecuteCommandL( EPhoneViewDisableKeyLockWithoutNote ); |
|
238 } |
|
239 } |
|
240 |
|
241 if( CPhoneCenRepProxy::Instance()-> |
|
242 IsTelephonyFeatureSupported( KTelephonyLVFlagDisableCallControlHardKeysWhileLocked ) |
|
243 && ( IsKeyLockOn() || IsAutoLockOn() ) ) |
|
244 { |
|
245 DisableHWKeysL(); |
|
246 } |
|
247 |
|
248 EndUiUpdate(); |
241 EndUiUpdate(); |
|
242 EndTransEffect(); |
249 |
243 |
250 if ( connectedCall > KErrNotFound ) |
244 if ( connectedCall > KErrNotFound ) |
251 { |
245 { |
252 // Go to incoming state |
|
253 iCbaManager->UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
246 iCbaManager->UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
254 iStateMachine->ChangeState( EPhoneStateWaitingInSingle ); |
247 iStateMachine->ChangeState( EPhoneStateWaitingInSingle ); |
255 } |
248 } |
256 } |
249 } |
257 |
250 |
263 TInt aCallId, |
256 TInt aCallId, |
264 const TPhoneCmdParamBoolean aCommandParam ) |
257 const TPhoneCmdParamBoolean aCommandParam ) |
265 { |
258 { |
266 __LOGMETHODSTARTEND( EPhoneUIStates, |
259 __LOGMETHODSTARTEND( EPhoneUIStates, |
267 "CPhoneIncoming::DisplayIncomingCallL()"); |
260 "CPhoneIncoming::DisplayIncomingCallL()"); |
268 |
261 |
269 // Cannot delete active note, e.g. New call query, |
262 // Close menu bar, if it is displayed |
270 // but show waiting note with or without caller name |
263 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
271 if ( IsAnyQueryActiveL() || |
264 |
272 ( aCommandParam.Boolean() && iOnScreenDialer ) ) |
265 // Remove any phone dialogs if they are displayed |
273 { |
266 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
274 CallWaitingNoteL( aCallId ); |
267 |
275 } |
268 // if keys have been locked, disable keylock without information note |
276 else |
269 if ( IsKeyLockOn() ) |
277 { |
270 { |
278 // Remove any phone dialogs if they are displayed |
271 iViewCommandHandle->ExecuteCommandL( EPhoneViewDisableKeyLockWithoutNote ); |
279 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
|
280 } |
272 } |
281 |
273 |
282 // Indicate that the Phone needs to be sent to the background if |
274 // Indicate that the Phone needs to be sent to the background if |
283 // an application other than the top application is in the foreground |
275 // an application other than the top application is in the foreground |
284 TPhoneCmdParamBoolean booleanParam; |
276 SetNeedToReturnToForegroundAppStatusL( !TopAppIsDisplayedL() ); |
285 booleanParam.SetBoolean( !TopAppIsDisplayedL() ); |
277 |
286 iViewCommandHandle->ExecuteCommandL( |
|
287 EPhoneViewSetNeedToSendToBackgroundStatus, |
|
288 &booleanParam ); |
|
289 |
|
290 // Bring Phone app in the foreground |
278 // Bring Phone app in the foreground |
291 TPhoneCmdParamInteger uidParam; |
279 TPhoneCmdParamInteger uidParam; |
292 uidParam.SetInteger( KUidPhoneApplication.iUid ); |
280 uidParam.SetInteger( KUidPhoneApplication.iUid ); |
293 iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |
281 iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |
294 &uidParam ); |
282 &uidParam ); |
295 |
283 |
296 // Set Phone as the top application |
284 // Set Phone as the top application |
297 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetTopApplication, |
285 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetTopApplication, |
298 &uidParam ); |
286 &uidParam ); |
299 |
287 |
300 DisplayHeaderForCallComingInL( aCallId, ETrue ); //waiting call |
288 DisplayHeaderForCallComingInL( aCallId, aCommandParam.Boolean() ); //waiting call |
301 } |
289 } |
302 |
290 |
303 // ----------------------------------------------------------- |
291 // ----------------------------------------------------------- |
304 // CPhoneIncoming::AllowShowingOfWaitingCallHeaderL |
292 // CPhoneIncoming::AllowShowingOfWaitingCallHeaderL |
305 // ----------------------------------------------------------- |
293 // ----------------------------------------------------------- |
307 void CPhoneIncoming::AllowShowingOfWaitingCallHeaderL( |
295 void CPhoneIncoming::AllowShowingOfWaitingCallHeaderL( |
308 TPhoneCmdParamBoolean& aCommandParam ) |
296 TPhoneCmdParamBoolean& aCommandParam ) |
309 { |
297 { |
310 __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneIncoming::AllowShowingOfWaitingCallHeaderL() "); |
298 __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneIncoming::AllowShowingOfWaitingCallHeaderL() "); |
311 |
299 |
312 if ( aCommandParam.Boolean() && IsNumberEntryUsedL() ) |
300 iViewCommandHandle->ExecuteCommandL( |
|
301 EPhoneViewAllowWaitingCallHeader, |
|
302 &aCommandParam ); |
|
303 |
|
304 // Non-touch :Hide number entry if it exists on |
|
305 // Touch : an internal operation ongoing |
|
306 // -> do not hide dialer |
|
307 if ( !iOnScreenDialer ) |
|
308 { |
|
309 SetNumberEntryVisibilityL(EFalse); |
|
310 } |
|
311 // If param is true and number entry is open only then |
|
312 // hide number entry. |
|
313 else if ( aCommandParam.Boolean() && IsNumberEntryUsedL() ) |
313 { |
314 { |
314 SetNumberEntryVisibilityL(EFalse); |
315 SetNumberEntryVisibilityL(EFalse); |
315 } |
316 } |
316 } |
317 } |
317 |
318 |