author | William Roberts <williamr@symbian.org> |
Thu, 22 Jul 2010 16:33:21 +0100 | |
branch | GCC_SURGE |
changeset 51 | f39ed5e045e0 |
parent 22 | 6bb1b21d2484 |
parent 46 | bc5a64e5bc3c |
permissions | -rw-r--r-- |
37 | 1 |
/* |
2 |
* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 |
* All rights reserved. |
|
4 |
* This component and the accompanying materials are made available |
|
5 |
* under the terms of "Eclipse Public License v1.0" |
|
6 |
* which accompanies this distribution, and is available |
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 |
* |
|
9 |
* Initial Contributors: |
|
10 |
* Nokia Corporation - initial contribution. |
|
11 |
* |
|
12 |
* Contributors: |
|
13 |
* |
|
14 |
* Description: Implementation of CPhoneEmergency class. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
// INCLUDES |
|
20 |
#include <eikmenub.h> |
|
21 |
#include <StringLoader.h> |
|
22 |
#include <ccpdefs.h> |
|
23 |
#include <featmgr.h> |
|
24 |
#include <cpephonemodelif.h> |
|
25 |
#include <mpeengineinfo.h> |
|
26 |
#include <AknUtils.h> |
|
27 |
||
28 |
#include "cphoneemergency.h" |
|
29 |
#include "tphonecmdparamstring.h" |
|
30 |
#include "tphonecmdparaminteger.h" |
|
31 |
#include "tphonecmdparamboolean.h" |
|
32 |
#include "tphonecmdparamemergencycallheaderdata.h" |
|
33 |
#include "tphonecmdparamcallheaderdata.h" |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
34 |
#include "tphonecmdparamkeycapture.h" |
37 | 35 |
#include "mphonestatemachine.h" |
36 |
#include "phonestatedefinitionsgsm.h" |
|
37 |
#include "phoneviewcommanddefinitions.h" |
|
38 |
#include "phoneui.hrh" |
|
39 |
#include "phonerssbase.h" |
|
40 |
#include "cphonemainresourceresolver.h" |
|
41 |
#include "phonelogger.h" |
|
42 |
#include "cphonepubsubproxy.h" |
|
43 |
#include "cphonekeys.h" |
|
44 |
#include "tphonecmdparamaudiooutput.h" |
|
45 |
#include "phoneresourceids.h" |
|
46 |
||
47 |
// ================= MEMBER FUNCTIONS ======================= |
|
48 |
||
49 |
// C++ default constructor can NOT contain any code, that |
|
50 |
// might leave. |
|
51 |
// |
|
52 |
CPhoneEmergency::CPhoneEmergency( |
|
53 |
MPhoneStateMachine* aStateMachine, |
|
54 |
MPhoneViewCommandHandle* aViewCommandHandle, |
|
55 |
MPhoneCustomization* aPhoneCustomization ) : |
|
56 |
CPhoneGsmInCall( aStateMachine, aViewCommandHandle, aPhoneCustomization ), |
|
57 |
iCallSetup( ETrue ) |
|
58 |
{ |
|
59 |
} |
|
60 |
||
61 |
// ----------------------------------------------------------- |
|
62 |
// CPhoneEmergency::~CPhoneEmergency() |
|
63 |
// Destructor |
|
64 |
// (other items were commented in a header). |
|
65 |
// ----------------------------------------------------------- |
|
66 |
||
67 |
CPhoneEmergency::~CPhoneEmergency() |
|
68 |
{ |
|
69 |
} |
|
70 |
||
71 |
// ----------------------------------------------------------- |
|
72 |
// CPhoneEmergency::ConstructL() |
|
73 |
// Constructor |
|
74 |
// (other items were commented in a header). |
|
75 |
// ----------------------------------------------------------- |
|
76 |
// |
|
77 |
void CPhoneEmergency::ConstructL() |
|
78 |
{ |
|
79 |
__LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneEmergency::ConstructL()"); |
|
80 |
CPhoneGsmInCall::ConstructL(); |
|
81 |
} |
|
82 |
||
83 |
// ----------------------------------------------------------- |
|
84 |
// CPhoneEmergency::NewL() |
|
85 |
// Constructor |
|
86 |
// (other items were commented in a header). |
|
87 |
// ----------------------------------------------------------- |
|
88 |
// |
|
89 |
CPhoneEmergency* CPhoneEmergency::NewL( |
|
90 |
MPhoneStateMachine* aStateMachine, |
|
91 |
MPhoneViewCommandHandle* aViewCommandHandle, |
|
92 |
MPhoneCustomization* aPhoneCustomization ) |
|
93 |
{ |
|
94 |
CPhoneEmergency* self = new (ELeave) |
|
95 |
CPhoneEmergency( aStateMachine, aViewCommandHandle, aPhoneCustomization ); |
|
96 |
||
97 |
CleanupStack::PushL( self ); |
|
98 |
self->ConstructL(); |
|
99 |
CleanupStack::Pop( self ); |
|
100 |
||
101 |
return self; |
|
102 |
} |
|
103 |
||
104 |
// ----------------------------------------------------------- |
|
105 |
// CPhoneEmergency::HandleNumberEntryClearedL() |
|
106 |
// ----------------------------------------------------------- |
|
107 |
// |
|
108 |
void CPhoneEmergency::HandleNumberEntryClearedL() |
|
109 |
{ |
|
110 |
__LOGMETHODSTARTEND(EPhoneUIStates, |
|
111 |
"CPhoneEmergency::HandleNumberEntryClearedL()"); |
|
112 |
UpdateInCallCbaL(); |
|
113 |
} |
|
114 |
||
115 |
// ----------------------------------------------------------- |
|
116 |
// CPhoneEmergency::HandlePhoneEngineMessageL |
|
117 |
// ----------------------------------------------------------- |
|
118 |
// |
|
119 |
void CPhoneEmergency::HandlePhoneEngineMessageL( |
|
120 |
const TInt aMessage, |
|
121 |
TInt aCallId ) |
|
122 |
{ |
|
123 |
__LOGMETHODSTARTEND(EPhoneUIStates, |
|
124 |
"CPhoneEmergency::HandlePhoneEngineMessageL() "); |
|
125 |
switch ( aMessage ) |
|
126 |
{ |
|
127 |
case MEngineMonitor::EPEMessageIdle: |
|
128 |
iCallSetup = ETrue; |
|
129 |
HandleIdleL( aCallId ); |
|
130 |
iConnected = EFalse; |
|
131 |
break; |
|
132 |
||
133 |
case MEngineMonitor::EPEMessageDialing: |
|
134 |
HandleDialingL( aCallId ); |
|
135 |
break; |
|
136 |
||
137 |
case MEngineMonitor::EPEMessageConnected: |
|
138 |
if( iCallSetup ) |
|
139 |
{ |
|
140 |
HandleConnectingL( aCallId ); |
|
141 |
iCallSetup = EFalse; |
|
142 |
} |
|
143 |
HandleConnectedL( aCallId ); |
|
144 |
iConnected = ETrue; |
|
145 |
break; |
|
146 |
||
147 |
case MEngineMonitor::EPEMessageConnecting: |
|
148 |
HandleConnectingL( aCallId ); |
|
149 |
iCallSetup = EFalse; |
|
150 |
break; |
|
151 |
||
152 |
case MEngineMonitor::EPEMessageDisconnecting: |
|
153 |
// Explicitly override this handling from CPhoneStateInCall |
|
154 |
// where DTMF sending is cancelled and that causes emergency |
|
155 |
// progress bar destroyed |
|
156 |
CPhoneState::HandlePhoneEngineMessageL( aMessage, aCallId ); |
|
157 |
break; |
|
158 |
||
159 |
case MEngineMonitor::EPEMessageAudioOutputChanged: |
|
160 |
if ( iCallSetup ) |
|
161 |
{ |
|
162 |
HandleAudioOutputChangedL(); |
|
163 |
} |
|
164 |
else |
|
165 |
{ |
|
166 |
CPhoneGsmInCall::HandlePhoneEngineMessageL( aMessage, aCallId ); |
|
167 |
} |
|
168 |
break; |
|
169 |
||
170 |
case MEngineMonitor::EPEMessageStoppedDTMF: // fall through |
|
171 |
case MEngineMonitor::EPEMessageSentDTMF: // fall through |
|
172 |
case MEngineMonitor::EPEMessageDTMFSendingAborted: |
|
173 |
CPhoneGsmInCall::HandlePhoneEngineMessageL( aMessage, aCallId ); |
|
174 |
if ( iStateMachine->PhoneEngineInfo()->CallState( KPEEmergencyCallId ) == EPEStateDialing ) |
|
175 |
{ |
|
176 |
TPhoneCmdParamBoolean isProgressNoteVisible; |
|
177 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsProgressNoteVisible, |
|
178 |
&isProgressNoteVisible ); |
|
179 |
||
180 |
if ( !isProgressNoteVisible.Boolean() ) |
|
181 |
{ |
|
182 |
UpdateSetupCbaL(); |
|
183 |
} |
|
184 |
} |
|
185 |
break; |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
186 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
187 |
case MEngineMonitor::EPEMessageColpNumberAvailable: |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
188 |
//Don't show COLP note during emergency call. |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
189 |
break; |
37 | 190 |
|
191 |
default: |
|
192 |
CPhoneGsmInCall::HandlePhoneEngineMessageL( |
|
193 |
aMessage, aCallId ); |
|
194 |
break; |
|
195 |
} |
|
196 |
} |
|
197 |
||
198 |
// ----------------------------------------------------------- |
|
199 |
// CPhoneEmergency::HandleIdleL |
|
200 |
// ----------------------------------------------------------- |
|
201 |
// |
|
202 |
void CPhoneEmergency::HandleIdleL( TInt aCallId ) |
|
203 |
{ |
|
204 |
__LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneEmergency::HandleIdleL() "); |
|
205 |
||
206 |
// Re-enable global notes, this enables secui (if needed) to come on top |
|
207 |
// if call creation was rejected by user |
|
208 |
TPhoneCmdParamBoolean globalNotifierParam; |
|
209 |
globalNotifierParam.SetBoolean( EFalse ); |
|
210 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
|
211 |
&globalNotifierParam ); |
|
212 |
||
213 |
if ( iOnScreenDialer && IsDTMFEditorVisibleL() ) |
|
214 |
{ |
|
215 |
CloseDTMFEditorL(); |
|
216 |
} |
|
217 |
||
218 |
if ( aCallId == KEmergencyCallId ) |
|
219 |
{ |
|
220 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
|
221 |
// Remove emergency connecting note if still there |
|
222 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNote ); |
|
223 |
// Close menu bar, if it is displayed |
|
224 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
225 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
226 |
TPhoneCmdParamKeyCapture captureParam; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
227 |
captureParam.SetKeyCode( EKeyNo ); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
228 |
iViewCommandHandle->ExecuteCommand( |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
229 |
EPhoneViewStopCapturingKey, &captureParam ); |
37 | 230 |
|
231 |
const TBool isSimStateNotPresentWithSecurityMode = IsSimStateNotPresentWithSecurityModeEnabled(); |
|
232 |
||
233 |
// Sim IS not ok when making emergency call from Pin query, no note |
|
234 |
if ( (!IsSimOk() && !iStartupInterrupted) || isSimStateNotPresentWithSecurityMode ) |
|
235 |
{ |
|
236 |
StartShowSecurityNoteL(); |
|
237 |
} |
|
238 |
else |
|
239 |
{ |
|
240 |
if ( !TopAppIsDisplayedL() || iDeviceLockOn ) |
|
241 |
{ |
|
242 |
// Continue displaying current app but set up the |
|
243 |
// idle screen in the background |
|
244 |
SetupIdleScreenInBackgroundL(); |
|
245 |
||
246 |
// Update toolbar |
|
247 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateToolbar ); |
|
248 |
} |
|
249 |
||
250 |
else if ( iOnScreenDialer && IsNumberEntryContentStored() ) |
|
251 |
{ |
|
252 |
if ( !IsNumberEntryUsedL() ) |
|
253 |
{ |
|
254 |
CreateNumberEntryL(); |
|
255 |
} |
|
256 |
// Restore the number entry content from cache |
|
257 |
RestoreNumberEntryContentL(); |
|
258 |
SetNumberEntryVisibilityL(ETrue); |
|
259 |
} |
|
260 |
||
261 |
else if ( IsNumberEntryUsedL() ) |
|
262 |
{ |
|
263 |
// Show the number entry if it exists |
|
264 |
SetNumberEntryVisibilityL(ETrue); |
|
265 |
// Update toolbar |
|
266 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateToolbar ); |
|
267 |
} |
|
268 |
||
269 |
else |
|
270 |
{ |
|
271 |
// Display idle screen |
|
272 |
DisplayIdleScreenL(); |
|
273 |
} |
|
274 |
||
275 |
// Display call termination note, if necessary |
|
276 |
if ( iConnected ) |
|
277 |
{ |
|
278 |
DisplayCallTerminationNoteL(); |
|
279 |
} |
|
280 |
} |
|
281 |
||
282 |
// Go to emergency idle state or to startup state if emergency call |
|
283 |
// initiated from PIN query |
|
284 |
if ( iStartupInterrupted ) |
|
285 |
{ |
|
286 |
iStartupInterrupted = EFalse; |
|
287 |
iStateMachine->ChangeState( EPhoneStateStartup ); |
|
288 |
} |
|
289 |
else |
|
290 |
{ |
|
291 |
if ( !isSimStateNotPresentWithSecurityMode ) |
|
292 |
{ |
|
293 |
SetDefaultFlagsL(); |
|
294 |
} |
|
295 |
||
296 |
// As long as security note is not shown with feature flag |
|
297 |
// KFeatureIdFfSimlessOfflineSupport undef it is ok to do SetupIdleScreenInBackgroundL. |
|
298 |
if ( ( !IsNumberEntryUsedL() ) && |
|
299 |
!( IsSimStateNotPresentWithSecurityModeEnabled() && |
|
300 |
!FeatureManager::FeatureSupported( KFeatureIdFfSimlessOfflineSupport ) ) ) |
|
301 |
{ |
|
302 |
UpdateCbaL( EPhoneEmptyCBA ); |
|
303 |
||
304 |
TPhoneCmdParamBoolean securityMode; |
|
305 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewGetSecurityModeStatus, &securityMode ); |
|
306 |
if ( !securityMode.Boolean() ) |
|
307 |
{ |
|
308 |
// Setup idle as next active app. |
|
309 |
SetupIdleScreenInBackgroundL(); |
|
310 |
} |
|
311 |
} |
|
312 |
||
313 |
iStateMachine->ChangeState( EPhoneStateIdle ); |
|
314 |
} |
|
315 |
} |
|
316 |
else |
|
317 |
{ |
|
318 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveAllCallHeaders ); |
|
319 |
} |
|
320 |
} |
|
321 |
||
322 |
||
323 |
// ----------------------------------------------------------- |
|
324 |
// CPhoneEmergency::HandleDialingL |
|
325 |
// ----------------------------------------------------------- |
|
326 |
// |
|
327 |
void CPhoneEmergency::HandleDialingL( TInt aCallId ) |
|
328 |
{ |
|
329 |
// Discard all messages related to other calls than the emergency call |
|
330 |
// We trust that the ISA call server has taken care of them. However, |
|
331 |
// there could be a race condition between returning to Normal |
|
332 |
// mode (receiving a network registration status message from PE) |
|
333 |
// and receiving an EPEMessageDialling message. This can occur |
|
334 |
// because PE messages are processed asynchronously. |
|
335 |
__LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneEmergency::HandleDialingL() "); |
|
336 |
||
337 |
if ( aCallId == KPEEmergencyCallId ) |
|
338 |
{ |
|
339 |
if ( !IsSimOk() ) |
|
340 |
{ |
|
341 |
TPhoneCmdParamBoolean visibleMode; |
|
342 |
visibleMode.SetBoolean( ETrue ); |
|
343 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetStatusPaneVisible, &visibleMode ); |
|
344 |
} |
|
345 |
||
346 |
iDeviceLockOn = IsAutoLockOn(); |
|
347 |
||
348 |
// Close menu bar, if it is displayed |
|
349 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
350 |
||
351 |
// Disable global notes when the phone is dialling |
|
352 |
TPhoneCmdParamBoolean globalNotifierParam; |
|
353 |
globalNotifierParam.SetBoolean( ETrue ); |
|
354 |
iViewCommandHandle->ExecuteCommandL( |
|
355 |
EPhoneViewSetGlobalNotifiersDisabled, |
|
356 |
&globalNotifierParam ); |
|
357 |
||
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
358 |
TPhoneCmdParamKeyCapture captureParam; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
359 |
captureParam.SetKeyCode( EKeyNo ); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
360 |
iViewCommandHandle->ExecuteCommand( EPhoneViewStartCapturingKey, &captureParam ); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
361 |
|
37 | 362 |
// Capture keys when the phone is dialling |
363 |
CaptureKeysDuringCallNotificationL( ETrue ); |
|
364 |
||
365 |
// Indicate that the Phone needs to be sent to the background if |
|
366 |
// an application other than the top application is in the foreground |
|
367 |
TPhoneCmdParamBoolean booleanParam; |
|
368 |
booleanParam.SetBoolean( !TopAppIsDisplayedL() ); |
|
369 |
iViewCommandHandle->ExecuteCommandL( |
|
370 |
EPhoneViewSetNeedToSendToBackgroundStatus, |
|
371 |
&booleanParam ); |
|
372 |
||
373 |
// Bring Phone app in the foreground |
|
374 |
TPhoneCmdParamInteger uidParam; |
|
375 |
uidParam.SetInteger( KUidPhoneApplication.iUid ); |
|
376 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |
|
377 |
&uidParam ); |
|
378 |
||
379 |
// Set Phone as the top application |
|
380 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetTopApplication, |
|
381 |
&uidParam ); |
|
382 |
||
383 |
// Hide the number entry if it is visible |
|
384 |
if ( IsNumberEntryUsedL() ) |
|
385 |
{ |
|
386 |
// Remove number entry |
|
387 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
|
388 |
} |
|
389 |
||
390 |
// Remove exit emergency mode query, if it exists |
|
391 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveQuery ); |
|
392 |
||
393 |
// Enable the volume display |
|
394 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNaviPaneAudioVolume ); |
|
395 |
||
396 |
BeginUiUpdateLC(); |
|
397 |
||
398 |
TPhoneCmdParamEmergencyCallHeaderData emergencyHeaderParam; |
|
399 |
// Set call header |
|
400 |
TBuf<KPhoneCallHeaderLabelMaxLength> headerText( KNullDesC ); |
|
401 |
StringLoader::Load( |
|
402 |
headerText, |
|
403 |
CPhoneMainResourceResolver::Instance()->ResolveResourceID( |
|
404 |
EPhoneEmergencyCallHeader ), |
|
405 |
CCoeEnv::Static() ); |
|
406 |
emergencyHeaderParam.SetHeaderText( headerText ); |
|
407 |
||
408 |
// Set call header ciphering status |
|
409 |
emergencyHeaderParam.SetCiphering( |
|
410 |
iStateMachine->PhoneEngineInfo()->IsSecureCall( aCallId ) ); |
|
411 |
emergencyHeaderParam.SetCipheringIndicatorAllowed( |
|
412 |
iStateMachine->PhoneEngineInfo()->SecureSpecified() ); |
|
413 |
||
414 |
// Notify the view |
|
415 |
iViewCommandHandle->ExecuteCommandL( |
|
416 |
EPhoneViewCreateEmergencyCallHeader, |
|
417 |
aCallId, |
|
418 |
&emergencyHeaderParam ); |
|
419 |
||
420 |
TPhoneCmdParamCallHeaderData headerParam; |
|
421 |
headerParam.SetCallState( EPEStateDialing ); |
|
422 |
||
423 |
StringLoader::Load( |
|
424 |
headerText, |
|
425 |
CPhoneMainResourceResolver::Instance()->ResolveResourceID( |
|
426 |
EPhoneAttemptingEmergencyText ), |
|
427 |
CCoeEnv::Static() ); |
|
428 |
headerParam.SetLabelText( headerText ); |
|
429 |
||
430 |
iViewCommandHandle->ExecuteCommandL( |
|
431 |
EPhoneViewUpdateBubble, |
|
432 |
aCallId, |
|
433 |
&headerParam ); |
|
434 |
||
435 |
SetTouchPaneButtons( EPhoneEmergencyCallButtons ); |
|
436 |
SetBackButtonActive(EFalse); |
|
437 |
||
438 |
EndUiUpdate(); |
|
439 |
||
440 |
// ShowNoteL( EPhoneEmergencyConnectWaitNote ); |
|
441 |
UpdateSetupCbaL(); |
|
442 |
} |
|
443 |
} |
|
444 |
// ----------------------------------------------------------- |
|
445 |
// CPhoneEmergency::HandleConnectingL |
|
446 |
// ----------------------------------------------------------- |
|
447 |
// |
|
448 |
void CPhoneEmergency::HandleConnectingL( TInt aCallId ) |
|
449 |
{ |
|
450 |
__LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneEmergency::HandleConnectingL() "); |
|
451 |
||
452 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveGlobalNote ); |
|
453 |
||
454 |
// Re-enable global notes |
|
455 |
TPhoneCmdParamBoolean globalNotifierParam; |
|
456 |
globalNotifierParam.SetBoolean( EFalse ); |
|
457 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
|
458 |
&globalNotifierParam ); |
|
459 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetEikonNotifiersDisabled, |
|
460 |
&globalNotifierParam ); |
|
461 |
||
462 |
if( TouchCallHandlingSupported() ) |
|
463 |
{ |
|
464 |
if ( !IsSimStateNotPresentWithSecurityModeEnabled() ) |
|
465 |
{ |
|
466 |
// Stop capturing keys |
|
467 |
CaptureKeysDuringCallNotificationL( EFalse ); |
|
468 |
} |
|
469 |
} |
|
470 |
else if ( !iDeviceLockOn && SimState() == EPESimUsable ) |
|
471 |
{ |
|
472 |
// Stop capturing keys |
|
473 |
CaptureKeysDuringCallNotificationL( EFalse ); |
|
474 |
} |
|
475 |
||
476 |
// Keep Phone in the foreground |
|
477 |
TPhoneCmdParamBoolean booleanParam; |
|
478 |
booleanParam.SetBoolean( EFalse ); |
|
479 |
iViewCommandHandle->ExecuteCommandL( |
|
480 |
EPhoneViewSetNeedToSendToBackgroundStatus, &booleanParam ); |
|
481 |
||
482 |
// Remove emergency connecting note |
|
483 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNote ); |
|
484 |
||
485 |
TPhoneCmdParamCallHeaderData headerParam; |
|
486 |
headerParam.SetCallState( EPEStateConnecting ); |
|
487 |
// Notify the view |
|
488 |
iViewCommandHandle->ExecuteCommandL( |
|
489 |
EPhoneViewUpdateBubble, |
|
490 |
aCallId, |
|
491 |
&headerParam ); |
|
492 |
||
493 |
SetToolbarButtonLoudspeakerEnabled(); |
|
494 |
||
495 |
UpdateInCallCbaL(); |
|
496 |
} |
|
497 |
||
498 |
// ----------------------------------------------------------- |
|
499 |
// CPhoneEmergency::HandleConnectedL |
|
500 |
// ----------------------------------------------------------- |
|
501 |
// |
|
502 |
void CPhoneEmergency::HandleConnectedL( TInt aCallId ) |
|
503 |
{ |
|
504 |
__LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneEmergency::HandleConnectedL() "); |
|
505 |
||
506 |
BeginUiUpdateLC(); |
|
507 |
||
508 |
TPhoneCmdParamCallHeaderData emergencyHeaderParam; |
|
509 |
emergencyHeaderParam.SetCallState( EPEStateConnected ); |
|
510 |
// Notify the view |
|
511 |
iViewCommandHandle->ExecuteCommandL( |
|
512 |
EPhoneViewUpdateBubble, |
|
513 |
aCallId, |
|
514 |
&emergencyHeaderParam ); |
|
515 |
||
516 |
SetBackButtonActive(ETrue); |
|
517 |
||
518 |
EndUiUpdate(); |
|
519 |
SetToolbarDimming( ETrue ); |
|
520 |
UpdateInCallCbaL(); |
|
521 |
} |
|
522 |
||
523 |
// ----------------------------------------------------------- |
|
524 |
// CPhoneEmergency::OpenMenuBarL |
|
525 |
// ----------------------------------------------------------- |
|
526 |
// |
|
527 |
void CPhoneEmergency::OpenMenuBarL() |
|
528 |
{ |
|
529 |
__LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneEmergency::OpenMenuBarL() "); |
|
530 |
TInt resourceId; |
|
531 |
||
532 |
if ( iOnScreenDialer && IsDTMFEditorVisibleL() ) |
|
533 |
{ |
|
534 |
resourceId = EPhoneDtmfDialerMenubar; |
|
535 |
} |
|
536 |
else if ( IsNumberEntryVisibleL() ) |
|
537 |
{ |
|
538 |
resourceId = EPhoneCallHandlingEmergencyMenubarWithNumberEntry; |
|
539 |
} |
|
540 |
else |
|
541 |
{ |
|
542 |
resourceId = EPhoneCallHandlingEmergencyMenubar; |
|
543 |
} |
|
544 |
||
545 |
TPhoneCmdParamInteger integerParam; |
|
546 |
integerParam.SetInteger( |
|
547 |
CPhoneMainResourceResolver::Instance()-> |
|
548 |
ResolveResourceID( resourceId ) ); |
|
549 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarOpen, |
|
550 |
&integerParam ); |
|
551 |
} |
|
552 |
||
553 |
||
554 |
// ----------------------------------------------------------- |
|
555 |
// CPhoneEmergency::UpdateInCallCbaL |
|
556 |
// ----------------------------------------------------------- |
|
557 |
// |
|
558 |
void CPhoneEmergency::UpdateInCallCbaL() |
|
559 |
{ |
|
560 |
__LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneEmergency::UpdateInCallCbaL() "); |
|
561 |
TInt resourceId = EPhoneCallHandlingEmergencyCBA; |
|
562 |
iCbaManager->SetCbaL( resourceId ); |
|
563 |
} |
|
564 |
||
565 |
// -------------------------------------------------------------- |
|
566 |
// CPhoneEmergency::HandleKeyMessageL |
|
567 |
// -------------------------------------------------------------- |
|
568 |
// |
|
569 |
void CPhoneEmergency::HandleKeyMessageL( |
|
570 |
TPhoneKeyEventMessages aMessage, |
|
571 |
TKeyCode aCode ) |
|
572 |
{ |
|
573 |
__LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneEmergency::HandleKeyMessageL()"); |
|
574 |
||
575 |
switch ( aCode ) |
|
576 |
{ |
|
577 |
// end-key |
|
578 |
case EKeyNo: |
|
579 |
// handle end key |
|
580 |
if ( iOnScreenDialer && IsDTMFEditorVisibleL() ) |
|
581 |
{ |
|
582 |
CloseDTMFEditorL(); |
|
583 |
} |
|
584 |
DisconnectEmergencyCallL(); |
|
585 |
break; |
|
586 |
||
587 |
// send-key |
|
588 |
case EKeyYes: |
|
589 |
if( iOnScreenDialer && IsNumberEntryVisibleL() ) |
|
590 |
{ |
|
591 |
TPhoneCmdParamInteger numberEntryCountParam; |
|
592 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewGetNumberEntryCount, |
|
593 |
&numberEntryCountParam ); |
|
594 |
TInt neLength( numberEntryCountParam.Integer() ); |
|
595 |
if ( neLength ) |
|
596 |
{ |
|
597 |
// Show not allowed note |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
598 |
SendGlobalErrorNoteL( EPhoneNoteTextNotAllowed, ETrue ); |
37 | 599 |
} |
600 |
else |
|
601 |
{ |
|
602 |
// Logs to open |
|
603 |
CallFromNumberEntryL(); |
|
604 |
} |
|
605 |
} |
|
606 |
else |
|
607 |
{ |
|
608 |
// Show not allowed note |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
609 |
SendGlobalErrorNoteL( EPhoneNoteTextNotAllowed, ETrue ); |
37 | 610 |
} |
611 |
break; |
|
612 |
||
613 |
default: |
|
614 |
{ |
|
615 |
if ( TouchCallHandlingSupported() ) |
|
616 |
{ |
|
617 |
CPhoneGsmInCall::HandleKeyMessageL( aMessage, aCode ); |
|
618 |
} |
|
619 |
else if ( !iDeviceLockOn && SimState() == EPESimUsable ) |
|
620 |
{ |
|
621 |
// do base operation |
|
622 |
CPhoneGsmInCall::HandleKeyMessageL( aMessage, aCode ); |
|
623 |
} |
|
624 |
break; |
|
625 |
} |
|
626 |
} |
|
627 |
} |
|
628 |
||
629 |
// ----------------------------------------------------------- |
|
630 |
// CPhoneEmergency::HandleCommandL |
|
631 |
// ----------------------------------------------------------- |
|
632 |
// |
|
633 |
TBool CPhoneEmergency::HandleCommandL( TInt aCommand ) |
|
634 |
{ |
|
635 |
__LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneEmergency::HandleCommandL()"); |
|
636 |
TBool commandStatus = ETrue; |
|
637 |
||
638 |
switch( aCommand ) |
|
639 |
{ |
|
640 |
case EPhoneInCallCmdDtmfManualQuery: |
|
641 |
if ( iStateMachine->PhoneEngineInfo()->CallState( KPEEmergencyCallId ) == EPEStateDialing ) |
|
642 |
{ |
|
643 |
// Remove emergency connecting note |
|
644 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNote ); |
|
645 |
} |
|
646 |
commandStatus = CPhoneGsmInCall::HandleCommandL( aCommand ); |
|
647 |
break; |
|
648 |
||
649 |
case EPhoneDtmfDialerExit: // fall through |
|
650 |
case EPhoneDtmfDialerCancel: |
|
651 |
{ |
|
652 |
if ( iStateMachine->PhoneEngineInfo()->CallState( KPEEmergencyCallId ) == EPEStateDialing ) |
|
653 |
{ |
|
654 |
CloseDTMFEditorL(); |
|
655 |
||
656 |
TPhoneCmdParamBoolean isProgressNoteVisible; |
|
657 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsProgressNoteVisible, |
|
658 |
&isProgressNoteVisible ); |
|
659 |
||
660 |
if ( !isProgressNoteVisible.Boolean() ) |
|
661 |
{ |
|
662 |
UpdateSetupCbaL(); |
|
663 |
} |
|
664 |
} |
|
665 |
else |
|
666 |
{ |
|
667 |
commandStatus = CPhoneGsmInCall::HandleCommandL( aCommand ); |
|
668 |
} |
|
669 |
} |
|
670 |
break; |
|
671 |
||
672 |
case EPhoneInCallCmdEndThisOutgoingCall: |
|
673 |
case EPhoneInCallCmdEndThisActiveCall: |
|
674 |
DisconnectEmergencyCallL(); |
|
675 |
break; |
|
676 |
||
677 |
default: |
|
678 |
commandStatus = CPhoneGsmInCall::HandleCommandL( aCommand ); |
|
679 |
break; |
|
680 |
} |
|
681 |
||
682 |
return commandStatus; |
|
683 |
} |
|
684 |
||
685 |
// ----------------------------------------------------------- |
|
686 |
// CPhoneEmergency::DisconnectEmergencyCallL |
|
687 |
// ----------------------------------------------------------- |
|
688 |
// |
|
689 |
void CPhoneEmergency::DisconnectEmergencyCallL() |
|
690 |
{ |
|
691 |
__LOGMETHODSTARTEND(EPhoneUIStates, |
|
692 |
"CPhoneEmergency::DisconnectEmergencyCallL()"); |
|
693 |
// Release the call |
|
694 |
iStateMachine->SetCallId( |
|
695 |
KEmergencyCallId ); |
|
696 |
iStateMachine->SendPhoneEngineMessage( |
|
697 |
CPEPhoneModelIF::EPEMessageRelease ); |
|
698 |
} |
|
699 |
||
700 |
// ----------------------------------------------------------- |
|
701 |
// CPhoneEmergency::HandleErrorL |
|
702 |
// Emergency handling for HandleError message |
|
703 |
// (other items were commented in a header). |
|
704 |
// ----------------------------------------------------------- |
|
705 |
// |
|
706 |
void CPhoneEmergency::HandleErrorL( const TPEErrorInfo& aErrorInfo ) |
|
707 |
{ |
|
708 |
__LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneEmergency::HandleError()"); |
|
709 |
||
710 |
switch( aErrorInfo.iErrorCode ) |
|
711 |
{ |
|
712 |
case ECCPErrorCCNoRouteToDestination: |
|
713 |
case ECCPErrorUnacceptableChannel: |
|
714 |
case ECCPErrorCCDestinationOutOfOrder: |
|
715 |
case ECCPErrorNetworkOutOfOrder: |
|
716 |
case ECCPErrorAccessInformationDiscarded: |
|
717 |
case ECCPErrorCCResourceNotAvailable: |
|
718 |
case ECCPErrorQualityOfServiceNotAvailable: |
|
719 |
case ECCPErrorInvalidCallReferenceValue: |
|
720 |
case ECCPErrorBadRequest: |
|
721 |
case ECCPErrorConnectionError: |
|
722 |
case ECCPErrorCCIncompatibleMessageInProtocolState: |
|
723 |
case ECCPErrorCCNoChannelAvailable: |
|
724 |
case ECCPErrorNetworkBusy: |
|
725 |
case ECCPEmergencyFailed: |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
726 |
SendGlobalErrorNoteL( EPhoneNoteNoNetworkCallEmergency, ETrue ); |
37 | 727 |
break; |
728 |
||
729 |
default: |
|
730 |
__PHONELOG1( |
|
731 |
EOnlyFatal, |
|
732 |
EPhoneUIStates, |
|
733 |
"PHONEUI_ERROR: CPhoneEmergency::HandleError - Error send to PhoneState (err=%d)", |
|
734 |
aErrorInfo.iErrorCode); |
|
735 |
CPhoneState::HandleErrorL( aErrorInfo ); |
|
736 |
break; |
|
737 |
} |
|
738 |
} |
|
739 |
||
740 |
// ----------------------------------------------------------- |
|
741 |
// CPhoneEmergency::HandleKeyEventL |
|
742 |
// ----------------------------------------------------------- |
|
743 |
// |
|
744 |
void CPhoneEmergency::HandleKeyEventL( |
|
745 |
const TKeyEvent& aKeyEvent, |
|
746 |
TEventCode aEventCode ) |
|
747 |
{ |
|
748 |
__LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneEmergency::HandleKeyEventL( ) "); |
|
749 |
||
750 |
if ( TouchCallHandlingSupported() ) |
|
751 |
{ |
|
752 |
CPhoneState::HandleKeyEventL( aKeyEvent, aEventCode ); |
|
753 |
} |
|
754 |
else |
|
755 |
{ |
|
756 |
if ( iDeviceLockOn && CPhoneKeys::IsNumericKey( aKeyEvent, aEventCode ) ) |
|
757 |
{ |
|
758 |
// Send the key event to the phone engine |
|
759 |
SendKeyEventL( aKeyEvent, aEventCode ); |
|
760 |
} |
|
761 |
else |
|
762 |
{ |
|
763 |
// Handle numeric keys when key events are received in idle state |
|
764 |
CPhoneState::HandleKeyEventL( aKeyEvent, aEventCode ); |
|
765 |
} |
|
766 |
} |
|
767 |
} |
|
768 |
||
769 |
// ----------------------------------------------------------- |
|
770 |
// CPhoneEmergency::SendKeyEventL |
|
771 |
// ----------------------------------------------------------- |
|
772 |
// |
|
773 |
void CPhoneEmergency::SendKeyEventL( |
|
774 |
const TKeyEvent& aKeyEvent, |
|
775 |
TEventCode aEventCode ) |
|
776 |
{ |
|
777 |
__LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneEmergency::SendKeyEventL( ) "); |
|
778 |
switch( aEventCode ) |
|
779 |
{ |
|
780 |
// EEventKey |
|
781 |
case EEventKey: |
|
782 |
{ |
|
783 |
// Convert key code to western. |
|
784 |
TBuf<1> buffer; // one character |
|
785 |
buffer.Append( aKeyEvent.iCode ); |
|
786 |
__PHONELOG1( EBasic, EPhoneControl, |
|
787 |
"CPhoneEmergency::SendKeyEventL(%S)", |
|
788 |
&buffer ); |
|
789 |
AknTextUtils::ConvertDigitsTo( buffer, EDigitTypeWestern ); |
|
790 |
__PHONELOG1( EBasic, EPhoneControl, |
|
791 |
"CPhoneEmergency::SendKeyEventL(%S)", |
|
792 |
&buffer ); |
|
793 |
TLex code( buffer ); |
|
794 |
// Save the key code |
|
795 |
iStateMachine->PhoneEngineInfo()->SetKeyCode( code.Peek() ); |
|
796 |
// Plays a DTMF tone if active call |
|
797 |
iStateMachine->SendPhoneEngineMessage( |
|
798 |
CPEPhoneModelIF::EPEMessagePlayDTMF ); |
|
799 |
} |
|
800 |
break; |
|
801 |
// EEventKeyUp |
|
802 |
case EEventKeyUp: |
|
803 |
// Send a key up event for the last key code sent to |
|
804 |
// the phone engine |
|
805 |
iStateMachine->SendPhoneEngineMessage( |
|
806 |
CPEPhoneModelIF::EPEMessageEndDTMF ); |
|
807 |
break; |
|
808 |
default: |
|
809 |
break; |
|
810 |
} |
|
811 |
} |
|
812 |
||
813 |
// ----------------------------------------------------------------------------- |
|
814 |
// CPhoneEmergency::HandleAudioOutputChangedL |
|
815 |
// for setup |
|
816 |
// ----------------------------------------------------------------------------- |
|
817 |
// |
|
818 |
void CPhoneEmergency::HandleAudioOutputChangedL() |
|
819 |
{ |
|
820 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneEmergency::HandleAudioOutputChangedL( ) "); |
|
821 |
||
822 |
// Audio Output |
|
823 |
TPhoneCmdParamAudioOutput outputParam; |
|
824 |
||
825 |
// Output |
|
826 |
const TPEAudioOutput audioOutput = |
|
827 |
iStateMachine->PhoneEngineInfo()->AudioOutput(); |
|
828 |
||
829 |
UpdateSetupCbaL(); |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
830 |
SetTouchPaneButtons(0); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
831 |
|
37 | 832 |
// view update |
833 |
outputParam.SetAudioOutput( audioOutput ); |
|
834 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewActivateAudioPathUIChanges, |
|
835 |
&outputParam ); |
|
836 |
||
837 |
} |
|
838 |
||
839 |
// ----------------------------------------------------------------------------- |
|
840 |
// CPhoneEmergency::SetStartupInterrupted |
|
841 |
// ----------------------------------------------------------------------------- |
|
842 |
// |
|
843 |
void CPhoneEmergency::SetStartupInterrupted( const TBool aStartupInterrupted ) |
|
844 |
{ |
|
845 |
iStartupInterrupted = aStartupInterrupted; |
|
846 |
} |
|
847 |
||
848 |
// ----------------------------------------------------------- |
|
849 |
// CPhoneEmergency::UpdateSetupCbaL |
|
850 |
// ----------------------------------------------------------- |
|
851 |
// |
|
852 |
void CPhoneEmergency::UpdateSetupCbaL() |
|
853 |
{ |
|
854 |
__LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneEmergency::UpdateSetupCbaL() "); |
|
855 |
TInt resourceId = EPhoneCallHandlingEmergencyCBA; |
|
856 |
iCbaManager->SetCbaL( resourceId ); |
|
857 |
} |
|
858 |
||
859 |
// --------------------------------------------------------- |
|
860 |
// CPhoneEmergency::HandleCreateNumberEntryL |
|
861 |
// |
|
862 |
// --------------------------------------------------------- |
|
863 |
// |
|
864 |
void CPhoneEmergency::HandleCreateNumberEntryL( const TKeyEvent& aKeyEvent, |
|
865 |
TEventCode aEventCode ) |
|
866 |
{ |
|
867 |
__LOGMETHODSTARTEND( EPhoneControl, "CPhoneEmergency::HandleCreateNumberEntryL() "); |
|
868 |
if ( !iCallSetup && !iStartupInterrupted ) |
|
869 |
{ |
|
870 |
CPhoneGsmInCall::HandleCreateNumberEntryL( aKeyEvent, aEventCode ); |
|
871 |
} |
|
872 |
||
873 |
} |
|
874 |
||
875 |
// ----------------------------------------------------------------------------- |
|
876 |
// CPhoneEmergency::HandleRemConCommandL |
|
877 |
// ----------------------------------------------------------------------------- |
|
878 |
// |
|
879 |
EXPORT_C TBool CPhoneEmergency::HandleRemConCommandL( |
|
880 |
TRemConCoreApiOperationId aOperationId, |
|
881 |
TRemConCoreApiButtonAction aButtonAct ) |
|
882 |
{ |
|
883 |
TBool handled = EFalse; |
|
884 |
||
885 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneEmergency::MrccatoCommand() "); |
|
886 |
||
887 |
switch ( aOperationId ) |
|
888 |
{ |
|
889 |
case ERemConCoreApiMute: |
|
890 |
__PHONELOG( EBasic, EPhoneControl, "CPhoneEmergency::MrccatoCommand emerg. call no muting" ); |
|
891 |
// Not Allowed |
|
892 |
break; |
|
893 |
default: |
|
894 |
handled = CPhoneState::HandleRemConCommandL( aOperationId, aButtonAct ); |
|
895 |
break; |
|
896 |
} |
|
897 |
return handled; |
|
898 |
} |
|
899 |
||
900 |
// -------------------------------------------------------------- |
|
901 |
// CPhoneEmergency::TouchCallHandlingSupported |
|
902 |
// -------------------------------------------------------------- |
|
903 |
// |
|
904 |
TBool CPhoneEmergency::TouchCallHandlingSupported () const |
|
905 |
{ |
|
906 |
if ( FeatureManager::FeatureSupported ( KFeatureIdTouchCallHandling ) ) |
|
907 |
{ |
|
908 |
return ETrue; |
|
909 |
} |
|
910 |
else |
|
911 |
{ |
|
912 |
return EFalse; |
|
913 |
} |
|
914 |
} |
|
915 |
||
916 |
// -------------------------------------------------------------- |
|
917 |
// CPhoneEmergency::UseEmergencyNoIhfCBA |
|
918 |
// -------------------------------------------------------------- |
|
919 |
// |
|
920 |
TBool CPhoneEmergency::UseEmergencyNoIhfCBA( const TPEAudioOutput& aAudioOutput ) const |
|
921 |
{ |
|
922 |
if ( !( TouchCallHandlingSupported() ) |
|
923 |
&& ( ( aAudioOutput == EPEWiredAudioAccessory ) || ( IsSwivelClosed() ) ) ) |
|
924 |
{ |
|
925 |
return ETrue; |
|
926 |
} |
|
927 |
else |
|
928 |
{ |
|
929 |
return EFalse; |
|
930 |
} |
|
931 |
} |
|
932 |
||
933 |
// -------------------------------------------------------------- |
|
934 |
// CPhoneEmergency::UseHandsetEmergencyCBA |
|
935 |
// -------------------------------------------------------------- |
|
936 |
// |
|
937 |
TBool CPhoneEmergency::UseHandsetEmergencyCBA( const TPEAudioOutput& aAudioOutput ) const |
|
938 |
{ |
|
939 |
if ( !( TouchCallHandlingSupported() ) |
|
940 |
&& ( ( aAudioOutput == EPELoudspeaker ) || ( aAudioOutput == EPEBTAudioAccessory ) ) ) |
|
941 |
{ |
|
942 |
return ETrue; |
|
943 |
} |
|
944 |
else |
|
945 |
{ |
|
946 |
return EFalse; |
|
947 |
} |
|
948 |
} |
|
949 |
||
950 |
// End of File |