author | Fionntina Carville <fionntinac@symbian.org> |
Mon, 15 Nov 2010 11:44:32 +0000 | |
branch | RCL_3 |
changeset 84 | 1dabaed15bcd |
parent 81 | c26cc2a7c548 |
permissions | -rw-r--r-- |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
* Description: Implementation of CPhoneStateIdle class. |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
// INCLUDES |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
#include <eikenv.h> |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
#include <e32property.h> |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
#include <connect/sbdefs.h> |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
#include <w32std.h> |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
24 |
#include <StringLoader.h> |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
#include <aknnotedialog.h> // For CAknNoteDialog::EErrorTone |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
26 |
#include <apgcli.h> |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
27 |
#include <telephonyvariant.hrh> |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
28 |
#include <featmgr.h> |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
29 |
#include <settingsinternalcrkeys.h> |
62 | 30 |
#include <ScreensaverInternalPSKeys.h> |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
31 |
#include <mpeengineinfo.h> |
62 | 32 |
#include <activeidle2domainpskeys.h> |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
33 |
#include <mpeclientinformation.h> |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
#include <bldvariant.hrh> |
62 | 35 |
#include <MProEngEngine.h> |
36 |
#include <ProEngFactory.h> |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
37 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
38 |
#include "cphonepubsubproxy.h" |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
39 |
#include "cphonecenrepproxy.h" |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
40 |
#include "cphonestateidle.h" |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
41 |
#include "tphonecmdparaminteger.h" |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
42 |
#include "tphonecmdparamboolean.h" |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
43 |
#include "tphonecmdparamglobalnote.h" |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
44 |
#include "tphonecmdparamstring.h" |
62 | 45 |
#include "tphonecmdparamspeeddial.h" |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
46 |
#include "tphonecmdparamboolean.h" |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
47 |
#include "mphonestatemachine.h" |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
48 |
#include "phonestatedefinitions.h" |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
49 |
#include "tphonecmdparamappinfo.h" |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
50 |
#include "cphonekeys.h" |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
51 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
52 |
#include "tphonecmdparamcallstatedata.h" |
62 | 53 |
#include "tphonecmdparamcallheaderdata.h" |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
54 |
#include "phoneviewcommanddefinitions.h" |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
55 |
#include "phoneui.hrh" |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
56 |
#include "phonerssbase.h" |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
57 |
#include "cphonemainresourceresolver.h" |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
58 |
#include "cphonecenrepproxy.h" |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
59 |
#include "cphonepubsubproxy.h" |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
60 |
#include "phonelogger.h" |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
61 |
#include "phoneui.pan" |
62 | 62 |
#include "phoneconstants.h" |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
63 |
#include "mphonecustomization.h" |
62 | 64 |
#include <easydialingcommands.hrh> |
65 |
#include "mphonesecuritymodeobserver.h" |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
66 |
|
62 | 67 |
//CONSTANTS |
68 |
const TInt KMaxParamLength = 1024; |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
69 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
70 |
// ================= MEMBER FUNCTIONS ======================= |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
71 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
72 |
// C++ default constructor can NOT contain any code, that |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
73 |
// might leave. |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
74 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
75 |
EXPORT_C CPhoneStateIdle::CPhoneStateIdle( |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
76 |
MPhoneStateMachine* aStateMachine, |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
77 |
MPhoneViewCommandHandle* aViewCommandHandle, |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
78 |
MPhoneCustomization* aCustomization ) : |
62 | 79 |
CPhoneState( aStateMachine, aViewCommandHandle, aCustomization ), |
80 |
iCallInitialized( EFalse ) |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
81 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
82 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
83 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
84 |
// Destructor |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
85 |
EXPORT_C CPhoneStateIdle::~CPhoneStateIdle() |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
86 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
87 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
88 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
89 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
90 |
// CPhoneStateIdle::ConstructL() |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
91 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
92 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
93 |
EXPORT_C void CPhoneStateIdle::ConstructL() |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
94 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
95 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::ConstructL() "); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
96 |
CPhoneState::BaseConstructL(); |
62 | 97 |
|
98 |
// Set send key activation on. |
|
99 |
TPhoneCmdParamBoolean boolean; |
|
100 |
boolean.SetBoolean( ETrue ); |
|
101 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetSendKeyDialerActivationFlag, |
|
102 |
&boolean ); |
|
103 |
||
104 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewCreatePhoneBookServices ); |
|
105 |
||
106 |
// If Sim is not ok and we are not at foreground, bring ourselves to foreground |
|
107 |
// so that the security note can be seen. |
|
108 |
TPhoneCmdParamInteger foregroundAppParam; |
|
109 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewGetForegroundApplication, |
|
110 |
&foregroundAppParam ); |
|
111 |
||
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
112 |
if ( !IsSimOk() && KUidPhoneApplication.iUid != foregroundAppParam.Integer() ) |
62 | 113 |
{ |
114 |
TPhoneCmdParamInteger uidParam; |
|
115 |
// Bring Phone app in the foreground |
|
116 |
uidParam.SetInteger( KUidPhoneApplication.iUid ); |
|
117 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |
|
118 |
&uidParam ); |
|
119 |
||
120 |
// Set Phone as the top application |
|
121 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetTopApplication, |
|
122 |
&uidParam ); |
|
123 |
} |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
124 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
125 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
126 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
127 |
// CPhoneStateIdle::NewL() |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
128 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
129 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
130 |
CPhoneStateIdle* CPhoneStateIdle::NewL( |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
131 |
MPhoneStateMachine* aStateMachine, |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
132 |
MPhoneViewCommandHandle* aViewCommandHandle, |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
133 |
MPhoneCustomization* aPhoneCustomization ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
134 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
135 |
CPhoneStateIdle* self = new (ELeave) CPhoneStateIdle( |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
136 |
aStateMachine, aViewCommandHandle, aPhoneCustomization ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
137 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
138 |
CleanupStack::PushL( self ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
139 |
self->ConstructL(); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
140 |
CleanupStack::Pop( self ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
141 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
142 |
return self; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
143 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
144 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
145 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
146 |
// CPhoneStateIdle::HandleKeyEventL |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
147 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
148 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
149 |
EXPORT_C void CPhoneStateIdle::HandleKeyEventL( |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
150 |
const TKeyEvent& aKeyEvent, |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
151 |
TEventCode aEventCode ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
152 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
153 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::HandleKeyEventL( ) "); |
62 | 154 |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
155 |
// Number entry is blocked, if active Query |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
156 |
if ( !IsAnyQueryActiveL() ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
157 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
158 |
// Handle numeric keys when key events are received in idle state |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
159 |
HandleNumericKeyEventL( aKeyEvent, aEventCode ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
160 |
} |
62 | 161 |
else if ( iStateMachine->SecurityMode()->IsSecurityMode() |
162 |
&& CPhoneKeys::IsNumericKey( aKeyEvent, aEventCode ) ) |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
163 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
164 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNote ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
165 |
// Handle numeric keys when key events are received in single state |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
166 |
HandleNumericKeyEventL( aKeyEvent, aEventCode ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
167 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
168 |
else if ( aEventCode == EEventKeyUp ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
169 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
170 |
// Provide up event to engine. |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
171 |
// Otherwise DTMF tone keeps playing. |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
172 |
iStateMachine->SendPhoneEngineMessage( |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
173 |
MPEPhoneModel::EPEMessageEndDTMF ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
174 |
__PHONELOG( EBasic, EPhoneControl, |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
175 |
"PhoneUIControl: CPhoneStateIdle::HandleKeyEventL" ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
176 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
177 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
178 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
179 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
180 |
// CPhoneStateIdle::HandleNumberEntryClearedL() |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
181 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
182 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
183 |
EXPORT_C void CPhoneStateIdle::HandleNumberEntryClearedL() |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
184 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
185 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::HandleNumberEntryClearedL( ) "); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
186 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
187 |
if ( IsSimOk() && !IsSimStateNotPresentWithSecurityModeEnabled() ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
188 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
189 |
// if still idle ( f.e not incoming call arrived when rfs ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
190 |
if ( iStateMachine->State() == this ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
191 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
192 |
DisplayIdleScreenL(); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
193 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
194 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
195 |
else |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
196 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
197 |
StartShowSecurityNoteL(); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
198 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
199 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
200 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
201 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
202 |
// CPhoneStateIdle::HandleKeyMessageL |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
203 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
204 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
205 |
EXPORT_C void CPhoneStateIdle::HandleKeyMessageL( |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
206 |
TPhoneKeyEventMessages aMessage, |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
207 |
TKeyCode aCode ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
208 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
209 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::HandleKeyMessageL( ) "); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
210 |
|
62 | 211 |
if( aMessage == EPhoneKeyLongPress && CheckAppLaunchingL( aCode ) ) |
212 |
{ |
|
213 |
return; |
|
214 |
} |
|
215 |
||
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
216 |
switch ( aCode ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
217 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
218 |
case EKeyEnd: |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
219 |
// This key even occur only in idle state, behaviour for this should |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
220 |
// be same as long end-key press. (Bug in window server) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
221 |
HandleEndKeyPressL( EPhoneKeyLongPress ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
222 |
break; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
223 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
224 |
// end-key |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
225 |
case EKeyNo: |
62 | 226 |
HandleEndKeyPressL( aMessage ); |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
227 |
break; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
228 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
229 |
// send-key |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
230 |
case EKeyYes: |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
231 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
232 |
if ( iOnScreenDialer ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
233 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
234 |
if ( IsNumberEntryUsedL() ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
235 |
{ |
62 | 236 |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
237 |
TPhoneCmdParamInteger numberEntryCountParam; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
238 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewGetNumberEntryCount, |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
239 |
&numberEntryCountParam ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
240 |
TInt neLength( numberEntryCountParam.Integer() ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
241 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
242 |
// Query on top of dialer |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
243 |
if ( IsAnyQueryActiveL() ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
244 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
245 |
return; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
246 |
} |
62 | 247 |
else if ( IsMenuBarVisibleL() ) |
248 |
{ |
|
249 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
250 |
return; |
|
251 |
} |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
252 |
|
62 | 253 |
else if ( neLength == 0 && !iStateMachine->SecurityMode()->IsSecurityMode() ) |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
254 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
255 |
// start logs |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
256 |
iViewCommandHandle->HandleCommandL( |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
257 |
EPhoneDialerCmdLog ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
258 |
return; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
259 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
260 |
HandleSendCommandL(); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
261 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
262 |
// If dialer is not open but phone is in foreground and phone receives |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
263 |
// send-key event we have to check if security mode is true and if it |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
264 |
// is then open emergency dialer. |
62 | 265 |
else if ( !IsNumberEntryUsedL() ) |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
266 |
{ |
62 | 267 |
if ( iStateMachine->SecurityMode()->IsSecurityMode() ) |
44
3c221667e687
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
39
diff
changeset
|
268 |
{ |
62 | 269 |
iViewCommandHandle->HandleCommandL( EPhoneViewOpenNumberEntry ); |
44
3c221667e687
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
39
diff
changeset
|
270 |
} |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
271 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
272 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
273 |
else // iOnScreenDialer false, non-touch. |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
274 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
275 |
HandleSendCommandL(); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
276 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
277 |
break; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
278 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
279 |
case EKeyApplication0: |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
280 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
281 |
// If dialer is not open but phone is in foreground and phone receives |
62 | 282 |
// applicaion-key event we have to open emergency dialer. |
283 |
// Securitymode check because Applicationkey only open dialer in securitymode. |
|
284 |
if ( iStateMachine->SecurityMode()->IsSecurityMode() && !IsNumberEntryUsedL() ) |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
285 |
{ |
62 | 286 |
iViewCommandHandle->HandleCommandL( EPhoneViewOpenNumberEntry ); |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
287 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
288 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
289 |
break; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
290 |
|
62 | 291 |
// "O" key |
292 |
case KPhoneDtmf0Character: |
|
293 |
if ( aMessage == EPhoneKeyLongPress && IsSimOk() ) |
|
294 |
{ |
|
295 |
LaunchApplicationL(); |
|
296 |
} |
|
297 |
break; |
|
298 |
||
299 |
// number key |
|
300 |
case KPhoneDtmf1Character: |
|
301 |
case KPhoneDtmf2Character: |
|
302 |
case KPhoneDtmf3Character: |
|
303 |
case KPhoneDtmf4Character: |
|
304 |
case KPhoneDtmf5Character: |
|
305 |
case KPhoneDtmf6Character: |
|
306 |
case KPhoneDtmf7Character: |
|
307 |
case KPhoneDtmf8Character: |
|
308 |
case KPhoneDtmf9Character: |
|
309 |
if ( aMessage == EPhoneKeyLongPress && IsSimOk() ) |
|
310 |
{ |
|
311 |
HandleNumberLongKeyPressL(); |
|
312 |
} |
|
313 |
break; |
|
314 |
||
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
315 |
#ifdef RD_INTELLIGENT_TEXT_INPUT |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
316 |
case EKeyEnter: |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
317 |
if ( IsNumberEntryVisibleL() ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
318 |
{ |
62 | 319 |
if ( IsDialingExtensionInFocusL() ) |
320 |
{ |
|
321 |
HandleCommandL( EEasyDialingEnterKeyAction ); |
|
322 |
} |
|
323 |
else |
|
324 |
{ |
|
325 |
TPhoneCmdParamInteger numberEntryCountParam; |
|
326 |
iViewCommandHandle->ExecuteCommandL( |
|
327 |
EPhoneViewGetNumberEntryCount, |
|
328 |
&numberEntryCountParam ); |
|
329 |
||
330 |
TInt neLength( numberEntryCountParam.Integer() ); |
|
331 |
if ( neLength > 0 ) |
|
332 |
{ |
|
333 |
HandleSendCommandL(); |
|
334 |
} |
|
335 |
} |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
336 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
337 |
break; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
338 |
#endif |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
339 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
340 |
default: |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
341 |
break; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
342 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
343 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
344 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
345 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
346 |
// CPhoneStateIdle::HandlePhoneEngineMessageL |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
347 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
348 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
349 |
EXPORT_C void CPhoneStateIdle::HandlePhoneEngineMessageL( |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
350 |
const TInt aMessage, |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
351 |
TInt aCallId ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
352 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
353 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::HandlePhoneEngineMessageL( ) "); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
354 |
switch ( aMessage ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
355 |
{ |
62 | 356 |
case MEngineMonitor::EPEMessageInitiatedMoCall: |
357 |
SetCallInitialized( ETrue ); |
|
358 |
break; |
|
359 |
||
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
360 |
case MEngineMonitor::EPEMessageIncoming: |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
361 |
HandleIncomingL( aCallId ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
362 |
break; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
363 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
364 |
case MEngineMonitor::EPEMessageDialing: |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
365 |
HandleDialingL( aCallId ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
366 |
break; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
367 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
368 |
case MEngineMonitor::EPEMessageConnected: |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
369 |
HandleConnectedL( aCallId ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
370 |
break; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
371 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
372 |
case MEngineMonitor::EPEMessageIssuedUSSDRequest: |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
373 |
// Note that after the sending of SS |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
374 |
// strings the view stays in Dialer. |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
375 |
if ( !iOnScreenDialer ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
376 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
377 |
if ( IsNumberEntryUsedL() ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
378 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
379 |
// Show the number entry if it exists |
62 | 380 |
SetNumberEntryVisibilityL(ETrue); |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
381 |
} |
62 | 382 |
else if ( NeedToReturnToForegroundAppL() ) |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
383 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
384 |
// Continue displaying current app but set up the |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
385 |
// idle screen in the background |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
386 |
SetupIdleScreenInBackgroundL(); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
387 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
388 |
else |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
389 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
390 |
// Display idle screen |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
391 |
DisplayIdleScreenL(); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
392 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
393 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
394 |
break; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
395 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
396 |
case MEngineMonitor::EPEMessageIdle: |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
397 |
HandleIdleL( aCallId ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
398 |
break; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
399 |
|
62 | 400 |
case MEngineMonitor::EPEMessageInValidEmergencyNumber: |
401 |
SendGlobalWarningNoteL( EPhoneEmergencyCallsOnly ); |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
402 |
break; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
403 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
404 |
case MEngineMonitor::EPEMessageValidEmergencyNumber: |
58
40a3f856b14d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
57
diff
changeset
|
405 |
DialVoiceCallL(); |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
406 |
break; |
62 | 407 |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
408 |
default: |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
409 |
CPhoneState::HandlePhoneEngineMessageL( aMessage, aCallId ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
410 |
break; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
411 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
412 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
413 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
414 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
415 |
// CPhoneStateIdle::HandleIncomingL( TInt aCallId ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
416 |
// Default handling for incoming message |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
417 |
// (other items were commented in a header). |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
418 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
419 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
420 |
void CPhoneStateIdle::HandleIncomingL( TInt aCallId ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
421 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
422 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::HandleIncomingL( ) "); |
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
423 |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
424 |
HandleAudioAvailableOutputChangedL(); |
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
425 |
|
62 | 426 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNaviPaneAudioVolume ); |
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
427 |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
428 |
SetRingingTonePlaybackL( aCallId ); |
62 | 429 |
|
430 |
CPhonePubSubProxy::Instance()->ChangePropertyValue( |
|
431 |
KPSUidScreenSaver, |
|
432 |
KScreenSaverAllowScreenSaver, |
|
433 |
EPhoneScreensaverNotAllowed ); |
|
434 |
||
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
435 |
IsNumberEntryUsedL() ? |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
436 |
BeginTransEffectLC( ECallUiAppear ) : |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
437 |
BeginTransEffectLC( ENumberEntryOpen ); |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
438 |
BeginUiUpdateLC(); |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
439 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
440 |
// Hide the number entry if it exists |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
441 |
if ( IsNumberEntryUsedL() ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
442 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
443 |
SetNumberEntryVisibilityL(EFalse); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
444 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
445 |
|
62 | 446 |
// Close fast swap window if it's displayed |
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
447 |
CEikonEnv::Static()->DismissTaskList(); |
62 | 448 |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
449 |
// Show incoming call buttons |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
450 |
SetTouchPaneButtons( EPhoneIncomingCallButtons ); |
62 | 451 |
SetTouchPaneButtonEnabled( EPhoneCallComingCmdSilent ); |
452 |
SetTouchPaneButtonEnabled( EPhoneInCallCmdHold ); |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
453 |
|
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
454 |
// Display incoming call |
62 | 455 |
DisplayIncomingCallL( aCallId ); |
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
456 |
|
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
457 |
EndUiUpdate(); |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
458 |
EndTransEffect(); |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
459 |
|
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
460 |
// Go to incoming state |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
461 |
iCbaManager->UpdateIncomingCbaL( aCallId ); |
62 | 462 |
UpdateSilenceButtonDimming(); |
463 |
UpdateIncomingContextMenuL( aCallId ); |
|
464 |
//Dim toolbar items |
|
465 |
SetToolbarDimming( ETrue ); |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
466 |
//request that dimmed toolbar is visible. |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
467 |
iViewCommandHandle->HandleCommandL( EPhoneViewShowToolbar ); |
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
468 |
|
62 | 469 |
ChangeTo( EPhoneStateIncoming ); |
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
470 |
|
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
471 |
// Reset divert indication |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
472 |
SetDivertIndication( EFalse ); |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
473 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
474 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
475 |
// ----------------------------------------------------------- |
62 | 476 |
// CPhoneStateIdle::HandleDialingL |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
477 |
// Default handling for dialling message |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
478 |
// (other items were commented in a header). |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
479 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
480 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
481 |
EXPORT_C void CPhoneStateIdle::HandleDialingL( TInt aCallId ) |
62 | 482 |
{ |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
483 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::HandleDialingL( ) "); |
62 | 484 |
DisplayCallSetupL( aCallId ); |
485 |
ChangeTo( EPhoneStateCallSetup ); |
|
486 |
} |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
487 |
|
62 | 488 |
// ----------------------------------------------------------- |
489 |
// CPhoneStateIdle::DoStateSpecificCallSetUpDefinitionsL |
|
490 |
// ----------------------------------------------------------- |
|
491 |
// |
|
492 |
EXPORT_C void CPhoneStateIdle::DoStateSpecificCallSetUpDefinitionsL() |
|
493 |
{ |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
494 |
// Show call setup buttons |
62 | 495 |
SetTouchPaneButtons( EPhoneCallSetupButtons ); |
496 |
SetTouchPaneButtonDisabled( EPhoneInCallCmdHold ); |
|
497 |
||
498 |
SetToolbarDimming( ETrue ); |
|
499 |
SetToolbarButtonLoudspeakerEnabled(); |
|
500 |
SetToolbarButtonHandsetEnabled(); |
|
69
8baf28733c3d
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
501 |
|
8baf28733c3d
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
502 |
TPhoneCmdParamInteger uidParam; |
8baf28733c3d
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
503 |
uidParam.SetInteger( KUidPhoneApplication.iUid ); |
8baf28733c3d
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
504 |
|
8baf28733c3d
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
505 |
// Set Phone as the top application |
8baf28733c3d
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
506 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetTopApplication, |
8baf28733c3d
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
507 |
&uidParam ); |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
508 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
509 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
510 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
511 |
// CPhoneStateIdle::HandleConnectedL |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
512 |
// Message Handling function for message EPEMessageConnected |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
513 |
// This could happen during transaction from Emergency mode |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
514 |
// to Normal mode where a network status change is received |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
515 |
// from PE after PE initiates an MO call. Since PE messages |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
516 |
// are asynchronous, this sequence can occur in any order. |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
517 |
// (other items were commented in a header). |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
518 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
519 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
520 |
void CPhoneStateIdle::HandleConnectedL( TInt aCallId ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
521 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
522 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::HandleConnectedL( ) "); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
523 |
// Keep Phone app in the foreground if it is external |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
524 |
if ( !TopAppIsDisplayedL() ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
525 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
526 |
TPhoneCmdParamInteger uidParam; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
527 |
uidParam.SetInteger( KUidPhoneApplication.iUid ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
528 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
529 |
&uidParam ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
530 |
} |
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
531 |
BeginTransEffectLC( ENumberEntryClose ); |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
532 |
BeginUiUpdateLC(); |
62 | 533 |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
534 |
// Remove the number entry |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
535 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
536 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
537 |
// Display call setup header |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
538 |
DisplayCallSetupL( aCallId ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
539 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
540 |
// Update single active call |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
541 |
UpdateSingleActiveCallL( aCallId ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
542 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
543 |
// Update touch buttons |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
544 |
SetTouchPaneButtons( EPhoneIncallButtons ); |
62 | 545 |
SetToolbarDimming( EFalse ); |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
546 |
|
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
547 |
EndUiUpdate(); |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
548 |
EndTransEffect(); |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
549 |
|
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
550 |
// Go to single state |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
551 |
iCbaManager->UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
62 | 552 |
ChangeTo( EPhoneStateSingle ); |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
553 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
554 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
555 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
556 |
// CPhoneStateIdle::HandleCommandL |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
557 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
558 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
559 |
EXPORT_C TBool CPhoneStateIdle::HandleCommandL( TInt aCommand ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
560 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
561 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::HandleCommandL( ) "); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
562 |
TBool commandStatus = ETrue; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
563 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
564 |
switch( aCommand ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
565 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
566 |
case EPhoneCmdOptions: |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
567 |
{ |
62 | 568 |
// Open number entry menubar |
569 |
TInt menuId( GetNumberAcqMenuIdL() ); |
|
570 |
TPhoneCmdParamInteger integerParam; |
|
571 |
integerParam.SetInteger( menuId ); |
|
572 |
iViewCommandHandle->ExecuteCommandL( |
|
573 |
EPhoneViewMenuBarOpen, &integerParam ); |
|
58
40a3f856b14d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
57
diff
changeset
|
574 |
} |
62 | 575 |
break; |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
576 |
case EPhoneNumberAcqCmdCall: |
62 | 577 |
HandleVoiceCallCommandL( EFalse ); |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
578 |
break; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
579 |
case EPhoneNumberAcqCmdSendCommand: |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
580 |
HandleSendCommandL(); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
581 |
break; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
582 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
583 |
case EPhoneNumberAcqCmdVideoCall: |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
584 |
DialVideoCallL(); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
585 |
break; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
586 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
587 |
case EPhoneCmdBack: |
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
588 |
BeginTransEffectLC( ENumberEntryClose ); |
62 | 589 |
HandleBackCommandL(); |
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
590 |
EndTransEffect(); |
62 | 591 |
break; |
592 |
||
593 |
case EPhoneViewOpenNumberEntry: |
|
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
594 |
BeginTransEffectLC( ENumberEntryOpen ); |
62 | 595 |
commandStatus = CPhoneState::HandleCommandL( aCommand ); |
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
596 |
EndTransEffect(); |
62 | 597 |
break; |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
598 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
599 |
default: |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
600 |
commandStatus = CPhoneState::HandleCommandL( aCommand ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
601 |
break; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
602 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
603 |
return commandStatus; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
604 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
605 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
606 |
// ----------------------------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
607 |
// CPhoneStateIdle::ProcessCommandL |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
608 |
// ----------------------------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
609 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
610 |
EXPORT_C TBool CPhoneStateIdle::ProcessCommandL( TInt aCommand ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
611 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
612 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::ProcessCommandL( ) "); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
613 |
TBool commandStatus = EFalse; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
614 |
switch( aCommand ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
615 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
616 |
case EAknSoftkeyContextOptions: |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
617 |
{ |
62 | 618 |
// Open number entry OK menubar |
619 |
TPhoneCmdParamInteger integerParam; |
|
620 |
integerParam.SetInteger( |
|
621 |
CPhoneMainResourceResolver::Instance()-> |
|
622 |
ResolveResourceID( EPhoneNumberAcqOkMenubar ) ); |
|
623 |
iViewCommandHandle->ExecuteCommandL( |
|
624 |
EPhoneViewMenuBarOpen, &integerParam ); |
|
625 |
commandStatus = ETrue; |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
626 |
} |
62 | 627 |
break; |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
628 |
default: |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
629 |
commandStatus = CPhoneState::ProcessCommandL( aCommand ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
630 |
break; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
631 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
632 |
return commandStatus; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
633 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
634 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
635 |
// ----------------------------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
636 |
// CPhoneStateIdle::HandleRemConCommandL |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
637 |
// ----------------------------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
638 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
639 |
EXPORT_C TBool CPhoneStateIdle::HandleRemConCommandL( |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
640 |
TRemConCoreApiOperationId /*aOperationId */, |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
641 |
TRemConCoreApiButtonAction /*aButtonAct*/ ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
642 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
643 |
return EFalse; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
644 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
645 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
646 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
647 |
// CPhoneStateIdle::DialL |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
648 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
649 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
650 |
EXPORT_C void CPhoneStateIdle::DialL( |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
651 |
const TDesC& aNumber, |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
652 |
TPhoneNumberType aNumberType, |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
653 |
TDialInitiationMethod /*aDialMethod*/ ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
654 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
655 |
iStateMachine->PhoneEngineInfo()->SetPhoneNumber( aNumber ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
656 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
657 |
if ( aNumberType == EPhoneNumberTypeVideo && |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
658 |
FeatureManager::FeatureSupported( KFeatureIdCsVideoTelephony ) ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
659 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
660 |
DialMultimediaCallL(); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
661 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
662 |
else if ( EPhoneNumberTypeVoip == aNumberType && |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
663 |
iCustomization ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
664 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
665 |
iCustomization->HandleDialL( aNumber ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
666 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
667 |
else |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
668 |
{ |
62 | 669 |
DialVoiceCallL(); |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
670 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
671 |
} |
62 | 672 |
|
673 |
// ----------------------------------------------------------- |
|
674 |
// CPhoneStateIdle::HandleBackCommandL |
|
675 |
// ----------------------------------------------------------- |
|
676 |
// |
|
677 |
void CPhoneStateIdle::HandleBackCommandL() |
|
678 |
{ |
|
679 |
TBool previousApp(EFalse); |
|
680 |
||
681 |
// If previous app activation is true then open |
|
682 |
// previous application. |
|
683 |
if ( iOnScreenDialer && |
|
684 |
IsSimOk() ) |
|
685 |
{ |
|
686 |
TPhoneCmdParamBoolean booleanParam; |
|
687 |
iViewCommandHandle->ExecuteCommandL( |
|
688 |
EPhoneViewGetActivatePreviousApp, &booleanParam ); |
|
689 |
||
690 |
||
691 |
if ( booleanParam.Boolean() ) |
|
692 |
{ |
|
693 |
// Open previous app. |
|
694 |
iViewCommandHandle->ExecuteCommandL( |
|
695 |
EPhoneViewActivatePreviousApp ); |
|
696 |
||
697 |
// Remove number entry from screen |
|
698 |
iViewCommandHandle->ExecuteCommandL( |
|
699 |
EPhoneViewRemoveNumberEntry ); |
|
700 |
||
701 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateFSW ); |
|
702 |
previousApp = ETrue; |
|
703 |
} |
|
704 |
} |
|
705 |
||
706 |
if ( !previousApp ) |
|
707 |
{ |
|
708 |
// Remove number entry from screen |
|
709 |
iViewCommandHandle->ExecuteCommandL( |
|
710 |
EPhoneViewRemoveNumberEntry ); |
|
711 |
||
712 |
// Do state-specific operation when number entry is cleared |
|
713 |
HandleNumberEntryClearedL(); |
|
714 |
} |
|
715 |
||
716 |
} |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
717 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
718 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
719 |
// CPhoneStateIdle::DialVideoCallL |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
720 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
721 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
722 |
void CPhoneStateIdle::DialVideoCallL() |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
723 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
724 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::DialVideoCallL( ) "); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
725 |
if ( IsNumberEntryUsedL() ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
726 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
727 |
// get the number entry contents |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
728 |
HBufC* phoneNumber = PhoneNumberFromEntryLC(); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
729 |
#ifdef _DEBUG |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
730 |
if ( (*phoneNumber).Compare( KExit ) == 0 ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
731 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
732 |
CleanupStack::PopAndDestroy( phoneNumber ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
733 |
SendExitCommandL(); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
734 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
735 |
else |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
736 |
#endif // _DEBUG |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
737 |
{ |
62 | 738 |
if ( IsSpeedDialNumber( (*phoneNumber) ) ) |
739 |
{ |
|
740 |
// Handle speed dial |
|
741 |
SpeedDialL( (*phoneNumber)[0], EDialMethodMenuSelection ); |
|
742 |
} |
|
743 |
else |
|
744 |
{ |
|
745 |
// call the number |
|
746 |
iStateMachine->PhoneEngineInfo()->SetPhoneNumber( *phoneNumber ); |
|
747 |
DialMultimediaCallL(); |
|
748 |
} |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
749 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
750 |
CleanupStack::PopAndDestroy( phoneNumber ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
751 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
752 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
753 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
754 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
755 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
756 |
// CPhoneStateIdle::DisplayIncomingCallL |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
757 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
758 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
759 |
EXPORT_C void CPhoneStateIdle::DisplayIncomingCallL( TInt aCallId ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
760 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
761 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::DisplayIncomingCallL( ) "); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
762 |
__ASSERT_DEBUG( iStateMachine->PhoneEngineInfo() && aCallId >= 0, |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
763 |
Panic( EPhoneCtrlInvariant ) ); |
62 | 764 |
// Close menu bar, if it is displayed |
765 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
766 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
767 |
// Remove any phone dialogs if they are displayed |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
768 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
769 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
770 |
// Capture keys when there is an incoming call |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
771 |
CaptureKeysDuringCallNotificationL( ETrue ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
772 |
|
62 | 773 |
// Indicate that the Foreground application needs to be sent to the foreground |
774 |
// after call is ended. |
|
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
775 |
TPhoneCmdParamBoolean booleanParam; |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
776 |
booleanParam.SetBoolean( !TopAppIsDisplayedL() ); |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
777 |
iViewCommandHandle->ExecuteCommandL( |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
778 |
EPhoneViewSetNeedToReturnToForegroundAppStatus, |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
779 |
&booleanParam ); |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
780 |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
781 |
// Bring Phone app in the foreground |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
782 |
TPhoneCmdParamInteger uidParam; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
783 |
uidParam.SetInteger( KUidPhoneApplication.iUid ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
784 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
785 |
&uidParam ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
786 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
787 |
// Set Phone as the top application |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
788 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetTopApplication, |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
789 |
&uidParam ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
790 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
791 |
// Disable global notes when there is an incoming call |
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
792 |
DisableGlobalNotifiersL(); |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
793 |
DisableEikonNotifiersL(); |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
794 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
795 |
DisplayHeaderForCallComingInL( aCallId, EFalse ); //not waiting |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
796 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
797 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
798 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
799 |
// CPhoneStateIdle::HandleIdleForegroundEventL |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
800 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
801 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
802 |
EXPORT_C void CPhoneStateIdle::HandleIdleForegroundEventL() |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
803 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
804 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::HandleIdleForegroundEventL( ) "); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
805 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
806 |
if ( IsNumberEntryUsedL() ) |
62 | 807 |
{ |
808 |
// If numberentry is used then we need to call EPhoneViewSetDialerControlVisible |
|
809 |
// to ensure that numberentry/dialler is drawn to UI. |
|
810 |
TPhoneViewResponseId respond = |
|
811 |
iViewCommandHandle->HandleCommandL( EPhoneViewSetDialerControlVisible ); |
|
812 |
||
813 |
if ( respond && IsNumberEntryVisibleL() ) |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
814 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
815 |
// Set Number Entry CBA |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
816 |
iCbaManager->SetCbaL( EPhoneNumberAcqCBA ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
817 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
818 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
819 |
else if ( !IsAnyQueryActiveL() ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
820 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
821 |
// Set idle as top application |
62 | 822 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewBringIdleToForeground ); |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
823 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
824 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
825 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
826 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
827 |
// CPhoneStateIdle::HandlePhoneForegroundEventL |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
828 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
829 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
830 |
EXPORT_C void CPhoneStateIdle::HandlePhoneForegroundEventL() |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
831 |
{ |
62 | 832 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::HandlePhoneForegroundEventL( ) "); |
833 |
||
834 |
TBool activatePhone = CPhonePubSubProxy::Instance()->Value( |
|
835 |
KPSUidAiInformation, KActiveIdleState ) == EPSAiNumberEntry; |
|
836 |
||
837 |
if ( activatePhone ) |
|
838 |
{ |
|
839 |
// If activatePhone is true then user has pressed some numeric |
|
840 |
// key and icon must be set to FSW. In this case number entry is not yet open so it |
|
841 |
// it is not enough to call EPhoneViewUpdateFSW. |
|
842 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdatePhoneIconToFSW ); |
|
843 |
} |
|
844 |
// If number entry is used update FSW accordingly. |
|
845 |
else if ( IsNumberEntryUsedL() ) |
|
846 |
{ |
|
847 |
// If numberentry is used then we need to call EPhoneViewSetDialerControlVisible |
|
848 |
// to ensure that numberentry/dialler is drawn to UI. |
|
849 |
TPhoneViewResponseId respond = |
|
850 |
iViewCommandHandle->HandleCommandL( EPhoneViewSetDialerControlVisible ); |
|
851 |
||
852 |
if ( respond && IsNumberEntryVisibleL() ) |
|
853 |
{ |
|
854 |
// Set Number Entry CBA |
|
855 |
iCbaManager->SetCbaL( EPhoneNumberAcqCBA ); |
|
856 |
} |
|
857 |
||
858 |
// If dialer is open add icon to FSW list. |
|
859 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateFSW ); |
|
860 |
} |
|
861 |
/*iCallInitialized has to be checked because if it true then phoneapp |
|
862 |
is already initializing call bubble and we cant bring idle to screen. */ |
|
863 |
else if ( !IsNumberEntryUsedL() && |
|
864 |
!iStateMachine->SecurityMode()->IsSecurityMode() && |
|
865 |
!iCallInitialized ) |
|
866 |
{ |
|
867 |
// Bring Idle app to the foreground |
|
868 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewBringIdleToForeground ); |
|
869 |
} |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
870 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
871 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
872 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
873 |
// CPhoneStateIdle::HandlePhoneFocusLostEventL |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
874 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
875 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
876 |
EXPORT_C void CPhoneStateIdle::HandlePhoneFocusLostEventL() |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
877 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
878 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::HandlePhoneFocusLostEventL( ) "); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
879 |
if ( !IsNumberEntryUsedL() ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
880 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
881 |
// If NE/dialer is open add icon to FSW list. |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
882 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateFSW ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
883 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
884 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
885 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
886 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
887 |
// CPhoneStateIdle::HandleIdleL |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
888 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
889 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
890 |
void CPhoneStateIdle::HandleIdleL( TInt /*aCallId*/ ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
891 |
{ |
62 | 892 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::HandleIdleL()" ); |
61
41a7f70b3818
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
893 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveAllCallHeaders ); |
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
894 |
CloseClearNumberEntryAndLoadEffectL( ECallUiDisappear ); |
62 | 895 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
896 |
// Reset flag. |
|
897 |
SetCallInitialized( EFalse ); |
|
898 |
} |
|
899 |
||
900 |
// ----------------------------------------------------------- |
|
901 |
// CPhoneStateIdle::SpeedDialL |
|
902 |
// ----------------------------------------------------------- |
|
903 |
// |
|
904 |
EXPORT_C void CPhoneStateIdle::SpeedDialL( const TUint& aDigit, |
|
905 |
TDialInitiationMethod aDialMethod ) |
|
906 |
{ |
|
907 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::SpeedDialL( ) "); |
|
908 |
iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF ); |
|
909 |
||
910 |
TPhoneCmdParamSpeedDial speedDialParam; |
|
911 |
HBufC* phoneNumber = NumberForSpeedDialLocationL( aDigit, speedDialParam ); |
|
912 |
||
913 |
// Store serviceId received from vmbx handler |
|
914 |
iStateMachine->PhoneEngineInfo()->SetServiceIdCommand( speedDialParam.ServiceId() ); |
|
915 |
CleanupStack::PushL( phoneNumber ); |
|
61
41a7f70b3818
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
916 |
|
62 | 917 |
if ( NULL != phoneNumber && KNullDesC() != *phoneNumber ) |
918 |
{ |
|
919 |
DialL( *phoneNumber, speedDialParam.NumberType(), aDialMethod ); |
|
920 |
RemoveNumberEntryAndSetIdleToBackgroundIfNeededL(); |
|
921 |
} |
|
922 |
else |
|
923 |
{ |
|
924 |
// User cancelled dialog or didn't give a valid number |
|
925 |
SpeedDialCanceledL( aDigit ); |
|
926 |
} |
|
927 |
CleanupStack::PopAndDestroy( phoneNumber ); |
|
928 |
} |
|
929 |
||
930 |
// ----------------------------------------------------------- |
|
931 |
// CPhoneStateIdle::RemoveNumberEntryAndSetIdleToBackgroundIfNeededL |
|
932 |
// ----------------------------------------------------------- |
|
933 |
// |
|
934 |
void CPhoneStateIdle::RemoveNumberEntryAndSetIdleToBackgroundIfNeededL() |
|
935 |
{ |
|
936 |
__LOGMETHODSTARTEND(EPhoneControl, |
|
937 |
"CPhoneStateIdle::RemoveNumberEntryAndSetIdleToBackgroundIfNeededL( ) "); |
|
938 |
if ( IsNumberEntryUsedL() ) |
|
939 |
{ |
|
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
940 |
BeginTransEffectLC( ECallUiAppear ); |
62 | 941 |
/*NE should be removed because if speeddial dial is interupted during |
942 |
call setup phone should not return to NE/Dialler view.*/ |
|
943 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
|
944 |
||
945 |
/*It might be possible that some async operation was ongoing and |
|
946 |
state has already in that case do not set idle to background.*/ |
|
947 |
if ( iStateMachine->State() == this ) |
|
948 |
{ |
|
949 |
iCbaManager->UpdateCbaL( EPhoneEmptyCBA ); |
|
950 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetIdleTopApplication ); |
|
951 |
} |
|
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
952 |
EndTransEffect(); |
62 | 953 |
} |
954 |
} |
|
955 |
||
956 |
// ----------------------------------------------------------- |
|
957 |
// CPhoneStateIdle::SpeedDialCanceledL |
|
958 |
// ----------------------------------------------------------- |
|
959 |
// |
|
960 |
EXPORT_C void CPhoneStateIdle::SpeedDialCanceledL( const TUint& aDigit ) |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
961 |
|
62 | 962 |
{ |
963 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::SpeedDialCanceledL( ) "); |
|
964 |
if ( IsNumberEntryUsedL() ) |
|
965 |
{ |
|
966 |
if ( aDigit == KPhoneDtmf1Character || |
|
967 |
( aDigit == KPhoneDtmf2Character && |
|
968 |
iViewCommandHandle->HandleCommandL( |
|
969 |
EPhoneViewIsStraightCallToVideoMailBox ) == EPhoneViewResponseSuccess ) ) |
|
970 |
{ |
|
971 |
// Remove number entry and set idle background on non-touch products |
|
972 |
if ( !FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) ) |
|
973 |
{ |
|
974 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
|
975 |
||
976 |
// Set Idle background, if still idle ( f.e not incoming call arrived ) |
|
977 |
if ( iStateMachine->State() == this ) |
|
978 |
{ |
|
979 |
// idle screen in the background |
|
980 |
SetupIdleScreenInBackgroundL(); |
|
981 |
} |
|
982 |
} |
|
983 |
} |
|
984 |
} |
|
985 |
} |
|
986 |
||
987 |
// ----------------------------------------------------------- |
|
988 |
// CPhoneStateIdle::HandleNumberLongKeyPressL() |
|
989 |
// ----------------------------------------------------------- |
|
990 |
// |
|
991 |
EXPORT_C void CPhoneStateIdle::HandleNumberLongKeyPressL() |
|
992 |
{ |
|
993 |
__LOGMETHODSTARTEND(EPhoneControl, |
|
994 |
"CPhoneStateIdle::HandleNumberLongKeyPressL( ) "); |
|
995 |
||
996 |
HBufC* phoneNumber = PhoneNumberFromEntryLC(); |
|
997 |
||
998 |
if ( phoneNumber && IsSpeedDialNumber ( *phoneNumber ) ) |
|
999 |
{ |
|
1000 |
SpeedDialL( (*phoneNumber)[0], EDialMethodOneKeyDialing ); |
|
1001 |
} |
|
1002 |
||
1003 |
CleanupStack::PopAndDestroy( phoneNumber ); |
|
1004 |
} |
|
1005 |
||
1006 |
// ----------------------------------------------------------- |
|
1007 |
// CPhoneStateIdle::IsSpeedDialNumber() |
|
1008 |
// ----------------------------------------------------------- |
|
1009 |
// |
|
1010 |
EXPORT_C TBool CPhoneStateIdle::IsSpeedDialNumber( |
|
1011 |
const TDesC& aNumber ) const |
|
1012 |
{ |
|
1013 |
return ( aNumber.Length() == KPhoneDtmfSpeedDialPrefixLength |
|
1014 |
&& aNumber[0] >= KPhoneDtmf1Character |
|
1015 |
&& aNumber[0] <= KPhoneDtmf9Character ); |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1016 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1017 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1018 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1019 |
// CPhoneStateIdle::HandleSendCommandL() |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1020 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1021 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1022 |
EXPORT_C void CPhoneStateIdle::HandleSendCommandL() |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1023 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1024 |
__LOGMETHODSTARTEND( |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1025 |
EPhoneControl, "CPhoneStateIdle::HandleSendCommandL()" ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1026 |
|
62 | 1027 |
HandleVoiceCallCommandL( ETrue ); |
1028 |
} |
|
1029 |
||
1030 |
// ----------------------------------------------------------- |
|
1031 |
// CPhoneStateIdle::LaunchApplicationL() |
|
1032 |
// ----------------------------------------------------------- |
|
1033 |
// |
|
1034 |
void CPhoneStateIdle::LaunchApplicationL() |
|
1035 |
{ |
|
1036 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::LaunchApplicationL( ) "); |
|
1037 |
// Check if only one number exists in the number |
|
1038 |
// entry |
|
1039 |
TPhoneCmdParamInteger numberEntryCountParam; |
|
1040 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewGetNumberEntryCount, |
|
1041 |
&numberEntryCountParam ); |
|
1042 |
||
1043 |
if ( numberEntryCountParam.Integer() == 1 ) |
|
1044 |
{ |
|
1045 |
// Remove the number entry window |
|
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
1046 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
62 | 1047 |
|
1048 |
iStateMachine->SendPhoneEngineMessage( |
|
1049 |
MPEPhoneModel::EPEMessageEndDTMF ); |
|
1050 |
||
1051 |
// Launch application. |
|
1052 |
iViewCommandHandle->ExecuteCommandL( |
|
1053 |
EPhoneViewLaunchApplication ); |
|
1054 |
||
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
1055 |
// Continue displaying current app but set up the |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
1056 |
// idle screen in the background |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
1057 |
SetupIdleScreenInBackgroundL(); |
62 | 1058 |
} |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1059 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1060 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1061 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1062 |
// CPhoneStateIdle:SendExitCommandL |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1063 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1064 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1065 |
void CPhoneStateIdle::SendExitCommandL() |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1066 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1067 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::SendExitCommand( ) "); |
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
1068 |
// Remove number entry from screen |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
1069 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1070 |
|
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
1071 |
// Simulate exit command |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
1072 |
RWsSession& wsSession = CEikonEnv::Static()->WsSession(); |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
1073 |
TKeyEvent keyEvent; |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
1074 |
keyEvent.iCode = EEikCmdExit; |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
1075 |
keyEvent.iScanCode = EEikCmdExit; |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
1076 |
keyEvent.iModifiers = 0; |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
1077 |
keyEvent.iRepeats = 0; |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
1078 |
wsSession.SimulateKeyEvent( keyEvent ); |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
1079 |
wsSession.Flush(); |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1080 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1081 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1082 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1083 |
// CPhoneStateIdle::HandleEndKeyPressL |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1084 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1085 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1086 |
void CPhoneStateIdle::HandleEndKeyPressL( TPhoneKeyEventMessages aMessage ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1087 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1088 |
__LOGMETHODSTARTEND( EPhoneControl, "CPhoneStateIdle::HandleEndKeyPressL( ) "); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1089 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1090 |
// End key not handled also in phone startup when pressed during country/time/date query |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1091 |
RWsSession sess = CCoeEnv::Static()->WsSession(); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1092 |
TApaTaskList appList( sess ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1093 |
TApaTask startup = appList.FindApp( KUidStartupApplication ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1094 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1095 |
if ( !IsAutoLockOn() && !IsKeyLockOn() && !startup.Exists() ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1096 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1097 |
//Cancels e.g. USB notifier and Audio notifier. |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1098 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewCancelAllNotications ); |
62 | 1099 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewExitApplications ); |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1100 |
// If KFeatureIdFfSimlessOfflineSupport is undef and security note is shown then do not |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1101 |
// remove security note from screen. |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1102 |
if ( !( IsSimStateNotPresentWithSecurityModeEnabled() && |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1103 |
!FeatureManager::FeatureSupported( KFeatureIdFfSimlessOfflineSupport ) ) ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1104 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1105 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1106 |
} |
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
1107 |
// Handle end key if all startup related queries and graphics have been displayed. |
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
1108 |
if ( IsSimOk() && AllStartupQueriesDisplayed() ) |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1109 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1110 |
if ( aMessage == EPhoneKeyLongPress ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1111 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1112 |
// Close all connections |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1113 |
iStateMachine->SendPhoneEngineMessage( |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1114 |
MPEPhoneModel::EPEMessageTerminateAllConnections ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1115 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1116 |
if ( IsNumberEntryUsedL() ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1117 |
{ |
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
1118 |
CloseClearNumberEntryAndLoadEffectL( ENumberEntryClose ); |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1119 |
// If long end key event occures then all calls are terminated and |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1120 |
// dialer is closed, therefore tel.icon must be removed from FSW. |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1121 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateFSW ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1122 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1123 |
if ( !TopAppIsDisplayedL() ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1124 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1125 |
DisplayIdleScreenL(); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1126 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1127 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1128 |
else if ( IsNumberEntryUsedL() && TopAppIsDisplayedL() ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1129 |
{ |
81
c26cc2a7c548
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
69
diff
changeset
|
1130 |
CloseClearNumberEntryAndLoadEffectL( ENumberEntryClose ); |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1131 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1132 |
else if ( !TopAppIsDisplayedL() ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1133 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1134 |
// Phone might not be the topmost app since it has |
62 | 1135 |
// some dialog/query open therefore we need to remove dialog/phone. |
1136 |
if ( !IsSimStateNotPresentWithSecurityModeEnabled() ) |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1137 |
{ |
62 | 1138 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
1139 |
} |
|
1140 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1141 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewBringIdleToForeground ); |
62 | 1142 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateFSW ); |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1143 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1144 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1145 |
else if ( IsNumberEntryUsedL() ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1146 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1147 |
// Remove number entry from screen |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1148 |
iViewCommandHandle->ExecuteCommandL( |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1149 |
EPhoneViewRemoveNumberEntry ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1150 |
StartShowSecurityNoteL(); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1151 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1152 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1153 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1154 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1155 |
// --------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1156 |
// CPhoneStateIdle::OnlyHashInNumberEntryL |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1157 |
// --------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1158 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1159 |
EXPORT_C void CPhoneStateIdle::OnlyHashInNumberEntryL() |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1160 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1161 |
__LOGMETHODSTARTEND( EPhoneControl, "CPhoneStateIdle::OnlyHashInNumberEntryL( ) "); |
62 | 1162 |
if ( CPhoneCenRepProxy::Instance()->IsTelephonyFeatureSupported( |
1163 |
KTelephonyLVFlagMannerMode ) ) |
|
1164 |
{ |
|
1165 |
ChangeMannerModeL(); |
|
1166 |
} |
|
1167 |
else |
|
1168 |
{ |
|
1169 |
StartAlsLineChangeTimerL(); |
|
1170 |
} |
|
1171 |
// Check if any application launch functionality |
|
1172 |
// is configured for pressing hash for a long time |
|
1173 |
// the return value of CheckAppLaunchingL ignored. |
|
1174 |
CheckAppLaunchingL( TKeyCode( KPhoneDtmfHashCharacter ) ); |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1175 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1176 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1177 |
// --------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1178 |
// CPhoneStateIdle::ChangeMannerModeL |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1179 |
// --------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1180 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1181 |
void CPhoneStateIdle::ChangeMannerModeL() |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1182 |
{ |
62 | 1183 |
__LOGMETHODSTARTEND( EPhoneControl, "CPhoneStateIdle::ChangeMannerModeL( ) "); |
1184 |
||
1185 |
// Get the profile information |
|
1186 |
MProEngEngine* profileEngine = ProEngFactory::NewEngineLC(); |
|
1187 |
const TInt profileId = |
|
1188 |
profileEngine->ActiveProfileId(); |
|
1189 |
||
1190 |
TInt newProfile; |
|
1191 |
||
1192 |
if ( profileId == EProfileSilentId ) |
|
1193 |
{ |
|
1194 |
newProfile = EProfileGeneralId; |
|
1195 |
} |
|
1196 |
else |
|
1197 |
{ |
|
1198 |
newProfile = EProfileSilentId; |
|
1199 |
} |
|
1200 |
||
1201 |
profileEngine->SetActiveProfileL( newProfile ); |
|
1202 |
||
1203 |
CleanupStack::Pop(); // profileEngine |
|
1204 |
profileEngine->Release(); |
|
1205 |
||
1206 |
// Stop playing DTMF tone |
|
1207 |
iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF ); |
|
1208 |
||
1209 |
if ( !iOnScreenDialer ) |
|
1210 |
{ |
|
1211 |
// Remove the number entry |
|
1212 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
|
1213 |
} |
|
1214 |
else |
|
1215 |
{ |
|
1216 |
NumberEntryClearL(); |
|
1217 |
} |
|
1218 |
||
1219 |
iCbaManager->UpdateCbaL( EPhoneEmptyCBA ); |
|
1220 |
||
1221 |
// Bring Idle app to the top app |
|
1222 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetIdleTopApplication ); |
|
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1223 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1224 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1225 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1226 |
// CPhoneStateIdle::DialMultimediaCallL |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1227 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1228 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1229 |
EXPORT_C void CPhoneStateIdle::DialMultimediaCallL() |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1230 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1231 |
__LOGMETHODSTARTEND( EPhoneControl, "CPhoneStateIdle::DialMultimediaCall() "); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1232 |
__ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(), |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1233 |
Panic( EPhoneCtrlInvariant ) ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1234 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1235 |
if ( RestoreOngoing() ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1236 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1237 |
CPhoneState::SendGlobalInfoNoteL( EPhoneInformationVideoCallNotAllowedDuringRestoreNote ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1238 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1239 |
else |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1240 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1241 |
CPhoneState::DialMultimediaCallL(); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1242 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1243 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1244 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1245 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1246 |
// CPhoneStateIdle::DialVoiceCallL |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1247 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1248 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1249 |
EXPORT_C void CPhoneStateIdle::DialVoiceCallL() |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1250 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1251 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::DialVoiceCallL() "); |
62 | 1252 |
__ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(), Panic( EPhoneCtrlInvariant ) ); |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1253 |
CPhoneState::DialVoiceCallL(); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1254 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1255 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1256 |
// ----------------------------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1257 |
// CPhoneStateIdle::RestoreOngoing |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1258 |
// ----------------------------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1259 |
// |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1260 |
TBool CPhoneStateIdle::RestoreOngoing() |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1261 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1262 |
TInt restoreValue; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1263 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1264 |
RProperty::Get( KUidSystemCategory, |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1265 |
conn::KUidBackupRestoreKey, |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1266 |
restoreValue ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1267 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1268 |
return ( restoreValue & ( conn::EBURRestoreFull | conn::EBURRestorePartial )); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1269 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1270 |
|
62 | 1271 |
// ----------------------------------------------------------------------------- |
1272 |
// CPhoneStateIdle::CheckAppLaunchingL |
|
1273 |
// ----------------------------------------------------------------------------- |
|
1274 |
// |
|
1275 |
TBool CPhoneStateIdle::CheckAppLaunchingL( const TKeyCode aCode ) |
|
1276 |
{ |
|
1277 |
TBool valuesFetched( EFalse ); |
|
1278 |
||
1279 |
if( !IsSimOk() ) |
|
1280 |
{ |
|
1281 |
return valuesFetched; |
|
1282 |
} |
|
1283 |
||
1284 |
TPhoneCmdParamAppInfo appInfo; |
|
1285 |
HBufC8* appParam = HBufC8::NewL( KMaxParamLength ); |
|
1286 |
CleanupStack::PushL( appParam ); |
|
1287 |
||
1288 |
TBool isValidAppLaunchingKeyEvent = ETrue; |
|
1289 |
||
1290 |
// By-pass checking of number entry length in case of #-character. |
|
1291 |
// #-character is handled differently from other keys, and number |
|
1292 |
// entry length has been checked earlier. Checking number entry length |
|
1293 |
// for #-character is difficult here, because we cannot know if FEP |
|
1294 |
// has removed the long-# from number entry or not. |
|
1295 |
if ( TKeyCode( KPhoneDtmfHashCharacter ) != aCode ) |
|
1296 |
{ |
|
1297 |
TPhoneCmdParamInteger numberEntryCount; |
|
1298 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewGetNumberEntryCount, |
|
1299 |
&numberEntryCount ); |
|
1300 |
||
1301 |
isValidAppLaunchingKeyEvent = ( numberEntryCount.Integer() == 1 ); |
|
1302 |
} |
|
1303 |
||
1304 |
if ( isValidAppLaunchingKeyEvent ) |
|
1305 |
{ |
|
1306 |
TRAPD( err, |
|
1307 |
CPhoneCenRepProxy::Instance()->FetchValuesFromCenRepL( |
|
1308 |
appInfo, aCode, appParam, valuesFetched ) ); |
|
1309 |
||
1310 |
if ( KErrNone == err && valuesFetched ) |
|
1311 |
{ |
|
1312 |
// Remove the number entry window |
|
1313 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
|
1314 |
||
1315 |
// Stop playing DTMF tone |
|
1316 |
iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF ); |
|
1317 |
||
1318 |
TPhoneCommandParam* phoneCommandParam = |
|
1319 |
static_cast<TPhoneCommandParam*>( &appInfo ); |
|
1320 |
iViewCommandHandle->ExecuteCommandL( |
|
1321 |
EPhoneViewActivateAppViewConventional, |
|
1322 |
phoneCommandParam ); |
|
1323 |
||
1324 |
// Continue displaying current app but set up the |
|
1325 |
// idle screen in the background |
|
1326 |
SetupIdleScreenInBackgroundL(); |
|
1327 |
} |
|
1328 |
} |
|
1329 |
CleanupStack::PopAndDestroy( appParam ); |
|
1330 |
return valuesFetched; |
|
1331 |
} |
|
1332 |
||
1333 |
// ----------------------------------------------------------- |
|
1334 |
// CPhoneStateIdle::NumberForSpeedDialLocationL |
|
1335 |
// ----------------------------------------------------------- |
|
1336 |
// |
|
1337 |
HBufC* CPhoneStateIdle::NumberForSpeedDialLocationL( |
|
1338 |
const TUint& aDigit, |
|
1339 |
TPhoneCmdParamSpeedDial& aSpeedDialParam ) const |
|
1340 |
{ |
|
1341 |
// Set the speed dial location from the digit in buffer. Character |
|
1342 |
// '1' means location 1, and so on. |
|
1343 |
const TInt location = aDigit - KPhoneDtmf1Character + 1; |
|
1344 |
aSpeedDialParam.SetLocation( location ); |
|
1345 |
||
1346 |
// Get the number and type from the speed dial location. |
|
1347 |
HBufC* phoneNumber = HBufC::NewLC( KPhoneNumberEntryBufferSize ); |
|
1348 |
||
1349 |
TPtr ptr( phoneNumber->Des() ); |
|
1350 |
aSpeedDialParam.SetPhoneNumber( &ptr ); |
|
1351 |
iViewCommandHandle->HandleCommandL( |
|
1352 |
EPhoneViewGetNumberFromSpeedDialLocation, &aSpeedDialParam ); |
|
1353 |
||
1354 |
CleanupStack::Pop( phoneNumber ); |
|
1355 |
return phoneNumber; |
|
1356 |
} |
|
1357 |
||
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1358 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1359 |
// CPhoneStateIdle::HandleVoiceCallCommandL() |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1360 |
// ----------------------------------------------------------- |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1361 |
// |
62 | 1362 |
void CPhoneStateIdle::HandleVoiceCallCommandL( TBool aSendKey ) |
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1363 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1364 |
__LOGMETHODSTARTEND( |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1365 |
EPhoneControl, "CPhoneStateIdle::HandleVoiceCallCommandL()" ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1366 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1367 |
if ( IsNumberEntryUsedL() ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1368 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1369 |
// Handle send key short press, get the number entry contents. |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1370 |
HBufC* phoneNumber = PhoneNumberFromEntryLC(); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1371 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1372 |
if ( !IsSimOk() ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1373 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1374 |
iStateMachine->PhoneEngineInfo()->SetPhoneNumber( *phoneNumber ) ; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1375 |
iStateMachine->SendPhoneEngineMessage( |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1376 |
MPEPhoneModel::EPEMessageCheckEmergencyNumber ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1377 |
CleanupStack::PopAndDestroy( phoneNumber ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1378 |
return; |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1379 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1380 |
|
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1381 |
#ifdef _DEBUG |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1382 |
if ( (*phoneNumber).Compare( KExit ) == 0 ) |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1383 |
{ |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1384 |
CleanupStack::PopAndDestroy( phoneNumber ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1385 |
SendExitCommandL(); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1386 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1387 |
else |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1388 |
#endif // _DEBUG |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1389 |
{ |
62 | 1390 |
if ( IsDialingExtensionInFocusL() ) |
1391 |
{ |
|
1392 |
CPhoneState::HandleCommandL( EEasyDialingVoiceCall ); |
|
1393 |
} |
|
1394 |
||
1395 |
else if ( IsSpeedDialNumber( *phoneNumber ) ) |
|
1396 |
{ |
|
1397 |
// Handle speed dial |
|
1398 |
SpeedDialL( (*phoneNumber)[0], aSendKey ? EDialMethodSendCommand : EDialMethodMenuSelection ); |
|
1399 |
} |
|
1400 |
else |
|
1401 |
{ |
|
1402 |
// call the number |
|
1403 |
iStateMachine->PhoneEngineInfo()->SetPhoneNumber( *phoneNumber ); |
|
1404 |
DialVoiceCallL(); |
|
1405 |
} |
|
1406 |
||
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1407 |
CleanupStack::PopAndDestroy( phoneNumber ); |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1408 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1409 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1410 |
} |
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1411 |
|
62 | 1412 |
// ----------------------------------------------------------- |
1413 |
// CPhoneStateIdle::GetNumberAcqMenuIdL() |
|
1414 |
// ----------------------------------------------------------- |
|
1415 |
// |
|
1416 |
TInt CPhoneStateIdle::GetNumberAcqMenuIdL() |
|
1417 |
{ |
|
1418 |
TInt menuId = CPhoneMainResourceResolver::Instance()-> |
|
1419 |
ResolveResourceID( EPhoneNumberAcqMenubar ); |
|
1420 |
||
1421 |
// Use easy dialing menu id, if easydialing is in focus. |
|
1422 |
// Otherwise use number acquisition menu id. |
|
1423 |
if ( IsDialingExtensionInFocusL() ) |
|
1424 |
{ |
|
1425 |
// Fetch easydialing menu id, check its validity and assign to menuId |
|
1426 |
TPhoneCmdParamInteger integerParam; |
|
1427 |
iViewCommandHandle->ExecuteCommandL( |
|
1428 |
EPhoneViewGetEasyDialingMenuId, &integerParam ); |
|
1429 |
if ( integerParam.Integer() ) |
|
1430 |
{ |
|
1431 |
menuId = integerParam.Integer(); |
|
1432 |
} |
|
1433 |
} |
|
1434 |
return menuId; |
|
1435 |
} |
|
1436 |
||
1437 |
// ----------------------------------------------------------- |
|
1438 |
// CPhoneStateIdle::HandleErrorL |
|
1439 |
// ----------------------------------------------------------- |
|
1440 |
// |
|
1441 |
EXPORT_C void CPhoneStateIdle::HandleErrorL( const TPEErrorInfo& aErrorInfo ) |
|
1442 |
{ |
|
1443 |
__LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneStateIdle::HandleErrorL() "); |
|
1444 |
if( KErrNotFound < aErrorInfo.iCallId ) |
|
1445 |
{ |
|
1446 |
SetCallInitialized( EFalse ); |
|
1447 |
} |
|
1448 |
CPhoneState::HandleErrorL( aErrorInfo ); |
|
1449 |
} |
|
1450 |
||
1451 |
// ----------------------------------------------------------- |
|
1452 |
// CPhoneStateIdle::ChangeTo |
|
1453 |
// ----------------------------------------------------------- |
|
1454 |
// |
|
1455 |
void CPhoneStateIdle::ChangeTo( TInt aState ) |
|
1456 |
{ |
|
1457 |
__PHONELOG1( EBasic, EPhoneControl, |
|
1458 |
"PhoneUIControl: CPhoneStateIdle::ChangeTo - aState =%d ", |
|
1459 |
aState ); |
|
1460 |
SetCallInitialized( EFalse ); |
|
1461 |
iStateMachine->ChangeState( aState ); |
|
1462 |
} |
|
1463 |
||
1464 |
// ----------------------------------------------------------- |
|
1465 |
// CPhoneStateIdle::SetBubbleInitialized |
|
1466 |
// ----------------------------------------------------------- |
|
1467 |
// |
|
1468 |
void CPhoneStateIdle::SetCallInitialized( TBool aValue ) |
|
1469 |
{ |
|
1470 |
__PHONELOG1( EBasic, EPhoneControl, |
|
1471 |
"PhoneUIControl: CPhoneStateIdle::SetCallInitialized - iCallInitialized =%d ", |
|
1472 |
aValue ); |
|
1473 |
iCallInitialized = aValue; |
|
1474 |
} |
|
1475 |
||
1476 |
// ----------------------------------------------------------- |
|
1477 |
// CPhoneStateIdle::IsBubbleInitialized |
|
1478 |
// ----------------------------------------------------------- |
|
1479 |
// |
|
1480 |
TBool CPhoneStateIdle::IsCallInitialized() |
|
1481 |
{ |
|
1482 |
__PHONELOG1( EBasic, EPhoneControl, |
|
1483 |
"PhoneUIControl: CPhoneStateIdle::IsCallInitialized - iCallInitialized =%d ", |
|
1484 |
iCallInitialized ); |
|
1485 |
return iCallInitialized; |
|
1486 |
} |
|
1487 |
||
0
5f000ab63145
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1488 |
// End of File |