author | Pat Downey <patd@symbian.org> |
Wed, 01 Sep 2010 12:24:48 +0100 | |
branch | RCL_3 |
changeset 63 | c2c61fdca848 |
parent 62 | 924385140d98 |
child 66 | 9af619316cbf |
permissions | -rw-r--r-- |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
4
0fdb7f6b0309
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
2 |
* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
2e3d3ce01487
Revision: 201002
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". |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
* Description: CSysApAppUi implementation. |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
63 | 17 |
|
18 |
||
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
// INCLUDES |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
|
63 | 21 |
#include<akndiscreetpopup.h> |
22 |
#include <avkon.hrh> |
|
23 |
#include <avkon.rsg> |
|
24 |
#include <eikon.hrh> |
|
25 |
#include <apgwgnam.h> |
|
26 |
#include <eiksrv.h> |
|
27 |
#include <eikdll.h> |
|
28 |
#include <AknSmallIndicator.h> |
|
29 |
#include <AknBatteryNotify.h> |
|
30 |
#include <AknSignalNotify.h> |
|
31 |
#include <AknGlobalNote.h> |
|
32 |
#include <AknGlobalListQuery.h> |
|
33 |
#include <aknsoundsystem.h> |
|
34 |
#include <apgcli.h> |
|
35 |
||
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
36 |
#include <hwrmpowerstatesdkpskeys.h> |
63 | 37 |
#include <hwrmdomainpskeys.h> |
38 |
||
39 |
#include <PSVariables.h> |
|
40 |
#include "CoreApplicationUIsPrivatePSKeys.h" |
|
41 |
#include <ctsydomainpskeys.h> |
|
42 |
#include <startupdomainpskeys.h> |
|
43 |
#include <startupdomaincrkeys.h> |
|
44 |
||
45 |
#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
46 |
#include <ASShdAlarm.h> |
|
47 |
#else |
|
48 |
#include <asshddefs.h> |
|
49 |
#include <ASShdAlarmCal.h> |
|
50 |
#include <asshdalarm.h> |
|
51 |
#endif //SYMBIAN_ENABLE_SPLIT_HEADERS |
|
52 |
||
53 |
#include <MProfileEngine.h> |
|
54 |
#include <MProfileName.h> |
|
55 |
#include <MProfilesNamesArray.h> |
|
56 |
#include <MProfile.h> |
|
57 |
#include <StringLoader.h> |
|
58 |
#include <secuisystemlock.h> |
|
59 |
#include <secui.h> |
|
60 |
#include <settingsinternalcrkeys.h> |
|
61 |
||
62 |
#include "sysapganhandler.h" |
|
63 |
#include <AknNotifierController.h> |
|
64 |
#include <eikappui.h> |
|
65 |
#include <es_enum.h> |
|
66 |
#include <data_caging_path_literals.hrh> |
|
67 |
#include <eikon.hrh> |
|
68 |
||
69 |
#include "SysApSimChanged.h" |
|
70 |
||
71 |
#include <SysAp.rsg> |
|
72 |
#include "SysApLightsController.h" |
|
73 |
||
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
74 |
#include "SysApPubSubObserver.h" |
63 | 75 |
#include "SysApProfileObserver.h" |
76 |
||
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
77 |
#include "sysapcenreplightsettingsobserver.h" |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
78 |
#include "SysApCenRepLogsObserver.h" |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
79 |
#include "SysApCenRepBTObserver.h" |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
80 |
#include "SysApCenRepHacSettingObserver.h" |
63 | 81 |
#include "SysApCenRepController.h" |
82 |
#include "CoreApplicationUIsPrivateCRKeys.h" |
|
83 |
#include "CoreApplicationUIsPrivatePSKeys.h" |
|
84 |
#include <UikonInternalPSKeys.h> |
|
85 |
||
86 |
#include "SysApStartupController.h" |
|
87 |
#include "SysApConnectionMonitorObserver.h" |
|
88 |
#include "SysApPowerKeyMenuObserver.h" |
|
89 |
#include "SysApSsSettingsObserver.h" |
|
90 |
#include "SysApAppUi.h" |
|
91 |
#include "SysApShutdownImage.h" |
|
92 |
#include "SysApEtelConnector.h" |
|
93 |
||
94 |
#include "SysApApp.h" |
|
95 |
#include "SysApMsgSimMemLowQuery.h" |
|
96 |
#include "SysApNspsHandler.h" |
|
97 |
#include "SysApWaitNote.h" |
|
98 |
#include "SysApConfirmationQuery.h" |
|
99 |
#include "SysApFeatureManager.h" |
|
100 |
#include "SysApSubscriber.h" |
|
101 |
#include "MSysApOfflineModeController.h" |
|
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
102 |
#include "MSysApBtController.h" |
63 | 103 |
#include "MSysApBtSapController.h" |
104 |
#include "MSysApLocationPrivacyIndicator.h" |
|
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
105 |
#include "MSysApUsbIndicator.h" |
63 | 106 |
|
107 |
#include <sysap.mbg> |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
108 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
109 |
#include "SysApShutdownAnimation.h" |
63 | 110 |
|
111 |
#include <hwrmfmtx.h> |
|
112 |
#include <hwrmfmtxdomainpskeys.h> |
|
113 |
#include <hwrmfmtxdomaincrkeys.h> |
|
114 |
#include "sysapcenrepfmtxobserver.h" |
|
115 |
||
116 |
#include "SysApKeySndHandler.h" |
|
117 |
||
118 |
#include <ir_sock.h> // KIrdaPropertyCategory // KIrdaStatus |
|
119 |
||
120 |
#include <NetworkHandlingDomainPSKeys.h> |
|
121 |
||
122 |
// POC launching |
|
123 |
#include <AiwServiceHandler.h> |
|
124 |
#include <AiwPoCParameters.h> |
|
125 |
||
126 |
#include <sacls.h> // KUidPhonePwr |
|
127 |
||
128 |
#include <wlaninternalpskeys.h> // WLan indicator |
|
129 |
||
130 |
#include <ecom/ecom.h> |
|
131 |
#include "sysapkeymanagement.h" |
|
132 |
||
133 |
#include "SysApMediatorObserver.h" |
|
134 |
||
135 |
#include <secondarydisplay/SecondaryDisplaySysApAPI.h> |
|
136 |
#include "aknSDData.h" |
|
137 |
||
138 |
#include <AknTaskList.h> |
|
139 |
#include <layoutmetadata.cdl.h> |
|
140 |
||
141 |
#include "sysapdefaultkeyhandler.h" |
|
142 |
#include "sysapaudioroutingobserver.h" |
|
143 |
#include "sysapcenrepcallforwardingobserver.h" |
|
144 |
#include "sysapcenrepmsgwaitingobserver.h" |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
145 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
146 |
#ifdef RD_MULTIPLE_DRIVE |
63 | 147 |
#include "sysapdrivelist.h" |
148 |
#include "sysapdriveunlockhandler.h" |
|
149 |
#include "sysapdriveejecthandler.h" |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
150 |
#endif // RD_MULTIPLE_DRIVE |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
151 |
|
63 | 152 |
#include "sysappsmcontroller.h" |
153 |
#include "sysapbatteryinfocontroller.h" |
|
154 |
||
155 |
#include <keylockpolicyapi.h> |
|
156 |
||
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
157 |
#include <UsbWatcherInternalPSKeys.h> // USB transfer modes |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
158 |
#include <usbpersonalityids.h> |
63 | 159 |
#include <smsuaddr.h> |
160 |
#include <featmgr.h> |
|
161 |
#include <DevEncProtectedPSKey.h> |
|
162 |
||
163 |
// CONSTANTS |
|
164 |
const TInt KPowerKeyMenuSelectionCancelled( -1 ); |
|
165 |
const TInt KPowerKeyMenuSelectionSwitchOff( 0 ); |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
166 |
const TInt KModifierMask( 0 ); |
63 | 167 |
const TInt KDelayBeforeShuttingDownInAlarmAndChargingStates( 500000 ); |
168 |
const TInt KDelayBeforeShowingGprsSuspendedNote( 500000 ); |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
169 |
const TInt KDelayBeforeNextScanningRound( 1000000 ); |
63 | 170 |
const TInt KActiveProfile( 0 ); //The value of ActiveProfile for accessory default profile selection in GS/SD. |
171 |
const TInt KProfileListInitialIndex( 0 ); |
|
172 |
const TInt KMaxProfileNameLength( 64 ); |
|
173 |
const TInt KTimeToShowShutdownNote( 2000000 ); //2 seconds time for Goodbye note to show before being shutdown |
|
174 |
#ifndef RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
175 |
const TInt KCoefficientToMakeMicroToMilliSeconds = 1000; |
|
176 |
#endif // RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
177 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
178 |
/* ENABLE ANIMATION: Add id of background image. |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
179 |
Example: const TInt KBackgroundImageID = EMbmSysapQgn_graf_startup_bg; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
180 |
If there is no image defined, clear screen is used.*/ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
181 |
const TInt KBackgroundImageID = 0; |
63 | 182 |
#ifndef RD_MULTIPLE_DRIVE |
183 |
const TInt32 KAutolockAppUid = 0x100059B5; |
|
184 |
const TInt KFileManagerAppUid = 0x101F84EB; |
|
185 |
#endif // RD_MULTIPLE_DRIVE |
|
186 |
const TInt KCoefficientKhzToMhz = 1000; |
|
187 |
const TInt KDecimalsInMhzFrequency = 2; |
|
188 |
||
189 |
const TInt KHWSwitchGroup( 29 ); |
|
190 |
const TInt KHWSwitchGrip( 2 ); |
|
191 |
||
192 |
_LIT_SECURITY_POLICY_PASS(KAlwaysPassPolicy); |
|
193 |
_LIT_SECURITY_POLICY_C1(KWriteDeviceDataPolicy, ECapabilityWriteDeviceData); |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
194 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
195 |
// ============================ MEMBER FUNCTIONS ============================== |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
196 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
197 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
198 |
// CSysApAppUi::CSysApAppUi() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
199 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
200 |
|
63 | 201 |
CSysApAppUi::CSysApAppUi() : |
202 |
iSysApCenRepLogsObserver( NULL ), |
|
203 |
iSysApCenRepHacSettingObserver( NULL ), |
|
204 |
iSysApPowerKeyMenuObserver( NULL ), |
|
205 |
iSysApShutdownImage( NULL ), |
|
206 |
iSysApConfirmationQuery( NULL ), |
|
207 |
iSysApConfirmationQueryForRestart( NULL ), |
|
208 |
iSignalNotify( NULL ), |
|
209 |
#ifndef RD_MULTIPLE_DRIVE |
|
210 |
iMemoryCardDialog( 0 ), |
|
211 |
#endif // RD_MULTIPLE_DRIVE |
|
212 |
iPowerKeyPopupMenuActive( EFalse ), |
|
213 |
iDisablePowerkeyMenu( EFalse ), |
|
214 |
iDeviceLockEnabled( EFalse ), |
|
215 |
iKeyLockEnabled( EFalse ), |
|
216 |
iShowkeypadActivatedNoteAfterSoftReject( EFalse ), |
|
217 |
iEmergencyCallActive( EFalse ), |
|
218 |
iSimChangedDone( EFalse ), |
|
219 |
iResourcesFreed( EFalse ), |
|
220 |
#ifndef RD_MULTIPLE_DRIVE |
|
221 |
iHideFirstBeep( ETrue ), |
|
222 |
#endif // RD_MULTIPLE_DRIVE |
|
223 |
iShutdownStarted( EFalse ), |
|
224 |
iIgnoreAccessorySpecificProfileChanges( ETrue ), |
|
225 |
iAccessoryJustConnected( EFalse ), |
|
226 |
iHandleNextProfileEvent( ETrue ), |
|
227 |
iActivateBt( EFalse ), |
|
228 |
iDeactivateBt( EFalse ), |
|
229 |
iGprsActivated( EFalse ), |
|
230 |
iGprsSuspended( EFalse ), |
|
231 |
iCallActivated( EFalse ), |
|
232 |
iGprsSuspendedNoteShown( EFalse ), |
|
233 |
iMMCEjectUsed( EFalse ), |
|
234 |
#ifndef RD_MULTIPLE_DRIVE |
|
235 |
iMMCPowerMenuEjectUsed( EFalse ), |
|
236 |
iMMCInserted( EFalse ), |
|
237 |
#endif // RD_MULTIPLE_DRIVE |
|
238 |
iTimer( NULL ), |
|
239 |
iSapTimer( NULL ), |
|
240 |
#ifndef RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
241 |
iAnimTimer( NULL ), |
|
242 |
#endif // RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
243 |
iSysApTimer( NULL ), |
|
244 |
#ifndef RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
245 |
iAnimationShowingTime( 0 ), |
|
246 |
#endif // RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
247 |
iShutdownContinued( EFalse ), |
|
248 |
iSysApAudioRoutingObserver( NULL ), |
|
249 |
iSysApCenRepCallForwardingObserver( NULL ), |
|
250 |
iSysApCenRepMsgWaitingObserver( NULL ), |
|
251 |
iSysApGanHandler( NULL ), |
|
252 |
iKeyBoardRepeatCount(-1) |
|
253 |
{ |
|
254 |
TRACES( RDebug::Print( _L("CSysApAppUi::CSysApAppUi()") ) ); |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
255 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
256 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
257 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
258 |
// CSysApAppUi::ConstructL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
259 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
260 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
261 |
void CSysApAppUi::ConstructL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
262 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
263 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: START") ) ); |
63 | 264 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying BaseConstructL( EAknEnableSkin )") ) ); |
265 |
BaseConstructL( EAknEnableSkin ); |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
266 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: BaseConstructL() OK") ) ); |
63 | 267 |
|
268 |
||
269 |
/*SysAp is set as system application (Symbian terminology). This means some special privilege compared |
|
270 |
to other applications. For example it does not get closed when system is asked to close applications |
|
271 |
*/ |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
272 |
iEikonEnv->SetSystem( ETrue ); |
63 | 273 |
// For cdma |
274 |
||
275 |
iTDEnable = FeatureManager::FeatureSupported( KFeatureIdFfTdScdma ); |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
276 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
277 |
iEikonEnv->WsSession().ComputeMode( RWsSession::EPriorityControlDisabled ); |
63 | 278 |
|
279 |
static_cast<CAknAppUi*>(iEikonEnv->EikAppUi())->KeySounds()->PushContextL( R_AVKON_SILENT_SKEY_LIST ); |
|
280 |
||
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
281 |
RThread().SetProcessPriority( EPriorityForeground ); |
63 | 282 |
|
283 |
/*SysAp does not have any visible Status pane. An exception will be Charging state |
|
284 |
where SysAp shows Status Pane as it is the only running application. |
|
285 |
*/ |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
286 |
TInt mode; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
287 |
User::LeaveIfError( RProperty::Get( KPSUidStartup, KPSGlobalStartupMode, mode ) ); |
63 | 288 |
|
289 |
if( mode == EStartupModeCharging || mode == EStartupModeAlarm ) |
|
290 |
{ |
|
291 |
SetStatusPaneLayoutL( |
|
292 |
mode == EStartupModeCharging ? ESysApCharging : ESysApAlarm ); |
|
293 |
||
294 |
SetKeyEventFlags( |
|
295 |
CAknAppUiBase::EDisableSendKeyShort | |
|
296 |
CAknAppUiBase::EDisableSendKeyLong ); |
|
297 |
} |
|
298 |
else |
|
299 |
{ |
|
300 |
SetStatusPaneLayoutL( ESysApNormal ); |
|
301 |
} |
|
302 |
||
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
303 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApFeatureManager::NewL()") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
304 |
iSysApFeatureManager = CSysApFeatureManager::NewL(); |
63 | 305 |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
306 |
// Setup USB charging detector |
63 | 307 |
iSysApUsbChargerDetector.EnableUsbCharging( |
308 |
iSysApFeatureManager->Supported( KSysApFeatureIdChargerReminderNotes ) && |
|
309 |
iSysApFeatureManager->Supported( KSysApFeatureIdUsbChargingWithoutReminderNotes ) ); |
|
310 |
||
311 |
// Construct notifiers that are used frequently or in OOM situations. |
|
312 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CAknBatteryNotify::NewL()") ) ); |
|
313 |
iBatteryNotify = CAknBatteryNotify::NewL(); |
|
314 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CAknSignalNotify::NewL()") ) ); |
|
315 |
iSignalNotify = CAknSignalNotify::NewL(); |
|
316 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying new ( ELeave ) CSysApMsgSimMemLowQuery") ) ); |
|
317 |
iSysApMsgSimMemLowQuery = new( ELeave ) CSysApMsgSimMemLowQuery( iSysApFeatureManager->CoverDisplaySupported() ); |
|
318 |
||
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
319 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApPubSubObserver::NewL()") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
320 |
iSysApPubSubObserver = CSysApPubSubObserver::NewL( *this ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
321 |
RProperty::Define( KPSUidCoreApplicationUIs, KCoreAppUIsPoCIndicator, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
322 |
RProperty::Set( KPSUidCoreApplicationUIs, KCoreAppUIsPoCIndicator, ECoreAppUIsPocIndicatorUninitialized ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
323 |
RProperty::Define( KPSUidCoreApplicationUIs, KCoreAppUIsPoCMissedIndicator, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
324 |
RProperty::Set( KPSUidCoreApplicationUIs, KCoreAppUIsPoCMissedIndicator, ECoreAppUIsPocMissedIndicatorUninitialized ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
325 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
326 |
// initial value won't be set to KCoreAppUIsUSBFileTransfer, because UsbMscPersonality-plugin may also define it if USB cable is connected during boot |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
327 |
// remove this definition after all clients have taken the USB personality ids in use |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
328 |
RProperty::Define( KPSUidCoreApplicationUIs, KCoreAppUIsUSBFileTransfer, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
329 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
330 |
RProperty::Define( KPSUidCoreApplicationUIs, KCoreAppUIsVideoSharingIndicator, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
331 |
RProperty::Set( KPSUidCoreApplicationUIs, KCoreAppUIsVideoSharingIndicator, ECoreAppUIsVideoSharingIndicatorUninitialized ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
332 |
|
63 | 333 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApAccessoryObserver::NewL()") ) ); |
334 |
iSysApAccessoryObserver = CSysApAccessoryObserver::NewL( *this ); |
|
335 |
||
336 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApCenRepController::NewL()") ) ); |
|
337 |
iSysApCenRepController = CSysApCenRepController::NewL(); |
|
338 |
||
339 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApCenRepLightSettingsObserver::NewL") ) ); |
|
340 |
iSysApCenRepLightSettingsObserver = CSysApCenRepLightSettingsObserver::NewL( *this ); |
|
341 |
||
342 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApCenRepBtObserver::NewL") ) ); |
|
343 |
iSysApCenRepBtObserver = CSysApCenRepBtObserver::NewL( *this ); |
|
344 |
||
345 |
if ( iSysApFeatureManager->FmTxSupported() ) |
|
346 |
{ |
|
347 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApCenRepFmTxObserver::NewL") ) ); |
|
348 |
iSysApCenRepFmTxObserver = CSysApCenRepFmTxObserver::NewL( *this ); |
|
349 |
} |
|
350 |
||
351 |
// Define P&S keys "owned" by SysAp |
|
352 |
RProperty::Define( KPSUidUikon, KUikMMCInserted, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
|
353 |
//initially set the value as 0 assuming mmc is not inserted |
|
354 |
RProperty::Set( KPSUidUikon, KUikMMCInserted, 0 ); |
|
355 |
TDriveInfo driveInfo; |
|
356 |
TInt driveNumber; |
|
357 |
TInt err; |
|
358 |
RFs& fileServer = iEikonEnv->FsSession(); |
|
359 |
for ( driveNumber = EDriveD; driveNumber < EDriveZ; driveNumber++ ) |
|
360 |
{ |
|
361 |
err = fileServer.Drive(driveInfo,driveNumber); |
|
362 |
if(driveNumber==EDriveF && err == KErrNone && driveInfo.iType == EMediaHardDisk && driveInfo.iDriveAtt & KDriveAttRemovable) |
|
363 |
{ |
|
364 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: err = %d, driveInfo.iType = %d, driveInfo.iDriveAtt %d, KDriveAttRemovable = %d "),err,driveInfo.iType,driveInfo.iDriveAtt,KDriveAttRemovable) ); |
|
365 |
RProperty::Set( KPSUidUikon, KUikMMCInserted, 1 ); |
|
366 |
break; // Memory card drive found... |
|
367 |
} |
|
368 |
} |
|
369 |
||
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
370 |
RProperty::Define( KPSUidCoreApplicationUIs, KCoreAppUIsHideAlarm, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
371 |
RProperty::Define( KPSUidCoreApplicationUIs, KCoreAppUIsDisableKeyguard, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
372 |
RProperty::Define( KPSUidCoreApplicationUIs, KCoreAppUIsSoftReject, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
373 |
RProperty::Define( KPSUidCoreApplicationUIs, KCoreAppUIsUipInd, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
374 |
RProperty::Define( KPSUidCoreApplicationUIs, KCoreAppUIsMessageToneQuit, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
375 |
RProperty::Define( KPSUidCoreApplicationUIs, KCoreAppUIsNspsRawKeyEvent, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
376 |
RProperty::Define( KPSUidCoreApplicationUIs, KCoreAppUIsLightsRawKeyEvent, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
377 |
RProperty::Define( KPSUidCoreApplicationUIs, KCoreAppUIsMmcRemovedWithoutEject, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
378 |
RProperty::Define( KPSUidCoreApplicationUIs, KLightsAlarmLightActive, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
379 |
RProperty::Define( KPSUidCoreApplicationUIs, KLightsVTForcedLightsOn, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
380 |
RProperty::Define( KPSUidCoreApplicationUIs, KLightsSSForcedLightsOn, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
381 |
RProperty::Define( KPSUidCoreApplicationUIs, KLightsATCForcedLightsOn, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
382 |
RProperty::Define( KPSUidCoreApplicationUIs, KLightsControl, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
383 |
RProperty::Define( KPSUidCoreApplicationUIs, KCoreAppUIsTarmIndicator, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
384 |
RProperty::Define( KPSUidCoreApplicationUIs, KCoreAppUIsMtvRecStatus, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
385 |
RProperty::Define( KPSUidCoreApplicationUIs, KCoreAppUIsMtvDvbhStatus, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
386 |
RProperty::Define( KPSUidCoreApplicationUIs, KCoreAppUIsNewEmailStatus, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
387 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
388 |
// Initialize P&S keys "owned" by SysAp |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
389 |
RProperty::Set( KPSUidCoreApplicationUIs, KCoreAppUIsHideAlarm, ECoreAppUIsHideAlarmUninitialized ); |
63 | 390 |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
391 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApStartupController::NewL()") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
392 |
iSysApStartupController = CSysApStartupController::NewL( *this, iSysApFeatureManager->OfflineModeSupported() ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
393 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
394 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApLightsController::NewL()") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
395 |
iSysApLightsController = CSysApLightsController::NewL( *this, |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
396 |
iSysApCenRepLightSettingsObserver->GetLightsTimeout(), |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
397 |
iSysApFeatureManager->CoverDisplaySupported() ); |
63 | 398 |
|
399 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApEtelConnector::NewL()") ) ); |
|
400 |
iSysApEtelConnector = CSysApEtelConnector::NewL( *this ); |
|
401 |
||
402 |
//SysAp needs to capture PowerKey events because it handles all functionality related to that |
|
403 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CEikApplication::RootWin()") ) ); |
|
404 |
RWindowGroup groupWin = iCoeEnv->RootWin(); |
|
405 |
User::LeaveIfError ( iCapturedEKeyPowerOff = groupWin.CaptureKey( EKeyPowerOff, KModifierMask, KModifierMask ) ); |
|
406 |
User::LeaveIfError ( iCapturedEKeyPowerOffUpAndDowns = groupWin.CaptureKeyUpAndDowns( EStdKeyDevice2, KModifierMask, KModifierMask ) ); |
|
407 |
||
408 |
TRACES ( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApDefaultKeyHandler::NewL()") ) ); |
|
409 |
iSysApDefaultKeyHandler = CSysApDefaultKeyHandler::NewL( *this ); |
|
410 |
||
411 |
TInt status(0); |
|
412 |
err = UserSvr::HalFunction( KHWSwitchGroup, KHWSwitchGrip, &status, 0 ); |
|
413 |
if( err == KErrNone ) |
|
414 |
{ |
|
415 |
if( status == 0 ) |
|
416 |
{ |
|
417 |
RProperty::Set( KPSUidHWRM, KHWRMGripStatus, EPSHWRMGripOpen ); |
|
418 |
} |
|
419 |
else |
|
420 |
{ |
|
421 |
RProperty::Set( KPSUidHWRM, KHWRMGripStatus, EPSHWRMGripClosed ); |
|
422 |
} |
|
423 |
} |
|
424 |
else |
|
425 |
{ |
|
426 |
TRACES ( RDebug::Print( _L("CSysApAppUi::ConstructL: error in getting slide status: err = %d"), err ) ); |
|
427 |
} |
|
428 |
||
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
429 |
#ifndef RD_MULTIPLE_DRIVE |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
430 |
if ( iSysApFeatureManager->MmcSupported() ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
431 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
432 |
iSysApMMCObserver = CSysApMMCObserver::NewL( this, &iEikonEnv->FsSession(), iSysApFeatureManager->MmcHotSwapSupported() ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
433 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
434 |
#else // RD_MULTIPLE_DRIVE |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
435 |
iSysApDriveList = CSysApDriveList::NewL( iEikonEnv->FsSession() ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
436 |
if ( iSysApFeatureManager->MmcSupported() ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
437 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
438 |
iSysApMMCObserver = CSysApMMCObserver::NewL( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
439 |
iEikonEnv->FsSession(), *iSysApDriveList, *this, iSysApFeatureManager->MmcHotSwapSupported() ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
440 |
iSysApDriveUnlockHandler = CSysApDriveUnlockHandler::NewL( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
441 |
*iSysApDriveList, *this, iSysApFeatureManager->MemoryCardLockSupported() ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
442 |
iSysApDriveEjectHandler = CSysApDriveEjectHandler::NewL( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
443 |
*iSysApDriveList, *this, iEikonEnv->FsSession() ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
444 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
445 |
#endif // RD_MULTIPLE_DRIVE |
63 | 446 |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
447 |
//Instantiate the KEF plugin manager |
63 | 448 |
//Trap constuction, since Sysap may live without iSysApKeyManagement |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
449 |
TRAPD(keyManagementErr, iSysApKeyManagement=CSysApKeyManagement::NewL(CCoeEnv::Static()->RootWin(), *this)); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
450 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
451 |
if (keyManagementErr) |
63 | 452 |
{ |
453 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL : CSysApKeyManagement::NewL returns error=%d"), keyManagementErr ) ); |
|
454 |
} |
|
455 |
||
456 |
iSysApFeatureManager->FeatureVariationCheckDone(); |
|
457 |
||
458 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApProfileObserver::NewL()") ) ); |
|
459 |
iSysApProfileObserver = CSysApProfileObserver::NewL( *this ); |
|
460 |
||
461 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL : trying MProfileEngine* CreateProfileEngineL()") ) ); |
|
462 |
iProfileEngine = CreateProfileEngineL( &( iEikonEnv->FsSession() ) ); |
|
463 |
||
464 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL : trying CreateSysApOfflineModeControllerL()") ) ); |
|
465 |
iSysApOfflineModeController = CreateSysApOfflineModeControllerL( *this ); |
|
466 |
||
467 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL : trying DoInitialSwStateCheckL()") ) ); |
|
468 |
iSysApStartupController->DoInitialSwStateCheckL(); |
|
469 |
||
470 |
iActiveProfileBeforeOfflineMode = iSysApCenRepController->GetInt( KCRUidCoreApplicationUIsSysAp, KSysApProfileBeforeOfflineMode ); |
|
471 |
||
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
472 |
// Initialize animdll for handling side volume keys |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
473 |
// (needed before normal mode in case emergency number is dialed from PIN query) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
474 |
iSysApKeySndHandler = CSysApKeySndHandler::NewL(iEikonEnv->WsSession()); |
63 | 475 |
|
476 |
// Initialize shutdown image (needed by nspshandler) |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
477 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApShutdownImage::NewL()") ) ); |
63 | 478 |
iSysApShutdownImage = CSysApShutdownImage::NewL(); |
479 |
||
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
480 |
// Initialize nsps handler. Needed for proper lights control during PIN query. |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
481 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApNspsHandler::NewL") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
482 |
iSysApNspsHandler = CSysApNspsHandler::NewL( iEikonEnv->WsSession(), iSysApShutdownImage->ShutdownCoeControlWindow() ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
483 |
|
63 | 484 |
#ifdef RD_LIGHT_CONTROL_CHANGE |
485 |
// NSPS Plugin has been loaded, inform lights controller that in can activate key event forwarding |
|
486 |
iSysApLightsController->KeyEventForwardingReady(); |
|
487 |
#endif // RD_LIGHT_CONTROL_CHANGE |
|
488 |
||
489 |
// Create HAC setting observer now because telephony state may change before entering to normal state |
|
490 |
TRACES( RDebug::Print( _L("CCSysApAppUi::ConstructL trying CSysApCenRepHacSettingObserver::NewL") ) ); |
|
491 |
iSysApCenRepHacSettingObserver = CSysApCenRepHacSettingObserver::NewL( *this ); |
|
13
096dad6e50a9
Revision: 201009
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
492 |
|
63 | 493 |
DeactivatePSMifBatteryNotLowL (); |
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
494 |
|
63 | 495 |
if( iSysApFeatureManager->GanSupported() ) |
496 |
{ |
|
497 |
||
498 |
||
499 |
RProperty::Define( KPSUidCoreApplicationUIs, KCoreAppUIsGanPropertyGanMode, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
|
500 |
RProperty::Define( KPSUidCoreApplicationUIs, KCoreAppUIsGanPropertySignalLevel, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy ); |
|
501 |
iSysApGanHandler = CSysApGanHandler::NewL( *this ); |
|
502 |
} |
|
503 |
||
504 |
TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: END") ) ); |
|
505 |
} |
|
506 |
||
507 |
||
508 |
// ---------------------------------------------------------------------------- |
|
509 |
// CSysApAppUi::DeactivatePSMifBatteryNotLow() |
|
510 |
// ---------------------------------------------------------------------------- |
|
511 |
void CSysApAppUi::DeactivatePSMifBatteryNotLowL () |
|
512 |
{ |
|
513 |
TRACES( RDebug::Print( _L("CSysApAppUi::DeactivatePSMifBatteryNotLow: Start") ) ); |
|
514 |
if ( iSysApFeatureManager->PowerSaveSupported()) //&& iSysApFeatureManager->Supported( KSysApFeatureIdBatteryInfoPopup )) |
|
515 |
{ |
|
516 |
// Create batteruInfoController to get current battery status; |
|
517 |
if(iSysApBatteryInfoController == NULL) |
|
518 |
{ |
|
519 |
iSysApBatteryInfoController = CSysApBatteryInfoController::NewL( |
|
520 |
iSysApCenRepController->GetInt( |
|
521 |
KCRUidCoreApplicationUIsConf, |
|
522 |
KCoreAppUIsBatteryInformationLowThreshold ) ); |
|
523 |
} |
|
524 |
//Querry the battery level |
|
525 |
TBool status = iSysApBatteryInfoController->IsBatteryInfoAboveThreshold(); |
|
526 |
TRACES( RDebug::Print( _L("CCSysApAppUi::DeactivatePSMifBatteryNotLow IsBatteryInfoAboveThreshold=%d"), status ) ); |
|
527 |
// Querry to deactivate PSM if PSM is activated and battery status is above threshold |
|
528 |
if (status) |
|
529 |
{ |
|
530 |
if(iSysApPsmController == NULL) |
|
531 |
{ |
|
532 |
iSysApPsmController = CSysApPsmController::NewL( *this ); |
|
533 |
} |
|
534 |
if ( iSysApPsmController->ShowDeactivateQuery()) |
|
535 |
ShowQueryL( ESysApBattChargingPowerSavingQuery ); |
|
536 |
else |
|
537 |
iSysApPsmController->DoEnablePartialPsm( EFalse ); |
|
538 |
} |
|
539 |
} |
|
540 |
TRACES( RDebug::Print( _L("CSysApAppUi::DeactivatePSMifBatteryNotLow: End") ) ); |
|
541 |
} |
|
13
096dad6e50a9
Revision: 201009
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
542 |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
543 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
544 |
// CSysApAppUi::~CSysApAppUi() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
545 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
546 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
547 |
CSysApAppUi::~CSysApAppUi() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
548 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
549 |
TRACES( RDebug::Print( _L("~CSysApAppUi() started") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
550 |
if( !iResourcesFreed ) |
63 | 551 |
{ |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
552 |
FreeResources(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
553 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
554 |
iStarterSession.Close(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
555 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
556 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
557 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
558 |
delete iSysApShutdownImage; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
559 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
560 |
#ifndef RD_STARTUP_ANIMATION_CUSTOMIZATION |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
561 |
if (iSysApShutdownAnimation) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
562 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
563 |
RemoveFromStack( iSysApShutdownAnimation ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
564 |
#endif // RD_STARTUP_ANIMATION_CUSTOMIZATION |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
565 |
delete iSysApShutdownAnimation; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
566 |
#ifndef RD_STARTUP_ANIMATION_CUSTOMIZATION |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
567 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
568 |
#endif // RD_STARTUP_ANIMATION_CUSTOMIZATION |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
569 |
|
63 | 570 |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
571 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
572 |
#ifndef RD_STARTUP_ANIMATION_CUSTOMIZATION |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
573 |
if( iAnimTimer ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
574 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
575 |
iAnimTimer->Cancel(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
576 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
577 |
delete iAnimTimer; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
578 |
#endif // RD_STARTUP_ANIMATION_CUSTOMIZATION |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
579 |
|
63 | 580 |
delete iSysApPowerKeyMenuObserver; |
581 |
||
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
582 |
delete iSysApStartupController; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
583 |
|
63 | 584 |
delete iSysApGanHandler; |
585 |
||
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
586 |
#ifdef RD_MULTIPLE_DRIVE |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
587 |
iInsertedMemoryCards.Close(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
588 |
delete iSysApDriveEjectHandler; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
589 |
delete iSysApDriveUnlockHandler; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
590 |
delete iSysApDriveList; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
591 |
#endif // RD_MULTIPLE_DRIVE |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
592 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
593 |
TRACES( RDebug::Print( _L("~CSysApAppUi() completed") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
594 |
} |
63 | 595 |
|
596 |
||
597 |
// ---------------------------------------------------------------------------- |
|
598 |
// CSysApAppUi::HandleLocationPrivacyIndicatorL() |
|
599 |
// ---------------------------------------------------------------------------- |
|
600 |
||
601 |
void CSysApAppUi::HandleLocationPrivacyIndicatorL( const TInt aState ) |
|
602 |
{ |
|
603 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleLocationPrivacyIndicatorL() state=%d"), aState ) ); |
|
604 |
if ( iSysApFeatureManager->LocationPrivacySupported() ) |
|
605 |
{ |
|
606 |
// Phase 1. Set all Location Privacy indicators off |
|
607 |
if ( iSysApLocationPrivacyIndicator->iIndicatorIdAcceptAll != KSysApNoIndicator ) |
|
608 |
{ |
|
609 |
SetIndicatorStateL( iSysApLocationPrivacyIndicator->iIndicatorIdRejectAll, EAknIndicatorStateOff ); |
|
610 |
} |
|
611 |
if ( iSysApLocationPrivacyIndicator->iIndicatorIdRejectAll != KSysApNoIndicator ) |
|
612 |
{ |
|
613 |
SetIndicatorStateL( iSysApLocationPrivacyIndicator->iIndicatorIdRejectAll, EAknIndicatorStateOff ); |
|
614 |
} |
|
615 |
if ( iSysApLocationPrivacyIndicator->iIndicatorIdAlwaysAsk != KSysApNoIndicator ) |
|
616 |
{ |
|
617 |
SetIndicatorStateL( iSysApLocationPrivacyIndicator->iIndicatorIdAlwaysAsk, EAknIndicatorStateOff ); |
|
618 |
} |
|
619 |
if ( iSysApLocationPrivacyIndicator->iIndicatorIdIndividualPrivacy != KSysApNoIndicator ) |
|
620 |
{ |
|
621 |
SetIndicatorStateL( iSysApLocationPrivacyIndicator->iIndicatorIdIndividualPrivacy, EAknIndicatorStateOff ); |
|
622 |
} |
|
623 |
// Phase 2. Set the required Location Privacy indicator on |
|
624 |
switch ( aState ) |
|
625 |
{ |
|
626 |
case EPSLocPrivAcceptAll: |
|
627 |
if ( iSysApLocationPrivacyIndicator->iIndicatorIdAcceptAll != KSysApNoIndicator ) |
|
628 |
{ |
|
629 |
SetIndicatorStateL( iSysApLocationPrivacyIndicator->iIndicatorIdAcceptAll, EAknIndicatorStateOn ); |
|
630 |
} |
|
631 |
break; |
|
632 |
case EPSLocPrivRejectAll: |
|
633 |
if ( iSysApLocationPrivacyIndicator->iIndicatorIdRejectAll != KSysApNoIndicator ) |
|
634 |
{ |
|
635 |
SetIndicatorStateL( iSysApLocationPrivacyIndicator->iIndicatorIdRejectAll, EAknIndicatorStateOn ); |
|
636 |
} |
|
637 |
break; |
|
638 |
case EPSLocPrivAlwaysAsk: |
|
639 |
if ( iSysApLocationPrivacyIndicator->iIndicatorIdAlwaysAsk != KSysApNoIndicator ) |
|
640 |
{ |
|
641 |
SetIndicatorStateL( iSysApLocationPrivacyIndicator->iIndicatorIdAlwaysAsk, EAknIndicatorStateOn ); |
|
642 |
} |
|
643 |
break; |
|
644 |
case EPSLocPrivIndividualPrivacy: |
|
645 |
if ( iSysApLocationPrivacyIndicator->iIndicatorIdIndividualPrivacy != KSysApNoIndicator ) |
|
646 |
{ |
|
647 |
SetIndicatorStateL( iSysApLocationPrivacyIndicator->iIndicatorIdIndividualPrivacy, EAknIndicatorStateOn ); |
|
648 |
} |
|
649 |
break; |
|
650 |
default: |
|
651 |
break; |
|
652 |
} |
|
653 |
} |
|
654 |
} |
|
655 |
||
656 |
||
657 |
// ---------------------------------------------------------------------------- |
|
658 |
// CSysApAppUi::HandleKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType ) |
|
659 |
// ---------------------------------------------------------------------------- |
|
660 |
||
661 |
TKeyResponse CSysApAppUi::HandleKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType ) |
|
662 |
{ |
|
663 |
if ( ! iShutdownStarted ) |
|
664 |
{ |
|
665 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleKeyEventL: aKeyEvent.iCode:%d, aKeyEvent.iScanCode:%d, aType:%d, iIgnoreNextPowerKeyUpEvent:%d, iPowerKeyPopupMenuActive:%d, iLastPowerKeyWasShort:%d, iPowerKeyPopupMenuDismissed:%d"), |
|
666 |
aKeyEvent.iCode, aKeyEvent.iScanCode, aType, iIgnoreNextPowerKeyUpEvent, iPowerKeyPopupMenuActive, iLastPowerKeyWasShort, iPowerKeyPopupMenuDismissed ) ); |
|
667 |
||
668 |
#ifdef _DEBUG |
|
669 |
// camery latency measurement environment instrumentation, don't remove |
|
670 |
if ( aType == EEventKey && aKeyEvent.iCode == EKeyCamera ) |
|
671 |
{ |
|
672 |
TRACES( RDebug::Print( _L("e_KEY_EVENT_SENDING 0") ) ); |
|
673 |
} |
|
674 |
#endif // _DEBUG |
|
675 |
||
676 |
TBool haveStatusPane = ( StatusPane()== NULL ) ? EFalse : StatusPane()->IsVisible(); |
|
677 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleKeyEventL: haveStatusPane = %d" ) ) ); |
|
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
678 |
|
63 | 679 |
TKeyResponse response( EKeyWasNotConsumed ); |
680 |
if (iSysApKeyManagement && aKeyEvent.iCode != EKeyPowerOff && aKeyEvent.iCode != 'E') |
|
681 |
{ |
|
682 |
response = iSysApKeyManagement->HandleKeyEventL(aKeyEvent, aType ); |
|
683 |
} |
|
684 |
||
685 |
if( aType == EEventKey ) |
|
686 |
{ |
|
687 |
switch ( aKeyEvent.iCode ) |
|
688 |
{ |
|
689 |
#ifdef _DEBUG |
|
690 |
case 'E': //For testing |
|
691 |
Exit(); |
|
692 |
break; |
|
693 |
#endif |
|
694 |
case EKeyPowerOff: |
|
695 |
//Short power key press |
|
696 |
iKeyBoardRepeatCount++; |
|
697 |
if( aKeyEvent.iRepeats == 0 ) |
|
698 |
{ |
|
699 |
TRACES( RDebug::Print(_L("CSysApAppUi::HandleKeyEventL, Short powerkey") ) ); |
|
700 |
iLastPowerKeyWasShort = ETrue; |
|
701 |
if ( IsDefaultPowerKeyBehavior() ) |
|
702 |
{ |
|
703 |
//do this only if the power key menu is active (handles item navigation) |
|
704 |
//or if the power key is not the lock key (default) |
|
705 |
HandleShortPowerKeyPressedL(); |
|
706 |
} |
|
707 |
||
708 |
||
709 |
iIgnoreNextPowerKeyRepeats = EFalse; |
|
710 |
} |
|
711 |
//Long power key press |
|
712 |
else if( aKeyEvent.iRepeats > 0 && iKeyBoardRepeatCount >= iSysApCenRepController->GetInt( KCRUidCoreApplicationUIsSysAp, KSysApPowerkeyRepeatcount )) |
|
713 |
{ |
|
714 |
iKeyBoardRepeatCount = -1; |
|
715 |
TRACES( RDebug::Print(_L("CSysApAppUi::HandleKeyEventL, Long powerkey") ) ); |
|
716 |
iLastPowerKeyWasShort = EFalse; |
|
717 |
if (! IsDefaultPowerKeyBehavior() && !iIgnoreNextPowerKeyRepeats ) |
|
718 |
{ |
|
719 |
if ( !iGlobalListQuery ) |
|
720 |
{ |
|
721 |
HandleShortPowerKeyPressedL(); |
|
722 |
} |
|
723 |
} |
|
724 |
else |
|
725 |
{ |
|
726 |
HandleLongPowerKeyPressedL(); |
|
727 |
} |
|
728 |
||
729 |
} |
|
730 |
break; |
|
731 |
||
732 |
default: |
|
733 |
{ |
|
734 |
TKeyResponse response = EKeyWasNotConsumed; |
|
735 |
if (iSysApKeyManagement) |
|
736 |
{ |
|
737 |
response = iSysApKeyManagement->HandleKeyEventL(aKeyEvent, aType ); |
|
738 |
} |
|
739 |
||
740 |
if ( response == EKeyWasNotConsumed ) // none of the plugins consumed the key, offer it to default handling |
|
741 |
{ |
|
742 |
iSysApDefaultKeyHandler->HandleKeyEventL( aKeyEvent, aType ); |
|
743 |
} |
|
744 |
} |
|
745 |
break; |
|
746 |
} |
|
747 |
} |
|
748 |
else if ( aType == EEventKeyUp ) |
|
749 |
{ |
|
750 |
TRACES( RDebug::Print( _L( "CSysApAppUi::HandleKeyEventL(): aType == EEventKeyUp, PowerKeyIsLockKey = %d, iLastPowerKeyWasShort = %d, iPowerKeyPopupMenuActive = %d, iCharging = %d" ), iSysApFeatureManager->PowerKeyIsLockKey(), iLastPowerKeyWasShort, iPowerKeyPopupMenuActive, iCharging ) ); |
|
751 |
if ( !IsDefaultPowerKeyBehavior() && |
|
752 |
iLastPowerKeyWasShort && |
|
753 |
( aKeyEvent.iScanCode == EStdKeyDevice2 )) |
|
754 |
{ |
|
755 |
// if the power key is the lock key && the last keypress was |
|
756 |
// short && the power menu is not active && an alarm is not |
|
757 |
// currently being shown, then lock the phone |
|
758 |
TInt alarmState=0, securityQueryState=0; |
|
759 |
TInt errorCode = RProperty::Get( KPSUidCoreApplicationUIs, KCoreAppUIsDisableKeyguard, alarmState ); |
|
760 |
TInt errorCode2 = RProperty::Get( KPSUidStartup, KStartupSecurityCodeQueryStatus, securityQueryState); |
|
761 |
TRACES( RDebug::Print( _L( "CSysApAppUi::HandleKeyEventL(): Reading value of KCoreAppUIsDisableKeyguard - State Value: %d"),alarmState)); |
|
762 |
TRACES( RDebug::Print( _L( "CSysApAppUi::HandleKeyEventL(): Reading value of KStartupSecurityCodeQueryStatus - State Value: %d"),securityQueryState)); |
|
763 |
TInt callState( StateOfProperty( KPSUidCtsyCallInformation, KCTsyCallState ) ); |
|
764 |
//Disable keylock if Alarm is active or if a Security code query is active on the display |
|
765 |
if ( alarmState == ECoreAppUIsDisableKeyguard || securityQueryState == ESecurityQueryActive ) |
|
766 |
{ |
|
767 |
KeyLock().DisableWithoutNote(); |
|
768 |
} |
|
769 |
else |
|
770 |
{ |
|
771 |
if( callState != EPSCTsyCallStateConnected && !iDeviceLockEnabled) |
|
772 |
{ |
|
773 |
KeyLock().EnableWithoutNote(); |
|
774 |
} |
|
775 |
} |
|
776 |
} |
|
777 |
else |
|
778 |
{ |
|
779 |
if ( aKeyEvent.iScanCode == EStdKeyDevice2 ) |
|
780 |
{ |
|
781 |
if ( iIgnoreNextPowerKeyUpEvent ) |
|
782 |
{ |
|
783 |
if ( !iPowerKeyPopupMenuDismissed ) // If the popup menu has been dismissed, do nothing |
|
784 |
{ |
|
785 |
iPowerKeyPopupMenuActive = ETrue; |
|
786 |
iIgnoreNextPowerKeyUpEvent = EFalse; |
|
787 |
} |
|
788 |
} |
|
789 |
else if ( iLastPowerKeyWasShort ) |
|
790 |
{ |
|
791 |
if ( iPowerKeyPopupMenuActive ) |
|
792 |
{ |
|
793 |
if ( iGlobalListQuery ) |
|
794 |
{ |
|
795 |
if ( iSysApFeatureManager->NoPowerKeySupported() ) |
|
796 |
{ |
|
797 |
CancelGlobalListQuery(); |
|
798 |
} |
|
799 |
else |
|
800 |
{ |
|
801 |
iGlobalListQuery->MoveSelectionDown(); |
|
802 |
} |
|
803 |
} |
|
804 |
} |
|
805 |
} |
|
806 |
} |
|
807 |
} |
|
808 |
} |
|
809 |
||
810 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleKeyEventL:ended, aKeyEvent.iCode:%d, aKeyEvent.iScanCode:%d, aType:%d, iIgnoreNextPowerKeyUpEvent:%d, iPowerKeyPopupMenuActive:%d, iLastPowerKeyWasShort:%d, iPowerKeyPopupMenuDismissed:%d"), |
|
811 |
aKeyEvent.iCode, aKeyEvent.iScanCode, aType, iIgnoreNextPowerKeyUpEvent, iPowerKeyPopupMenuActive, iLastPowerKeyWasShort, iPowerKeyPopupMenuDismissed ) ); |
|
812 |
} |
|
813 |
else // shutdown started |
|
814 |
{ |
|
815 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleKeyEventL: aKeyEvent.iCode:%d, aKeyEvent.iScanCode:%d, aType:%d"), |
|
816 |
aKeyEvent.iCode, aKeyEvent.iScanCode, aType ) ); |
|
817 |
||
818 |
// When shutdown has been started, only device mode key events are passed to plug-in framework |
|
819 |
// This for enabling plug-in activities during shutdown animation |
|
820 |
if ( IsDeviceModeKey( aKeyEvent ) ) // Other key events are not passed, because they must cancel the shutdown animation as stated in UI spefication |
|
821 |
{ |
|
822 |
if ( aType == EEventKey && iSysApKeyManagement ) |
|
823 |
{ |
|
824 |
iSysApKeyManagement->HandleKeyEventL( aKeyEvent, aType ); |
|
825 |
} |
|
826 |
} |
|
827 |
#ifdef RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
828 |
else if ( aType == EEventKey && iSysApShutdownAnimation && !iShutdownContinued ) |
|
829 |
{ |
|
830 |
if ( aKeyEvent.iCode != EKeyPowerOff || iLastPowerKeyWasShort ) |
|
831 |
{ |
|
832 |
iSysApShutdownAnimation->Cancel(); |
|
833 |
NotifyShutdownAnimationSkip(); |
|
834 |
} |
|
835 |
} |
|
836 |
||
837 |
#endif // RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
838 |
||
839 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleKeyEventL: ended") ) ); |
|
840 |
} |
|
841 |
return EKeyWasConsumed; |
|
842 |
} |
|
843 |
||
844 |
// ---------------------------------------------------------------------------- |
|
845 |
// CSysApAppUi::HandleCommandL( TInt aCommand) |
|
846 |
// ---------------------------------------------------------------------------- |
|
847 |
||
848 |
void CSysApAppUi::HandleCommandL( TInt aCommand ) |
|
849 |
{ |
|
850 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleCommandL aCommend: %d"), aCommand ) ); |
|
851 |
switch ( aCommand ) |
|
852 |
{ |
|
853 |
case EEikCmdExit: // EAknCmdExit |
|
854 |
// Quick fix for Defect: UTUL-7ZQLJU |
|
855 |
Exit(); |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
856 |
break; |
63 | 857 |
default: |
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
858 |
break; |
63 | 859 |
} |
860 |
} |
|
861 |
||
862 |
// ---------------------------------------------------------------------------- |
|
863 |
// CSysApAppUi::HandleApplicationSpecificEventL(TInt aType,const TWsEvent& aEvent) |
|
864 |
// ---------------------------------------------------------------------------- |
|
865 |
||
866 |
void CSysApAppUi::HandleApplicationSpecificEventL(TInt aType,const TWsEvent& aEvent) |
|
867 |
{ |
|
868 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleApplicationSpecificEventL: aType:%d"), aType ) ); |
|
869 |
||
870 |
CAknAppUi::HandleApplicationSpecificEventL(aType, aEvent); |
|
871 |
||
872 |
if ( ResourcesFreed() ) |
|
873 |
{ |
|
874 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleApplicationSpecificEventL: discarded, shutting down") ) ); |
|
875 |
return; |
|
876 |
} |
|
877 |
||
878 |
switch( aType ) |
|
879 |
{ |
|
880 |
case EEikKeyLockEnabled: |
|
881 |
iKeyLockEnabled = ETrue; |
|
882 |
iSysApCenRepController->SetInt( KCRUidCoreApplicationUIsSysAp, KSysApKeyguardActive, 1 ); |
|
883 |
SetIndicatorStateL( EAknIndicatorKeyguard, EAknIndicatorStateOn ); |
|
884 |
iSysApLightsController->KeylockStateChangedL( ETrue ); |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
885 |
break; |
63 | 886 |
case EEikKeyLockDisabled: |
887 |
iKeyLockEnabled = EFalse; |
|
888 |
iSysApCenRepController->SetInt( KCRUidCoreApplicationUIsSysAp, KSysApKeyguardActive, 0 ); |
|
889 |
SetIndicatorStateL( EAknIndicatorKeyguard, EAknIndicatorStateOff ); |
|
890 |
if (! iDeviceLockEnabled ) |
|
891 |
{ |
|
892 |
iSysApLightsController->KeylockStateChangedL( EFalse ); |
|
893 |
if ( iSysApFeatureManager->MmcHotSwapSupported() ) |
|
894 |
{ |
|
895 |
if ( StateOfProperty( KPSUidCtsyCallInformation, KCTsyCallState ) != EPSCTsyCallStateRinging && StateOfProperty( KPSUidCtsyCallInformation, KCTsyCallState ) != EPSCTsyCallStateAlerting ) |
|
896 |
{ |
|
897 |
RunUnlockNotifierL(); |
|
898 |
} |
|
899 |
} |
|
900 |
} |
|
901 |
break; |
|
902 |
case EEikKeyLockPowerKeyPressed: //sent when power key is captured by keylockserver |
|
903 |
HandleShortPowerKeyPressedL(); |
|
904 |
break; |
|
905 |
||
906 |
case EEikKeyLockLightsOnRequest: |
|
907 |
iSysApLightsController->SetLightsOnUnlockNoteL(); |
|
908 |
break; |
|
909 |
||
910 |
case EEikEcsQueryLights: // emergency note is shown |
|
911 |
iSysApLightsController->SetLightsOnEcsQueryL(); |
|
912 |
break; |
|
913 |
||
914 |
case EEikSecurityQueryLights: // for device lock security query |
|
915 |
iSysApLightsController->SetLightsOnSecurityQueryL(); |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
916 |
break; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
917 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
918 |
default: |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
919 |
break; |
63 | 920 |
} |
921 |
} |
|
922 |
||
923 |
||
924 |
// ---------------------------------------------------------------------------- |
|
925 |
// CSysApAppUi::InitializeStatusPaneAreaL() |
|
926 |
// ---------------------------------------------------------------------------- |
|
927 |
||
928 |
void CSysApAppUi::InitializeStatusPaneAreaL() |
|
929 |
{ |
|
930 |
TRACES( RDebug::Print( _L("CSysApAppUi::InitializeStatusPaneAreaL(): START") ) ); |
|
931 |
TInt state( StateOfProperty( KPSUidHWRMPowerState, KHWRMBatteryLevel ) ); |
|
932 |
||
933 |
//Also Charging status will be updated with the following function. |
|
934 |
UpdateBatteryBarsL( state ); |
|
935 |
||
936 |
#ifdef SYSAP_USE_STARTUP_UI_PHASE |
|
937 |
if ( OfflineModeActive() ) |
|
938 |
{ |
|
939 |
UpdateSignalBarsL( KAknSignalOffLineMode ); |
|
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
940 |
} |
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
941 |
else |
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
942 |
{ |
63 | 943 |
UpdateSignalBarsL(); |
944 |
} |
|
945 |
#else |
|
946 |
UpdateSignalBarsL(); |
|
947 |
#endif // SYSAP_USE_STARTUP_UI_PHASE |
|
948 |
||
949 |
SetSignalIndicatorL(); |
|
950 |
SetIhfIndicatorL(); |
|
951 |
SetHacIndicatorL(); |
|
952 |
LogsObserverL().HandleUiReadyL(); |
|
953 |
||
954 |
if ( iSysApEtelConnector ) |
|
955 |
{ |
|
956 |
iSysApEtelConnector->ReadSimSmsStoreStatusInStartup(); |
|
957 |
} |
|
958 |
||
959 |
SetEnvelopeIndicatorL(); |
|
960 |
||
961 |
TRACES( RDebug::Print( _L("CSysApAppUi::InitializeStatusPaneAreaL(): accessories") ) ); |
|
962 |
||
963 |
TAccMode accessoryState(EAccModeHandPortable); |
|
964 |
if ( iSysApAccessoryObserver ) |
|
965 |
{ |
|
966 |
accessoryState = iSysApAccessoryObserver->GetAccessoryMode(); |
|
967 |
} |
|
968 |
||
969 |
if( accessoryState == EAccModeWiredHeadset || |
|
970 |
accessoryState == EAccModeWirelessHeadset || |
|
971 |
accessoryState == EAccModeHeadphones ) |
|
972 |
{ |
|
973 |
SetIndicatorStateL( EAknIndicatorLoopset, EAknIndicatorStateOff ); |
|
974 |
SetIndicatorStateL( EAknIndicatorTTY, EAknIndicatorStateOff ); |
|
975 |
SetIndicatorStateL( EAknIndicatorHeadset, EAknIndicatorStateOn ); |
|
976 |
SetIndicatorStateL( EAknIndicatorHeadsetUnavailable, EAknIndicatorStateOff ); |
|
977 |
SetIndicatorStateL( EAknIndicatorCarkit, EAknIndicatorStateOff ); |
|
978 |
SetIndicatorStateL( EAknIndicatorTvOut, EAknIndicatorStateOff ); |
|
979 |
SetIndicatorStateL( EAknIndicatorHDMI, EAknIndicatorStateOff ); |
|
980 |
} |
|
981 |
else if( accessoryState == EAccModeLoopset ) |
|
982 |
{ |
|
983 |
SetIndicatorStateL( EAknIndicatorHeadset, EAknIndicatorStateOff ); |
|
984 |
SetIndicatorStateL( EAknIndicatorTTY, EAknIndicatorStateOff ); |
|
985 |
SetIndicatorStateL( EAknIndicatorLoopset, EAknIndicatorStateOn ); |
|
986 |
SetIndicatorStateL( EAknIndicatorHeadsetUnavailable, EAknIndicatorStateOff ); |
|
987 |
SetIndicatorStateL( EAknIndicatorCarkit, EAknIndicatorStateOff ); |
|
988 |
SetIndicatorStateL( EAknIndicatorTvOut, EAknIndicatorStateOff ); |
|
989 |
SetIndicatorStateL( EAknIndicatorHDMI, EAknIndicatorStateOff ); |
|
990 |
} |
|
991 |
else if( accessoryState == EAccModeTextDevice ) |
|
992 |
{ |
|
993 |
SetIndicatorStateL( EAknIndicatorHeadset, EAknIndicatorStateOff ); |
|
994 |
SetIndicatorStateL( EAknIndicatorLoopset, EAknIndicatorStateOff ); |
|
995 |
SetIndicatorStateL( EAknIndicatorTTY, EAknIndicatorStateOn ); |
|
996 |
SetIndicatorStateL( EAknIndicatorHeadsetUnavailable, EAknIndicatorStateOff ); |
|
997 |
SetIndicatorStateL( EAknIndicatorCarkit, EAknIndicatorStateOff ); |
|
998 |
SetIndicatorStateL( EAknIndicatorTvOut, EAknIndicatorStateOff ); |
|
999 |
SetIndicatorStateL( EAknIndicatorHDMI, EAknIndicatorStateOff ); |
|
1000 |
} |
|
1001 |
else if( accessoryState == EAccModeWiredCarKit || accessoryState == EAccModeWirelessCarKit ) |
|
1002 |
{ |
|
1003 |
SetIndicatorStateL( EAknIndicatorHeadset, EAknIndicatorStateOff ); |
|
1004 |
SetIndicatorStateL( EAknIndicatorLoopset, EAknIndicatorStateOff ); |
|
1005 |
SetIndicatorStateL( EAknIndicatorTTY, EAknIndicatorStateOff ); |
|
1006 |
SetIndicatorStateL( EAknIndicatorHeadsetUnavailable, EAknIndicatorStateOff ); |
|
1007 |
SetIndicatorStateL( EAknIndicatorCarkit, EAknIndicatorStateOn ); |
|
1008 |
SetIndicatorStateL( EAknIndicatorTvOut, EAknIndicatorStateOff ); |
|
1009 |
SetIndicatorStateL( EAknIndicatorHDMI, EAknIndicatorStateOff ); |
|
1010 |
} |
|
1011 |
else if( accessoryState == EAccModeTVOut ) |
|
1012 |
{ |
|
1013 |
SetIndicatorStateL( EAknIndicatorHeadset, EAknIndicatorStateOff ); |
|
1014 |
SetIndicatorStateL( EAknIndicatorLoopset, EAknIndicatorStateOff ); |
|
1015 |
SetIndicatorStateL( EAknIndicatorTTY, EAknIndicatorStateOff ); |
|
1016 |
SetIndicatorStateL( EAknIndicatorHeadsetUnavailable, EAknIndicatorStateOff ); |
|
1017 |
SetIndicatorStateL( EAknIndicatorCarkit, EAknIndicatorStateOff ); |
|
1018 |
SetIndicatorStateL( EAknIndicatorTvOut, EAknIndicatorStateOn ); |
|
1019 |
SetIndicatorStateL( EAknIndicatorHDMI, EAknIndicatorStateOff ); |
|
1020 |
} |
|
1021 |
else if (accessoryState == EAccModeHDMI ) |
|
1022 |
{ |
|
1023 |
SetIndicatorStateL( EAknIndicatorHeadset, EAknIndicatorStateOff ); |
|
1024 |
SetIndicatorStateL( EAknIndicatorLoopset, EAknIndicatorStateOff ); |
|
1025 |
SetIndicatorStateL( EAknIndicatorTTY, EAknIndicatorStateOff ); |
|
1026 |
SetIndicatorStateL( EAknIndicatorHeadsetUnavailable, EAknIndicatorStateOff ); |
|
1027 |
SetIndicatorStateL( EAknIndicatorCarkit, EAknIndicatorStateOff ); |
|
1028 |
SetIndicatorStateL( EAknIndicatorTvOut, EAknIndicatorStateOff); |
|
1029 |
SetIndicatorStateL( EAknIndicatorHDMI, EAknIndicatorStateOn ); |
|
1030 |
} |
|
1031 |
else // all indicators off |
|
1032 |
{ |
|
1033 |
SetIndicatorStateL( EAknIndicatorHeadset, EAknIndicatorStateOff ); |
|
1034 |
SetIndicatorStateL( EAknIndicatorLoopset, EAknIndicatorStateOff ); |
|
1035 |
SetIndicatorStateL( EAknIndicatorTTY, EAknIndicatorStateOff ); |
|
1036 |
SetIndicatorStateL( EAknIndicatorHeadsetUnavailable, EAknIndicatorStateOff ); |
|
1037 |
SetIndicatorStateL( EAknIndicatorCarkit, EAknIndicatorStateOff ); |
|
1038 |
SetIndicatorStateL( EAknIndicatorTvOut, EAknIndicatorStateOff ); |
|
1039 |
SetIndicatorStateL( EAknIndicatorHDMI, EAknIndicatorStateOff ); |
|
1040 |
} |
|
1041 |
||
1042 |
TRACES( RDebug::Print( _L("CSysApAppUi::InitializeStatusPaneAreaL(): msg") ) ); |
|
1043 |
state = StateOfProperty( KUidSystemCategory, KUidOutboxStatusValue ); |
|
1044 |
if( state == ESADocumentsInOutbox ) |
|
1045 |
{ |
|
1046 |
SetIndicatorStateL( EAknIndicatorOutbox, EAknIndicatorStateOn ); |
|
1047 |
} |
|
1048 |
else |
|
1049 |
{ |
|
1050 |
SetIndicatorStateL( EAknIndicatorOutbox, EAknIndicatorStateOff ); |
|
1051 |
} |
|
1052 |
||
1053 |
state = StateOfProperty( KAlarmServerPubSubCategory, KWakeupAlarmPubSubKey ); |
|
1054 |
||
1055 |
if( state == EActiveWakeupAlarmSet ) |
|
1056 |
{ |
|
1057 |
TRACES( RDebug::Print(_L("CSysApAppUi::InitializeStatusPaneAreaL called the SetIndicatorStateL with EActiveWakeupAlarmSet "))); |
|
1058 |
SetIndicatorStateL( EAknIndicatorAlarmClock, EAknIndicatorStateOn ); |
|
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
1059 |
} |
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
1060 |
else |
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
1061 |
{ |
63 | 1062 |
TRACES( RDebug::Print(_L("CSysApAppUi::InitializeStatusPaneAreaL called the SetIndicatorStateL with EActiveNoWakeupAlarmsSet "))); |
1063 |
SetIndicatorStateL( EAknIndicatorAlarmClock, EAknIndicatorStateOff ); |
|
1064 |
} |
|
1065 |
||
1066 |
state = StateOfProperty( KIrdaPropertyCategory, KIrdaStatus ); |
|
1067 |
if( state == TIrdaStatusCodes::EIrLoaded || state == TIrdaStatusCodes::EIrDisconnected || state == TIrdaStatusCodes::EIrBlocked ) |
|
1068 |
{ |
|
1069 |
SetIndicatorStateL( EAknIndicatorIrActive, EAknIndicatorStateAnimate ); |
|
1070 |
} |
|
1071 |
else if( state == TIrdaStatusCodes::EIrConnected ) |
|
1072 |
{ |
|
1073 |
SetIndicatorStateL( EAknIndicatorIrActive, EAknIndicatorStateOn ); |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1074 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1075 |
else |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1076 |
{ |
63 | 1077 |
SetIndicatorStateL( EAknIndicatorIrActive, EAknIndicatorStateOff ); |
1078 |
} |
|
1079 |
||
1080 |
iSysApCenRepCallForwardingObserver->UpdateCallForwardingIndicatorsL(); |
|
1081 |
||
1082 |
iSysApCenRepMsgWaitingObserver->UpdateMessageWaitingIndicatorsL(); |
|
1083 |
||
1084 |
state = StateOfProperty( KPSUidNetworkInfo, KNWHomeZoneStatus ); |
|
1085 |
if( state == ENWNone || state == ENWCityZone ) |
|
1086 |
{ |
|
1087 |
SetIndicatorStateL( EAknIndicatorHomeZone, EAknIndicatorStateOff ); |
|
1088 |
} |
|
1089 |
else if( state == ENWHomeZone ) |
|
1090 |
{ |
|
1091 |
SetIndicatorStateL( EAknIndicatorHomeZone, EAknIndicatorStateOn ); |
|
1092 |
} |
|
1093 |
||
1094 |
// Initialize WLan state |
|
1095 |
state = StateOfProperty( KPSUidWlan, KPSWlanIndicator ); |
|
1096 |
HandleWlanIndicatorL(state); |
|
1097 |
||
1098 |
// Initialize Tarm state |
|
1099 |
state = StateOfProperty( KPSUidCoreApplicationUIs, KCoreAppUIsTarmIndicator ); |
|
1100 |
HandleTarmIndicatorL(state); |
|
1101 |
||
1102 |
TRACES( RDebug::Print( _L("CSysApAppUi::InitializeStatusPaneAreaL(): END") ) ); |
|
1103 |
} |
|
1104 |
||
1105 |
// ---------------------------------------------------------------------------- |
|
1106 |
// CSysApAppUi::HandleWlanIndicator() |
|
1107 |
// ---------------------------------------------------------------------------- |
|
1108 |
void CSysApAppUi::HandleWlanIndicatorL( TInt aValue ) |
|
1109 |
{ |
|
1110 |
if ( aValue == EPSWlanIndicatorAvailable ) |
|
1111 |
{ |
|
1112 |
SetIndicatorStateL( EAknIndicatorWlanActive, EAknIndicatorStateOff ); |
|
1113 |
SetIndicatorStateL( EAknIndicatorWlanActiveSecure, EAknIndicatorStateOff ); |
|
1114 |
SetIndicatorStateL( EAknIndicatorWlanAvailable, EAknIndicatorStateOn ); |
|
1115 |
} |
|
1116 |
else if ( aValue == EPSWlanIndicatorActive ) |
|
1117 |
{ |
|
1118 |
SetIndicatorStateL( EAknIndicatorWlanAvailable, EAknIndicatorStateOff ); |
|
1119 |
SetIndicatorStateL( EAknIndicatorWlanActiveSecure, EAknIndicatorStateOff ); |
|
1120 |
SetIndicatorStateL( EAknIndicatorWlanActive, EAknIndicatorStateOn ); |
|
1121 |
} |
|
1122 |
else if ( aValue == EPSWlanIndicatorActiveSecure ) |
|
1123 |
{ |
|
1124 |
SetIndicatorStateL( EAknIndicatorWlanAvailable, EAknIndicatorStateOff ); |
|
1125 |
SetIndicatorStateL( EAknIndicatorWlanActive, EAknIndicatorStateOff ); |
|
1126 |
SetIndicatorStateL( EAknIndicatorWlanActiveSecure, EAknIndicatorStateOn ); |
|
1127 |
} |
|
1128 |
else // No indication required |
|
1129 |
{ |
|
1130 |
SetIndicatorStateL( EAknIndicatorWlanAvailable, EAknIndicatorStateOff ); |
|
1131 |
SetIndicatorStateL( EAknIndicatorWlanActive, EAknIndicatorStateOff ); |
|
1132 |
SetIndicatorStateL( EAknIndicatorWlanActiveSecure, EAknIndicatorStateOff ); |
|
1133 |
} |
|
1134 |
} |
|
1135 |
||
1136 |
// ---------------------------------------------------------------------------- |
|
1137 |
// CSysApAppUi::HandleTarmIndicatorL() |
|
1138 |
// ---------------------------------------------------------------------------- |
|
1139 |
||
1140 |
void CSysApAppUi::HandleTarmIndicatorL( TInt aValue ) |
|
1141 |
{ |
|
1142 |
if ( aValue == ECoreAppUIsTarmTerminalSecurityOnIndicatorOn ) |
|
1143 |
{ |
|
1144 |
SetIndicatorStateL( EAknIndicatorTARM, EAknIndicatorStateOff ); |
|
1145 |
SetIndicatorStateL( EAknIndicatorTARMModuleOn, EAknIndicatorStateOn ); |
|
1146 |
} |
|
1147 |
else if ( aValue == ECoreAppUIsTarmMngActiveIndicatorOn ) |
|
1148 |
{ |
|
1149 |
SetIndicatorStateL( EAknIndicatorTARMModuleOn, EAknIndicatorStateOff ); |
|
1150 |
SetIndicatorStateL( EAknIndicatorTARM, EAknIndicatorStateOn ); |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1151 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1152 |
else |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1153 |
{ |
63 | 1154 |
SetIndicatorStateL( EAknIndicatorTARM, EAknIndicatorStateOff ); |
1155 |
SetIndicatorStateL( EAknIndicatorTARMModuleOn, EAknIndicatorStateOff ); |
|
1156 |
} |
|
1157 |
} |
|
1158 |
||
1159 |
// ---------------------------------------------------------------------------- |
|
1160 |
// CSysApAppUi::HandleShortPowerKeyPressedL() |
|
1161 |
// ---------------------------------------------------------------------------- |
|
1162 |
||
1163 |
void CSysApAppUi::HandleShortPowerKeyPressedL() |
|
1164 |
{ |
|
1165 |
TInt callState( StateOfProperty( KPSUidCtsyCallInformation, KCTsyCallState ) ); |
|
1166 |
||
1167 |
TRACES ( |
|
1168 |
RDebug::Print( |
|
1169 |
_L("CSysApAppUi::HandleShortPowerKeyPressedL() callState:%d, iDeviceLockEnabled:%d" ), |
|
1170 |
callState, |
|
1171 |
iDeviceLockEnabled ); |
|
1172 |
); |
|
1173 |
iSysApLightsController->PowerKeyPressedL(); |
|
1174 |
||
1175 |
RProperty::Set( KPSUidCoreApplicationUIs, KCoreAppUIsHideAlarm, ECoreAppUIsHideAlarm ); |
|
1176 |
||
1177 |
||
1178 |
if( UiReady() && !iDeviceLockEnabled ) |
|
1179 |
{ |
|
1180 |
if ( iPowerKeyPopupMenuActive ) |
|
1181 |
{ |
|
1182 |
//Do nothing here. EEventKeyUp moves selection in the list! |
|
1183 |
} |
|
1184 |
else if ( !iKeyLockEnabled |
|
1185 |
&& callState != EPSCTsyCallStateAlerting |
|
1186 |
&& callState != EPSCTsyCallStateRinging |
|
1187 |
&& callState != EPSCTsyCallStateDialling ) |
|
1188 |
//Show power key menu |
|
1189 |
{ |
|
1190 |
ShowPowerKeyPopUpMenuL(); |
|
1191 |
} |
|
1192 |
} |
|
1193 |
else |
|
1194 |
{ |
|
1195 |
TInt swState( StateOfProperty( KPSUidStartup, KPSGlobalSystemState ) ); |
|
1196 |
||
1197 |
if( swState == ESwStateAlarm ) |
|
1198 |
//From Alarm state even a short press causes shutdown but charger state need to be checked |
|
1199 |
{ |
|
1200 |
TInt chargerState( StateOfProperty( KPSUidHWRMPowerState, KHWRMChargingStatus ) ); |
|
1201 |
if( chargerState == EChargingStatusNotConnected ) |
|
1202 |
//shutdown |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1203 |
{ |
63 | 1204 |
StartShutDownTimerOnAlarmAndChargingStates(); |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1205 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1206 |
else |
63 | 1207 |
//to charging state |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1208 |
{ |
63 | 1209 |
SetStarterState( RStarterSession::ECharging ); |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1210 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1211 |
} |
63 | 1212 |
} |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1213 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1214 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1215 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1216 |
// CSysApAppUi::HandleLongPowerKeyPressedL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1217 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1218 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1219 |
void CSysApAppUi::HandleLongPowerKeyPressedL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1220 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1221 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleLongPowerKeyPressedL()") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1222 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1223 |
TInt swState; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1224 |
RProperty::Get( KPSUidStartup, KPSGlobalSystemState, swState ); |
63 | 1225 |
|
1226 |
iSysApLightsController->PowerKeyPressedL(); |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1227 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1228 |
if( swState == ESwStateStartingCriticalApps || |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1229 |
swState == ESwStateSelfTestOK || |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1230 |
swState == ESwStateSecurityCheck || |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1231 |
swState == ESwStateCriticalPhaseOK || |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1232 |
swState == ESwStateEmergencyCallsOnly || |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1233 |
swState == ESwStateNormalRfOn || |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1234 |
swState == ESwStateNormalRfOff || |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1235 |
swState == ESwStateNormalBTSap || |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1236 |
swState == ESwStateFatalStartupError ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1237 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1238 |
if( !iDeviceLockEnabled ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1239 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1240 |
if( iPowerKeyPopupMenuActive ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1241 |
{ |
63 | 1242 |
if ( iGlobalListQuery ) |
1243 |
{ |
|
1244 |
iGlobalListQuery->SelectItem(); |
|
1245 |
} |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1246 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1247 |
else if( !iIgnoreNextPowerKeyRepeats ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1248 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1249 |
if( !iKeyLockEnabled && !IsEncryptionOperationOngoingL() ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1250 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1251 |
DoShutdownL( EFalse, KDummyReason ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1252 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1253 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1254 |
iIgnoreNextPowerKeyRepeats = ETrue; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1255 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1256 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1257 |
else if( swState == ESwStateAlarm ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1258 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1259 |
//Just comment here to highlight that this is not possible since |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1260 |
//from alarm state already a short press always shuts the device down. |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1261 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1262 |
else if( swState == ESwStateCharging ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1263 |
//Startup to Normal state |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1264 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1265 |
if( !iIgnoreNextPowerKeyRepeats ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1266 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1267 |
iIgnoreNextPowerKeyRepeats = ETrue; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1268 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1269 |
SetStarterState( RStarterSession::ENormal ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1270 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1271 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1272 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1273 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1274 |
// ---------------------------------------------------------------------------- |
63 | 1275 |
// CSysApAppUi::FreeResources() |
1276 |
// ---------------------------------------------------------------------------- |
|
1277 |
||
1278 |
void CSysApAppUi::FreeResources() |
|
1279 |
{ |
|
1280 |
TRACES( RDebug::Print( _L("CSysApAppUi::FreeResources") ) ); |
|
1281 |
||
1282 |
delete iSysApBatteryInfoController; |
|
1283 |
delete iSysApPsmController; |
|
1284 |
||
1285 |
delete iSysApAudioRoutingObserver; |
|
1286 |
||
1287 |
delete iProfileNamesArray; |
|
1288 |
iProfileNamesArray = NULL; |
|
1289 |
||
1290 |
if ( iTimer ) |
|
1291 |
{ |
|
1292 |
iTimer->Cancel(); |
|
1293 |
delete iTimer; |
|
1294 |
} |
|
1295 |
||
1296 |
if ( iSapTimer ) |
|
1297 |
{ |
|
1298 |
iSapTimer->Cancel(); |
|
1299 |
delete iSapTimer; |
|
1300 |
} |
|
1301 |
||
1302 |
if ( iSysApTimer ) |
|
1303 |
{ |
|
1304 |
iSysApTimer->Cancel(); |
|
1305 |
delete iSysApTimer; |
|
1306 |
} |
|
1307 |
||
1308 |
delete iGlobalListQuery; |
|
1309 |
||
1310 |
RWindowGroup groupWin = iCoeEnv->RootWin(); |
|
1311 |
groupWin.CancelCaptureKey( iCapturedEKeyPowerOff ); |
|
1312 |
groupWin.CancelCaptureKeyUpAndDowns( iCapturedEKeyPowerOffUpAndDowns ); |
|
1313 |
||
1314 |
delete iSysApDefaultKeyHandler; |
|
1315 |
||
1316 |
if ( iProfileEngine ) |
|
1317 |
{ |
|
1318 |
iProfileEngine->Release(); |
|
1319 |
} |
|
1320 |
||
1321 |
delete iSysApSsSettingsObserver; |
|
1322 |
delete iSysApEtelConnector; |
|
1323 |
||
1324 |
delete iSysApProfileObserver; |
|
1325 |
delete iSysApNspsHandler; |
|
1326 |
delete iSysApKeySndHandler; |
|
1327 |
delete iSysApCenRepMsgWaitingObserver; |
|
1328 |
delete iSysApCenRepCallForwardingObserver; |
|
1329 |
delete iSysApConnectionMonitorObserver; |
|
1330 |
delete iSysApCenRepLightSettingsObserver; |
|
1331 |
delete iSysApCenRepLogsObserver; |
|
1332 |
delete iSysApCenRepBtObserver; |
|
1333 |
delete iSysApCenRepFmTxObserver; |
|
1334 |
delete iSysApCenRepHacSettingObserver; |
|
1335 |
delete iSysApCenRepController; |
|
1336 |
||
1337 |
delete iSysApPubSubObserver; |
|
1338 |
||
1339 |
delete iSysApMMCObserver; |
|
1340 |
delete iSysApMsgSimMemLowQuery; |
|
1341 |
delete iSysApWaitNote; |
|
1342 |
delete iSysApConfirmationQuery; |
|
1343 |
delete iSysApConfirmationQueryForRestart; |
|
1344 |
delete iSysApOfflineModeController; |
|
1345 |
delete iSysApUsbIndicatorController; |
|
1346 |
delete iSysApBtController; |
|
1347 |
delete iSysApBtSapController; |
|
1348 |
delete iSignalNotify; |
|
1349 |
delete iBatteryNotify; |
|
1350 |
delete iSysApSystemLock; |
|
1351 |
delete iSysApLocationPrivacyIndicator; |
|
1352 |
delete iSysApAccessoryObserver; |
|
1353 |
delete iSysApMediatorObserver; |
|
1354 |
||
1355 |
delete iSysApKeyManagement; |
|
1356 |
iSysApKeyManagement = NULL; |
|
1357 |
delete iSysApLightsController; |
|
1358 |
iKeyLock.Close(); |
|
1359 |
delete iSysApFeatureManager; |
|
1360 |
||
1361 |
// Cleanup ECom, used by key management and light control |
|
1362 |
REComSession::FinalClose(); |
|
1363 |
||
1364 |
iResourcesFreed = ETrue; |
|
1365 |
TRACES( RDebug::Print( _L("CSysApAppUi::FreeResources:END") ) ); |
|
1366 |
} |
|
1367 |
||
1368 |
// ---------------------------------------------------------------------------- |
|
1369 |
// CSysApAppUi::ShowUiNoteL( const TSysApNoteIds aNote ) const |
|
1370 |
// ---------------------------------------------------------------------------- |
|
1371 |
||
1372 |
void CSysApAppUi::ShowUiNoteL( const TSysApNoteIds aNote ) const |
|
1373 |
{ |
|
1374 |
TRACES( RDebug::Print( _L("CSysApAppUi::ShowUiNoteL aNote: %d"), aNote ) ); |
|
1375 |
TInt tone( EAvkonSIDNoSound ); |
|
1376 |
TAknGlobalNoteType noteType( EAknGlobalBatteryLowNote ); |
|
1377 |
CAknGlobalNote* note = CAknGlobalNote::NewLC(); |
|
1378 |
TInt secondaryDisplayId(SecondaryDisplay::ECmdNoNote); |
|
1379 |
||
1380 |
switch ( aNote ) |
|
1381 |
{ |
|
1382 |
case EBatteryLowNote: |
|
1383 |
noteType = EAknGlobalBatteryLowNote; |
|
1384 |
tone = EAvkonSIDBatteryLowTone; |
|
1385 |
break; |
|
1386 |
case EBatteryFullNote: |
|
1387 |
noteType = EAknGlobalBatteryFullNote; |
|
1388 |
tone = EAvkonSIDInformationTone; |
|
1389 |
break; |
|
1390 |
case ERechargeBatteryNote: |
|
1391 |
iSysApLightsController->BatteryEmptyL( ETrue ); |
|
1392 |
noteType = EAknGlobalRechargeBatteryNote; |
|
1393 |
tone = EAvkonSIDRechargeBatteryTone; |
|
1394 |
break; |
|
1395 |
case ENotChargingNote: |
|
1396 |
noteType = EAknGlobalNotChargingNote; |
|
1397 |
tone = EAvkonSIDWrongCharger; |
|
1398 |
break; |
|
1399 |
case EInsertSimNote: |
|
1400 |
noteType = EAknGlobalInformationNote; |
|
1401 |
tone = EAvkonSIDInformationTone; |
|
1402 |
secondaryDisplayId = SecondaryDisplay::ECmdShowInsertSimNote; |
|
1403 |
break; |
|
1404 |
case EMemoryCardRemovedWithoutEjectNote: |
|
1405 |
noteType = EAknGlobalInformationNote; |
|
1406 |
tone = EAvkonSIDInformationTone; |
|
1407 |
secondaryDisplayId = SecondaryDisplay::ECmdShowMemoryCardRemovedWithoutEjectNote; |
|
1408 |
break; |
|
1409 |
case EGprsSuspendedNote: |
|
1410 |
noteType = EAknGlobalInformationNote; |
|
1411 |
tone = EAvkonSIDInformationTone; |
|
1412 |
secondaryDisplayId = SecondaryDisplay::ECmdShowGprsSuspendedNote; |
|
1413 |
break; |
|
1414 |
case EGprsResumedNote: |
|
1415 |
noteType = EAknGlobalInformationNote; |
|
1416 |
tone = EAvkonSIDInformationTone; |
|
1417 |
secondaryDisplayId = SecondaryDisplay::ECmdShowGprsResumedNote; |
|
1418 |
break; |
|
1419 |
case EShutdownNote: |
|
1420 |
noteType = EAknGlobalInformationNote; |
|
1421 |
tone = EAvkonSIDInformationTone; |
|
1422 |
secondaryDisplayId = SecondaryDisplay::ECmdShowShutdownNote; |
|
1423 |
break; |
|
1424 |
case ECannotActivateOfflineModeNote: |
|
1425 |
noteType = EAknGlobalErrorNote; |
|
1426 |
tone = EAvkonSIDErrorTone; |
|
1427 |
secondaryDisplayId = SecondaryDisplay::ECmdShowCannotActivateOfflineModeNote; |
|
1428 |
break; |
|
1429 |
case ECannotDeactivateOfflineModeNote: |
|
1430 |
noteType = EAknGlobalErrorNote; |
|
1431 |
tone = EAvkonSIDErrorTone; |
|
1432 |
secondaryDisplayId = SecondaryDisplay::ECmdShowCannotDeactivateOfflineModeNote; |
|
1433 |
break; |
|
1434 |
case EKeypadActiveNote: |
|
1435 |
noteType = EAknGlobalInformationNote; |
|
1436 |
tone = EAvkonSIDInformationTone; |
|
1437 |
secondaryDisplayId = SecondaryDisplay::ECmdShowKeypadActiveNote; |
|
1438 |
break; |
|
1439 |
case EFmTxAccessoryStandbyNote: |
|
1440 |
noteType = EAknGlobalInformationNote; |
|
1441 |
tone = EAvkonSIDInformationTone; |
|
1442 |
secondaryDisplayId = SecondaryDisplay::ECmdShowFmTxStandbyInAccessoryConnectionNote; |
|
1443 |
break; |
|
1444 |
case EFmTxAccessoryForbidsNote: |
|
1445 |
noteType = EAknGlobalInformationNote; |
|
1446 |
tone = EAvkonSIDInformationTone; |
|
1447 |
secondaryDisplayId = SecondaryDisplay::ECmdShowFmTxCannotEnableWhileAccessoryConnectedNote; |
|
1448 |
break; |
|
1449 |
case EFmTxVolumeDisabledNote: |
|
1450 |
noteType = EAknGlobalInformationNote; |
|
1451 |
tone = EAvkonSIDInformationTone; |
|
1452 |
secondaryDisplayId = SecondaryDisplay::ECmdShowFmTxVolumeDisabledNote; |
|
1453 |
break; |
|
1454 |
case EFmTxOnNote: |
|
1455 |
noteType = EAknGlobalInformationNote; |
|
1456 |
tone = EAvkonSIDInformationTone; |
|
1457 |
secondaryDisplayId = SecondaryDisplay::ECmdShowFmTxTuneRadioToFrequencyNote; |
|
1458 |
break; |
|
1459 |
case EFmTxOffNote: |
|
1460 |
noteType = EAknGlobalInformationNote; |
|
1461 |
tone = EAvkonSIDInformationTone; |
|
1462 |
secondaryDisplayId = SecondaryDisplay::ECmdShowFmTxDisabledNote; |
|
1463 |
break; |
|
1464 |
case EBatteryFullUnplugChargerNote: |
|
1465 |
noteType = EAknGlobalBatteryFullUnplugNote; |
|
1466 |
tone = EAvkonSIDInformationTone; |
|
1467 |
break; |
|
1468 |
case EUnplugChargerNote: |
|
1469 |
noteType = EAknGlobalUnplugChargerNote; |
|
1470 |
tone = EAvkonSIDInformationTone; |
|
1471 |
break; |
|
1472 |
case EPowerSaveModeActivated: |
|
1473 |
noteType = EAknGlobalConfirmationNote; |
|
1474 |
tone = EAvkonSIDConfirmationTone; |
|
1475 |
secondaryDisplayId = SecondaryDisplay::ECmdShowPowerSavingActivatedNote; |
|
1476 |
break; |
|
1477 |
case EPowerSaveModeDeactivated: |
|
1478 |
noteType = EAknGlobalConfirmationNote; |
|
1479 |
tone = EAvkonSIDConfirmationTone; |
|
1480 |
secondaryDisplayId = SecondaryDisplay::ECmdShowPowerSavingDeactivatedNote; |
|
1481 |
break; |
|
1482 |
case ECannotActivatePowerSaveMode: |
|
1483 |
noteType = EAknGlobalWarningNote; |
|
1484 |
tone = EAvkonSIDWarningTone; |
|
1485 |
secondaryDisplayId = SecondaryDisplay::ECmdShowCannotActivatePowerSavingNote; |
|
1486 |
break; |
|
1487 |
case ECannotDeactivatePowerSaveMode: |
|
1488 |
noteType = EAknGlobalWarningNote; |
|
1489 |
tone = EAvkonSIDWarningTone; |
|
1490 |
secondaryDisplayId = SecondaryDisplay::ECmdShowCannotDeactivatePowerSavingNote; |
|
1491 |
break; |
|
1492 |
default: |
|
1493 |
break; |
|
1494 |
||
1495 |
} |
|
1496 |
||
1497 |
TInt swState( StateOfProperty( KPSUidStartup, KPSGlobalSystemState ) ); |
|
1498 |
||
1499 |
if( UiReady() || swState == ESwStateSecurityCheck) |
|
1500 |
{ |
|
1501 |
HBufC* noteStringBuf = NULL; |
|
1502 |
||
1503 |
switch ( aNote ) |
|
1504 |
{ |
|
1505 |
case EInsertSimNote: |
|
1506 |
noteStringBuf = StringLoader::LoadLC( R_QTN_SU_NOTE_INSERT_SIM, iEikonEnv ); |
|
1507 |
break; |
|
1508 |
case EMemoryCardRemovedWithoutEjectNote: |
|
1509 |
noteStringBuf = StringLoader::LoadLC( R_QTN_MEMS_EJECT_ERROR, iEikonEnv ); |
|
1510 |
note->SetSoftkeys( R_AVKON_SOFTKEYS_OK_EMPTY ); |
|
1511 |
break; |
|
1512 |
case EGprsSuspendedNote: |
|
1513 |
noteStringBuf = StringLoader::LoadLC( R_QTN_GPRS_CONF_GPRS_SUSPENDED, iEikonEnv ); |
|
1514 |
break; |
|
1515 |
case EGprsResumedNote: |
|
1516 |
noteStringBuf = StringLoader::LoadLC( R_QTN_GPRS_CONF_GPRS_RESUMED, iEikonEnv ); |
|
1517 |
break; |
|
1518 |
case EShutdownNote: |
|
1519 |
noteStringBuf = StringLoader::LoadLC( R_QTN_PWRC_INFO_GOODBYE, iEikonEnv); |
|
1520 |
break; |
|
1521 |
case ECannotActivateOfflineModeNote: |
|
1522 |
noteStringBuf = StringLoader::LoadLC( R_QTN_ERR_OFFLINE_UNABLE, iEikonEnv ); |
|
1523 |
break; |
|
1524 |
case ECannotDeactivateOfflineModeNote: |
|
1525 |
noteStringBuf = StringLoader::LoadLC( R_QTN_ERR_OFFLINE_UNABLE_PROFILE, iEikonEnv ); |
|
1526 |
break; |
|
1527 |
case EKeypadActiveNote: |
|
1528 |
if ( iSysApFeatureManager->PenEnabled() ) |
|
1529 |
{ |
|
1530 |
noteStringBuf = StringLoader::LoadLC( R_QTN_KEYG_CONF_DISPLAY_KEYS_ACTIVE, |
|
1531 |
iEikonEnv ); |
|
1532 |
} |
|
1533 |
else |
|
1534 |
{ |
|
1535 |
noteStringBuf = StringLoader::LoadLC( R_QTN_KEYG_CONF_KEYPAD_ACTIVE, |
|
1536 |
iEikonEnv ); |
|
1537 |
} |
|
1538 |
note->SetAnimation( R_QGN_NOTE_KEYGUARD_OPEN_ANIM ); |
|
1539 |
break; |
|
1540 |
case EFmTxOnNote: |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1541 |
{ |
63 | 1542 |
const TInt KFrequencyMaxLength(7); |
1543 |
// read frequency |
|
1544 |
TInt frequencykHz = iSysApCenRepFmTxObserver->Frequency(); |
|
1545 |
TReal frequencyMHz = static_cast<TReal>( frequencykHz ) / KCoefficientKhzToMhz; // kHz to Mhz |
|
1546 |
TBuf<KFrequencyMaxLength> frequencyAsString; |
|
1547 |
frequencyAsString.AppendNum( frequencyMHz, TRealFormat( KFrequencyMaxLength, KDecimalsInMhzFrequency ) ); |
|
1548 |
AknTextUtils::LanguageSpecificNumberConversion( frequencyAsString ); |
|
1549 |
noteStringBuf |
|
1550 |
= StringLoader::LoadLC( R_QTN_FMTX_SYSAP_INFO_NOTE_CHANGE_FREQ, |
|
1551 |
frequencyAsString, |
|
1552 |
iEikonEnv ); |
|
1553 |
break; |
|
1554 |
} |
|
1555 |
case EFmTxAccessoryForbidsNote: |
|
1556 |
{ |
|
1557 |
noteStringBuf = StringLoader::LoadLC( R_QTN_FMTX_SYSAP_INFO_NOTE_ACCESSORY_FORBIDS, |
|
1558 |
iEikonEnv ); |
|
1559 |
break; |
|
1560 |
} |
|
1561 |
case EFmTxAccessoryStandbyNote: |
|
1562 |
{ |
|
1563 |
noteStringBuf = StringLoader::LoadLC( R_QTN_FMTX_SYSAP_INFO_NOTE_ACCESSORY_STANDBY, |
|
1564 |
iEikonEnv ); |
|
1565 |
break; |
|
1566 |
} |
|
1567 |
case EFmTxVolumeDisabledNote: |
|
1568 |
{ |
|
1569 |
noteStringBuf = StringLoader::LoadLC( R_QTN_FMTX_SYSAP_INFO_NOTE_VOLUME_DISABLED, |
|
1570 |
iEikonEnv ); |
|
1571 |
break; |
|
1572 |
} |
|
1573 |
case EFmTxOffNote: |
|
1574 |
{ |
|
1575 |
noteStringBuf = StringLoader::LoadLC( R_QTN_FMTX_SYSAP_INFO_NOTE_DISABLED, |
|
1576 |
iEikonEnv ); |
|
1577 |
break; |
|
1578 |
} |
|
1579 |
case EPowerSaveModeActivated: |
|
1580 |
noteStringBuf = StringLoader::LoadLC( R_QTN_POWER_SAVING_ACTIVATED_CONF_NOTE, iEikonEnv ); |
|
1581 |
break; |
|
1582 |
case EPowerSaveModeDeactivated: |
|
1583 |
noteStringBuf = StringLoader::LoadLC( R_QTN_POWER_SAVING_DEACTIVATED_CONF_NOTE, iEikonEnv ); |
|
1584 |
break; |
|
1585 |
case ECannotActivatePowerSaveMode: |
|
1586 |
noteStringBuf = StringLoader::LoadLC( R_QTN_POWER_SAVING_FAILED_WARNING_NOTE, iEikonEnv ); |
|
1587 |
break; |
|
1588 |
case ECannotDeactivatePowerSaveMode: |
|
1589 |
noteStringBuf = StringLoader::LoadLC( R_QTN_POWER_SAVING_DEACTIVATION_FAILED_WARNING_NOTE, iEikonEnv ); |
|
1590 |
break; |
|
1591 |
default: |
|
1592 |
break; |
|
1593 |
} |
|
1594 |
||
1595 |
note->SetTone( tone ); |
|
1596 |
||
1597 |
// Set secondary display data if necessary |
|
1598 |
if ( iSysApFeatureManager->CoverDisplaySupported() && secondaryDisplayId != SecondaryDisplay::ECmdNoNote) |
|
1599 |
{ |
|
1600 |
TRACES( RDebug::Print( _L("CSysApAppUi::ShowUiNoteL - Notifying secondary display") ) ); |
|
1601 |
CAknSDData* sd; |
|
1602 |
||
1603 |
if ( aNote == EFmTxOnNote ) // frequency information is passed to secondary display |
|
1604 |
{ |
|
1605 |
SecondaryDisplay::TFmTxFrequencyInKhzPckg pckg( iSysApCenRepFmTxObserver->Frequency() ); |
|
1606 |
sd = CAknSDData::NewL( SecondaryDisplay::KCatSysAp, secondaryDisplayId, pckg ); |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1607 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1608 |
else |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1609 |
{ |
63 | 1610 |
sd = CAknSDData::NewL(SecondaryDisplay::KCatSysAp, secondaryDisplayId, KNullDesC8); |
58
0818dd463d41
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
57
diff
changeset
|
1611 |
} |
63 | 1612 |
|
1613 |
note->SetSecondaryDisplayData(sd); // ownership to notifier client |
|
1614 |
} |
|
1615 |
||
1616 |
if ( noteStringBuf ) |
|
1617 |
{ |
|
1618 |
TPtr textBuffer = noteStringBuf->Des(); |
|
1619 |
TRACES( RDebug::Print( _L("CSysApAppUi::ShowUiNoteL Next:note->ShowNoteL" ) ) ); |
|
1620 |
note->ShowNoteL( noteType, textBuffer ); |
|
1621 |
CleanupStack::PopAndDestroy( ); // noteStringbuf |
|
1622 |
} |
|
1623 |
else |
|
1624 |
{ |
|
1625 |
TRACES( RDebug::Print( _L("CSysApAppUi::ShowUiNoteL Next:note->ShowNoteL" ) ) ); |
|
1626 |
note->ShowNoteL( noteType, KNullDesC ); |
|
1627 |
} |
|
1628 |
} |
|
1629 |
else if( swState == ESwStateAlarm || swState == ESwStateCharging ) |
|
1630 |
{ |
|
1631 |
if ( aNote != EUnplugChargerNote ) // don't play tone when charger is disconnected in charging state |
|
1632 |
{ |
|
1633 |
static_cast<CAknAppUi*>(iEikonEnv->EikAppUi())->KeySounds()->PlaySound( tone ); |
|
1634 |
} |
|
1635 |
} |
|
1636 |
||
1637 |
CleanupStack::PopAndDestroy(); // note |
|
1638 |
} |
|
1639 |
||
1640 |
// ---------------------------------------------------------------------------- |
|
1641 |
// CSysApAppUi::ShowChargingNoteL() |
|
1642 |
// ---------------------------------------------------------------------------- |
|
1643 |
||
1644 |
void CSysApAppUi::ShowChargingNoteL() |
|
1645 |
{ |
|
1646 |
TRACES( RDebug::Print( _L("CSysApAppUi::ShowChargingNoteL") ) ); |
|
1647 |
TBool showNote( ETrue ); |
|
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
1648 |
|
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
1649 |
TInt swState( StateOfProperty( KPSUidStartup, KPSGlobalSystemState ) ); |
63 | 1650 |
TRACES( RDebug::Print( _L("CSysApAppUi::ShowChargingNoteL: swState: %d"), swState ) ); |
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
1651 |
|
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
1652 |
if( UiReady() || swState == ESwStateSecurityCheck ) |
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
1653 |
{ |
63 | 1654 |
if ( StateOfProperty( KPSUidCtsyCallInformation, KCTsyCallState ) == EPSCTsyCallStateRinging ) |
1655 |
{ |
|
1656 |
showNote = EFalse; |
|
1657 |
} |
|
1658 |
TRACES( RDebug::Print( _L("CSysApAppUi::ShowChargingNoteL KCTsyCallState=%d"), StateOfProperty( KPSUidCtsyCallInformation, KCTsyCallState ) ) ); |
|
1659 |
if ( showNote ) // Power Mgmt UI spec defines that no Charging note is shown while the phone is ringing/alerting |
|
1660 |
{ |
|
1661 |
CAknGlobalNote* chargingNote = CAknGlobalNote::NewLC(); |
|
1662 |
chargingNote->SetTone( EAvkonSIDChargingBatteryTone ); |
|
1663 |
chargingNote->ShowNoteL( EAknGlobalChargingNote, KNullDesC ); |
|
1664 |
CleanupStack::PopAndDestroy( chargingNote ); |
|
1665 |
} |
|
1666 |
} |
|
1667 |
else if( swState == ESwStateAlarm || swState == ESwStateCharging ) |
|
1668 |
{ |
|
1669 |
TRACES( RDebug::Print( _L("CSysApAppUi::ShowChargingNoteL - Just play tone") ) ); |
|
1670 |
static_cast<CAknAppUi*>(iEikonEnv->EikAppUi())->KeySounds()->PlaySound( EAvkonSIDChargingBatteryTone ); |
|
1671 |
} |
|
1672 |
else |
|
1673 |
{ |
|
1674 |
TRACES( RDebug::Print( _L("CSysApAppUi::ShowChargingNoteL - No note shown") ) ); |
|
1675 |
} |
|
1676 |
} |
|
1677 |
||
1678 |
// ---------------------------------------------------------------------------- |
|
1679 |
// CSysApAppUi::HandleChargerNotesL() |
|
1680 |
// ---------------------------------------------------------------------------- |
|
1681 |
void CSysApAppUi::HandleChargerNotesL( const TInt aValue ) |
|
1682 |
{ |
|
1683 |
TBool showNote(StateOfProperty( KPSUidCtsyCallInformation, KCTsyCallState ) != EPSCTsyCallStateRinging); |
|
1684 |
if ( aValue == EChargingStatusCharging ) |
|
1685 |
{ |
|
1686 |
iSysApLightsController->BatteryEmptyL( EFalse ); |
|
1687 |
TRACES( RDebug::Print( _L("SysAp: charger connected") ) ); |
|
1688 |
iSysApLightsController->ChargerConnectedL( ETrue ); |
|
1689 |
ShowChargingNoteL(); |
|
1690 |
} |
|
1691 |
//Display Not Charging note |
|
1692 |
else if ( aValue == EChargingStatusError ) |
|
1693 |
{ |
|
1694 |
if(showNote) |
|
1695 |
{ |
|
1696 |
ShowUiNoteL( ENotChargingNote ); |
|
1697 |
} |
|
1698 |
} |
|
1699 |
else if ( aValue == EChargingStatusChargingComplete ) |
|
1700 |
{ |
|
1701 |
iSysApLightsController->ChargingCompleteL(); |
|
1702 |
||
1703 |
TSysApNoteIds note( EBatteryFullNote ); |
|
1704 |
||
1705 |
if ( !iSysApUsbChargerDetector.HostOnlyUsbChargingUsed() && |
|
1706 |
iSysApFeatureManager->Supported( KSysApFeatureIdChargerReminderNotes ) ) |
|
1707 |
{ |
|
1708 |
note = EBatteryFullUnplugChargerNote; |
|
1709 |
} |
|
1710 |
iSysApUsbChargerDetector.Reset(); |
|
1711 |
if(showNote) |
|
1712 |
{ |
|
1713 |
ShowUiNoteL( note ); |
|
1714 |
} |
|
1715 |
} |
|
1716 |
else if ( aValue == EChargingStatusNotConnected ) |
|
1717 |
{ |
|
1718 |
TRACES( RDebug::Print( _L("SysAp: charger removed") ) ); |
|
1719 |
iSysApLightsController->ChargerConnectedL( EFalse ); |
|
1720 |
||
1721 |
if ( !iSysApUsbChargerDetector.HostOnlyUsbChargingUsed() && |
|
1722 |
iSysApFeatureManager->Supported( KSysApFeatureIdChargerReminderNotes ) ) |
|
1723 |
{ |
|
1724 |
if(showNote) |
|
1725 |
{ |
|
1726 |
ShowUiNoteL( EUnplugChargerNote ); |
|
1727 |
} |
|
1728 |
} |
|
1729 |
iSysApUsbChargerDetector.Reset(); |
|
1730 |
} |
|
1731 |
else if ( aValue == EChargingStatusNotCharging ) |
|
1732 |
{ |
|
1733 |
TRACES( RDebug::Print( _L("SysAp: Not charging") ) ); |
|
1734 |
} |
|
1735 |
else if ( aValue == EChargingStatusAlmostComplete ) |
|
1736 |
{ |
|
1737 |
TRACES( RDebug::Print( _L("SysAp: Charging almost complete") ) ); |
|
1738 |
} |
|
1739 |
else if ( aValue == EChargingStatusChargingContinued ) |
|
1740 |
{ |
|
1741 |
//in this case we simply want to scroll the battery bars and not turn light on or show ui note |
|
1742 |
// set lights controller iBatteryEmpty to EFalse |
|
1743 |
iSysApLightsController->BatteryEmptyL( EFalse ); |
|
1744 |
TRACES( RDebug::Print( _L("SysAp: charging continues") ) ); |
|
1745 |
} |
|
1746 |
} |
|
1747 |
||
1748 |
// ---------------------------------------------------------------------------- |
|
1749 |
// CSysApAppUi::ShowProfileNoteL() |
|
1750 |
// ---------------------------------------------------------------------------- |
|
1751 |
||
1752 |
void CSysApAppUi::ShowProfileNoteL() |
|
1753 |
{ |
|
1754 |
TRACES( RDebug::Print( _L("CSysApAppUi::ShowProfileNoteL") ) ); |
|
1755 |
||
1756 |
if ( UiReady() ) |
|
1757 |
{ |
|
1758 |
||
1759 |
TBufC<KMaxProfileNameLength> profileName; |
|
1760 |
HBufC* noteStringBuf = NULL; |
|
1761 |
ActiveProfileNameL( profileName.Des() ); |
|
1762 |
noteStringBuf = StringLoader::LoadLC( R_TEXT_MODE_SELECTED, profileName, iEikonEnv ); |
|
1763 |
TPtr textBuffer = noteStringBuf->Des(); |
|
1764 |
AknTextUtils::DisplayTextLanguageSpecificNumberConversion( textBuffer ); |
|
1765 |
||
1766 |
||
1767 |
// Set secondary display data if necessary |
|
1768 |
if ( iSysApFeatureManager->CoverDisplaySupported() ) |
|
1769 |
{ |
|
1770 |
TRACES( RDebug::Print( _L("CSysApAppUi::ShowProfileNoteL - Notifying secondary display") ) ); |
|
1771 |
SecondaryDisplay::TProfileName sdProfileName; |
|
1772 |
sdProfileName.Append(profileName.Left(SecondaryDisplay::KProfileNameMaxLen)); |
|
1773 |
SecondaryDisplay::TProfileNotePckg pckg(sdProfileName); |
|
1774 |
CAknSDData* sd = CAknSDData::NewL(SecondaryDisplay::KCatSysAp, SecondaryDisplay::ECmdShowProfileNote, pckg); |
|
1775 |
||
1776 |
} |
|
1777 |
||
1778 |
||
1779 |
CAknDiscreetPopup::ShowGlobalPopupL(textBuffer,KNullDesC, KAknsIIDNone, KNullDesC); |
|
1780 |
||
1781 |
CleanupStack::PopAndDestroy(); // noteStringbuf |
|
1782 |
||
1783 |
iSysApLightsController->ProfileChangedL(); // All notes should always turn lights on. |
|
1784 |
} |
|
1785 |
} |
|
1786 |
||
1787 |
// ---------------------------------------------------------------------------- |
|
1788 |
// CSysApAppUi::ShowQueryL() |
|
1789 |
// ---------------------------------------------------------------------------- |
|
1790 |
||
1791 |
void CSysApAppUi::ShowQueryL( const TSysApConfirmationQueryIds aQueryId, const TDesC& aValue ) |
|
1792 |
{ |
|
1793 |
CancelGlobalListQuery(); |
|
1794 |
||
1795 |
if ( aQueryId == ESysApRestartPhoneQuery ) |
|
1796 |
{ |
|
1797 |
iDisablePowerkeyMenu = ETrue; |
|
1798 |
// Cancel any other query that might be outstanding (i.e. ESysApRemoveMmcNote), |
|
1799 |
// to avoid multiple overlapping queries causing problems |
|
1800 |
if ( iSysApConfirmationQuery ) |
|
1801 |
{ |
|
1802 |
iSysApConfirmationQuery->Cancel(); |
|
1803 |
} |
|
1804 |
||
1805 |
if ( !iSysApConfirmationQueryForRestart ) |
|
1806 |
{ |
|
1807 |
TRACES( RDebug::Print( _L("CSysApAppUi::ShowQueryL: trying CSysApConfirmationQuery::NewL() for restart") ) ); |
|
1808 |
iSysApConfirmationQueryForRestart = CSysApConfirmationQuery::NewL( *this ); |
|
1809 |
} |
|
1810 |
||
1811 |
iSysApConfirmationQueryForRestart->ShowQueryL( aQueryId, iEikonEnv ); |
|
1812 |
} |
|
1813 |
else |
|
1814 |
{ |
|
1815 |
if ( !iSysApConfirmationQuery ) |
|
1816 |
{ |
|
1817 |
TRACES( RDebug::Print( _L("CSysApAppUi::ShowQueryL: trying CSysApConfirmationQuery::NewL()") ) ); |
|
1818 |
iSysApConfirmationQuery = CSysApConfirmationQuery::NewL( *this ); |
|
1819 |
} |
|
1820 |
||
1821 |
iSysApConfirmationQuery->ShowQueryL( aQueryId, aValue, iEikonEnv ); |
|
1822 |
} |
|
1823 |
} |
|
1824 |
||
1825 |
// ---------------------------------------------------------------------------- |
|
1826 |
// CSysApAppUi::UpdateBatteryBarsL( const TInt aState ) |
|
1827 |
// ---------------------------------------------------------------------------- |
|
1828 |
||
1829 |
void CSysApAppUi::UpdateBatteryBarsL( const TInt aState ) |
|
1830 |
{ |
|
1831 |
TInt state( StateOfProperty( KPSUidHWRMPowerState, KHWRMChargingStatus ) ); |
|
1832 |
TRACES( RDebug::Print( _L("CSysApAppUi::UpdateBatteryBarsL aState: %d, chargerState:%d"), aState, state ) ); |
|
1833 |
HandleUsbCharger( state ); |
|
1834 |
if( state == EChargingStatusCharging || |
|
1835 |
state == EChargingStatusChargingContinued || |
|
1836 |
state == EChargingStatusAlmostComplete ) |
|
1837 |
{ |
|
1838 |
if ( !iCharging ) |
|
1839 |
{ |
|
1840 |
TRACES( RDebug::Print( _L("CSysApAppUi::UpdateBatteryBarsL: Starting Charging") ) ); |
|
1841 |
iBatteryNotify->StartChargingL(); |
|
1842 |
iCharging = ETrue; |
|
1843 |
} |
|
1844 |
||
1845 |
// When Avkon supports battery state sending while charging, |
|
1846 |
// add setting battery level here also. |
|
1847 |
} |
|
1848 |
else |
|
1849 |
{ |
|
1850 |
if ( iCharging ) |
|
1851 |
{ |
|
1852 |
TRACES( RDebug::Print( _L("CSysApAppUi::UpdateBatteryBarsL: Stopping Charging") ) ); |
|
1853 |
iBatteryNotify->StopChargingL(); |
|
1854 |
iCharging = EFalse; |
|
1855 |
} |
|
1856 |
||
1857 |
if( state == KErrUnknown || aState == KErrUnknown ) |
|
1858 |
{ |
|
1859 |
TRACES( RDebug::Print( _L("CSysApAppUi::UpdateBatteryBarsL: CAknBatteryNotify::SetBatteryLevelL(0)") ) ); |
|
1860 |
iBatteryNotify->SetBatteryLevelL( 0 ); |
|
1861 |
} |
|
1862 |
else |
|
1863 |
{ |
|
1864 |
TRACES( RDebug::Print( _L("CSysApAppUi::UpdateBatteryBarsL: CAknBatteryNotify::SetBatteryLevelL(%d)"), aState - EBatteryLevelLevel0 ) ); |
|
1865 |
iBatteryNotify->SetBatteryLevelL( aState - EBatteryLevelLevel0 ); |
|
1866 |
} |
|
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
1867 |
} |
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
1868 |
|
63 | 1869 |
if ( !iSysApPsmController ) // created here if first state change has not occurred yet |
1870 |
{ |
|
1871 |
iSysApPsmController = CSysApPsmController::NewL( *this ); |
|
1872 |
} |
|
1873 |
||
1874 |
if ( iSysApPsmController ) |
|
1875 |
{ |
|
1876 |
if ( iSysApPsmController->FullPsmEnabled() ) |
|
1877 |
{ |
|
1878 |
iBatteryNotify->SetBatteryStateL( EAknBatteryIndicatorPowerSave ); |
|
1879 |
} |
|
1880 |
else |
|
1881 |
{ |
|
1882 |
iBatteryNotify->SetBatteryStateL( EAknBatteryIndicatorNormal ); |
|
1883 |
} |
|
1884 |
} |
|
1885 |
||
1886 |
if ( iSysApBatteryInfoController ) |
|
1887 |
{ |
|
1888 |
iSysApBatteryInfoController->BatteryLevelUpdatedL(); |
|
1889 |
} |
|
1890 |
} |
|
1891 |
||
1892 |
// ---------------------------------------------------------------------------- |
|
1893 |
// CSysApAppUi::UpdateSignalBarsL() |
|
1894 |
// ---------------------------------------------------------------------------- |
|
1895 |
||
1896 |
void CSysApAppUi::UpdateSignalBarsL() |
|
1897 |
{ |
|
1898 |
UpdateSignalBarsL(iSysApEtelConnector->GetSignalBars()); |
|
1899 |
} |
|
1900 |
||
1901 |
// ---------------------------------------------------------------------------- |
|
1902 |
// CSysApAppUi::UpdateSignalBarsL( const TInt aState ) |
|
1903 |
// ---------------------------------------------------------------------------- |
|
1904 |
||
1905 |
void CSysApAppUi::UpdateSignalBarsL( const TInt aState ) |
|
1906 |
{ |
|
1907 |
TRACES( RDebug::Print( _L("CSysApAppUi::UpdateSignalBarsL aState: %d"), aState ) ); |
|
1908 |
if( iSysApGanHandler && iSysApGanHandler->IsInGanMode() ) |
|
1909 |
{ |
|
1910 |
iSignalNotify->SetSignalLevelL( iSysApGanHandler->GanSignalLevel() ); |
|
1911 |
} |
|
1912 |
else if( aState == KAknSignalOffLineMode || (iSysApOfflineModeController->OfflineModeActive() && !iEmergencyCallActive) ) |
|
1913 |
{ |
|
1914 |
iSignalNotify->SetSignalLevelL( KAknSignalOffLineMode ); |
|
1915 |
} |
|
1916 |
else if( aState <= 0 ) |
|
1917 |
{ |
|
1918 |
// Do not update indicator show zero bars if we should be showing X over bars |
|
1919 |
// This is required for indicator to work correctly in BT SAP mode. |
|
1920 |
// Cannot use check for BT SAP enabled status, as zero bars notify comes before enabled status changes. |
|
1921 |
if ( !iIgnoreZeroNetworkBarNotifications ) |
|
1922 |
{ |
|
1923 |
iSignalNotify->SetSignalLevelL( 0 ); |
|
1924 |
} |
|
1925 |
} |
|
1926 |
else |
|
1927 |
{ |
|
1928 |
iSignalNotify->SetSignalLevelL( aState ); |
|
1929 |
} |
|
1930 |
} |
|
1931 |
||
1932 |
// ---------------------------------------------------------------------------- |
|
1933 |
// CSysApAppUi::SetSignalIndicatorL() |
|
1934 |
// ---------------------------------------------------------------------------- |
|
1935 |
||
1936 |
void CSysApAppUi::SetSignalIndicatorL() |
|
1937 |
{ |
|
1938 |
TSysApNetworkMode networkMode( ESysApGSM ); |
|
1939 |
||
1940 |
TInt networkModeFromNetworkInfo( StateOfProperty( KPSUidNetworkInfo, KNWTelephonyNetworkMode ) ); |
|
1941 |
if ( networkModeFromNetworkInfo == ENWNetworkModeWcdma ) |
|
1942 |
{ |
|
1943 |
networkMode = ESysApWCDMA; |
|
1944 |
} |
|
1945 |
else |
|
1946 |
{ |
|
1947 |
networkMode = ESysApGSM; |
|
1948 |
} |
|
1949 |
||
1950 |
TRACES( RDebug::Print( _L("CSysApAppUi::SetSignalIndicatorL: networkMode = %d" ), networkMode ) ); |
|
1951 |
||
1952 |
if( iSysApOfflineModeController->OfflineModeActive() && !iEmergencyCallActive ) |
|
1953 |
{ |
|
1954 |
// The device is in Offline Mode |
|
1955 |
if ( iSysApFeatureManager->Supported( KSysApFeatureIdGprs_G_Icon ) ) |
|
1956 |
{ |
|
1957 |
iSignalNotify->SetGprsStateL( EAknSignalGprsIndicatorOff ); |
|
1958 |
} |
|
1959 |
else |
|
1960 |
{ |
|
1961 |
iSignalNotify->SetCommonPacketDataStateL( EAknSignalCommonPacketDataIndicatorOff ); |
|
1962 |
} |
|
1963 |
iSignalNotify->SetWcdmaStateL( EAknSignalWcdmaIndicatorOff ); |
|
1964 |
iSignalNotify->SetHsdpaStateL( EAknSignalHsdpaIndicatorOff); |
|
1965 |
TRACES( RDebug::Print(_L("CSysApAppUi::SetSignalIndicatorL: gan off" ) ) ); |
|
1966 |
iSignalNotify->SetUmaStateL( EAknSignalUmaIndicatorOff ); |
|
1967 |
} |
|
1968 |
else |
|
1969 |
{ |
|
1970 |
if( iSysApGanHandler && iSysApGanHandler->IsInGanMode() ) |
|
1971 |
{ |
|
1972 |
// Enter GAN: set GAN signal bar |
|
1973 |
SetSignalIndicatorGanL(); |
|
1974 |
iGanEnabled = ETrue; |
|
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
1975 |
} |
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
1976 |
else |
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
1977 |
{ |
63 | 1978 |
if( iGanEnabled ) |
1979 |
{ |
|
1980 |
UpdateSignalBarsL(); |
|
1981 |
iGanEnabled = EFalse; |
|
1982 |
} |
|
1983 |
||
1984 |
// The device is in Online Mode |
|
1985 |
switch ( networkMode ) |
|
1986 |
{ |
|
1987 |
case ESysApGSM: |
|
1988 |
SetSignalIndicatorGsmL(); |
|
1989 |
break; |
|
1990 |
||
1991 |
case ESysApWCDMA: |
|
1992 |
SetSignalIndicatorWcdmaL(); |
|
1993 |
break; |
|
1994 |
||
1995 |
default: |
|
1996 |
break; |
|
1997 |
} |
|
1998 |
} |
|
1999 |
} |
|
2000 |
} |
|
2001 |
||
2002 |
// ---------------------------------------------------------------------------- |
|
2003 |
// CSysApAppUi::SetSignalIndicatorGsmL() |
|
2004 |
// ---------------------------------------------------------------------------- |
|
2005 |
void CSysApAppUi::SetSignalIndicatorGsmL() |
|
2006 |
{ |
|
2007 |
TInt signalGprsIndicatorState( 0 ); |
|
2008 |
TInt signalIndicatorState( 0 ); |
|
2009 |
TInt bearerValue = EBearerUnknown; |
|
2010 |
||
2011 |
if(iSysApConnectionMonitorObserver) |
|
2012 |
{ |
|
2013 |
bearerValue = iSysApConnectionMonitorObserver->GetBearerValue(); |
|
2014 |
} |
|
2015 |
||
2016 |
if(bearerValue == EBearerEdgeGPRS) |
|
2017 |
{ |
|
2018 |
TInt egprsStatus = StateOfProperty( KUidSystemCategory, KPSUidGprsStatusValue ); |
|
2019 |
TRACES( RDebug::Print( _L("CSysApAppUi::SetSignalIndicatorGsmL gprsStatus: %d" ), egprsStatus ) ); |
|
2020 |
iSignalNotify->SetWcdmaStateL( EAknSignalWcdmaIndicatorOff ); |
|
2021 |
iSignalNotify->SetHsdpaStateL( EAknSignalHsdpaIndicatorOff ); |
|
2022 |
switch ( egprsStatus ) |
|
2023 |
{ |
|
2024 |
case EPSGprsContextActive: |
|
2025 |
signalGprsIndicatorState = EAknSignalEdgeIndicatorContext; |
|
2026 |
signalIndicatorState = EAknSignalCommonPacketDataIndicatorContext; |
|
2027 |
iGprsActivated = ETrue; |
|
2028 |
iGprsSuspended = EFalse; |
|
2029 |
HandleGprsNotesL(); |
|
2030 |
break; |
|
2031 |
||
2032 |
case EPSGprsContextActivating: |
|
2033 |
signalGprsIndicatorState = EAknSignalEdgeIndicatorEstablishingContext; |
|
2034 |
signalIndicatorState = EAknSignalCommonPacketDataIndicatorEstablishingContext; |
|
2035 |
iGprsActivated = EFalse; |
|
2036 |
iGprsSuspended = EFalse; |
|
2037 |
break; |
|
2038 |
||
2039 |
case EPSGprsSuspend: |
|
2040 |
signalGprsIndicatorState = EAknSignalEdgeIndicatorSuspended; |
|
2041 |
signalIndicatorState = EAknSignalCommonPacketDataIndicatorSuspended; |
|
2042 |
iGprsSuspended = ETrue; |
|
2043 |
HandleGprsNotesL(); |
|
2044 |
break; |
|
2045 |
||
2046 |
case EPSGprsAttach: |
|
2047 |
signalGprsIndicatorState = EAknSignalEdgeIndicatorAttached; |
|
2048 |
signalIndicatorState = EAknSignalCommonPacketDataIndicatorAttached; |
|
2049 |
iGprsActivated = EFalse; |
|
2050 |
iGprsSuspended = EFalse; |
|
2051 |
break; |
|
2052 |
||
2053 |
case EPSGprsMultibleContextActive: |
|
2054 |
signalGprsIndicatorState = EAknSignalEdgeIndicatorMultipdp; |
|
2055 |
signalIndicatorState = EAknSignalCommonPacketDataIndicatorMultipdp; |
|
2056 |
iGprsActivated = ETrue; |
|
2057 |
iGprsSuspended = EFalse; |
|
2058 |
HandleGprsNotesL(); |
|
2059 |
break; |
|
2060 |
||
2061 |
case EPSGprsUnattached: |
|
2062 |
default: |
|
2063 |
if ( iTDEnable ) |
|
2064 |
{ |
|
2065 |
signalGprsIndicatorState = EAknSignalEdgeIndicatorAvailable; |
|
2066 |
signalIndicatorState = EAknSignalCommonPacketDataIndicatorAvailable; |
|
2067 |
} |
|
2068 |
else |
|
2069 |
{ |
|
2070 |
signalGprsIndicatorState = EAknSignalEdgeIndicatorOff; |
|
2071 |
signalIndicatorState = EAknSignalCommonPacketDataIndicatorOff; |
|
2072 |
} |
|
2073 |
iGprsSuspendedNoteShown = EFalse; |
|
2074 |
iGprsActivated = EFalse; |
|
2075 |
iGprsSuspended = EFalse; |
|
2076 |
iCallActivated = EFalse; |
|
2077 |
break; |
|
2078 |
} |
|
2079 |
} |
|
2080 |
else |
|
2081 |
{ |
|
2082 |
||
2083 |
TInt gprsStatus = StateOfProperty( KUidSystemCategory, KPSUidGprsStatusValue ); |
|
2084 |
TRACES( RDebug::Print( _L("CSysApAppUi::SetSignalIndicatorGsmL gprsStatus: %d" ), gprsStatus ) ); |
|
2085 |
iSignalNotify->SetWcdmaStateL( EAknSignalWcdmaIndicatorOff ); |
|
2086 |
iSignalNotify->SetHsdpaStateL( EAknSignalHsdpaIndicatorOff ); |
|
2087 |
switch ( gprsStatus ) |
|
2088 |
{ |
|
2089 |
case EPSGprsContextActive: |
|
2090 |
signalGprsIndicatorState = EAknSignalGprsIndicatorContext; |
|
2091 |
signalIndicatorState = EAknSignalCommonPacketDataIndicatorContext; |
|
2092 |
iGprsActivated = ETrue; |
|
2093 |
iGprsSuspended = EFalse; |
|
2094 |
HandleGprsNotesL(); |
|
2095 |
break; |
|
2096 |
||
2097 |
case EPSGprsContextActivating: |
|
2098 |
signalGprsIndicatorState = EAknSignalGprsIndicatorEstablishingContext; |
|
2099 |
signalIndicatorState = EAknSignalCommonPacketDataIndicatorEstablishingContext; |
|
2100 |
iGprsActivated = EFalse; |
|
2101 |
iGprsSuspended = EFalse; |
|
2102 |
break; |
|
2103 |
||
2104 |
case EPSGprsSuspend: |
|
2105 |
signalGprsIndicatorState = EAknSignalGprsIndicatorSuspended; |
|
2106 |
signalIndicatorState = EAknSignalCommonPacketDataIndicatorSuspended; |
|
2107 |
iGprsSuspended = ETrue; |
|
2108 |
HandleGprsNotesL(); |
|
2109 |
break; |
|
2110 |
||
2111 |
case EPSGprsAttach: |
|
2112 |
signalGprsIndicatorState = EAknSignalGprsIndicatorAttached; |
|
2113 |
signalIndicatorState = EAknSignalCommonPacketDataIndicatorAttached; |
|
2114 |
iGprsActivated = EFalse; |
|
2115 |
iGprsSuspended = EFalse; |
|
2116 |
break; |
|
2117 |
||
2118 |
case EPSGprsMultibleContextActive: |
|
2119 |
signalGprsIndicatorState = EAknSignalGprsIndicatorMultipdp; |
|
2120 |
signalIndicatorState = EAknSignalCommonPacketDataIndicatorMultipdp; |
|
2121 |
iGprsActivated = ETrue; |
|
2122 |
iGprsSuspended = EFalse; |
|
2123 |
HandleGprsNotesL(); |
|
2124 |
break; |
|
2125 |
||
2126 |
case EPSGprsUnattached: |
|
2127 |
default: |
|
2128 |
if ( iTDEnable ) |
|
2129 |
{ |
|
2130 |
signalGprsIndicatorState = EAknSignalGprsIndicatorAvailable; |
|
2131 |
signalIndicatorState = EAknSignalCommonPacketDataIndicatorAvailable; |
|
2132 |
} |
|
2133 |
else |
|
2134 |
{ |
|
2135 |
signalGprsIndicatorState = EAknSignalGprsIndicatorOff; |
|
2136 |
signalIndicatorState = EAknSignalCommonPacketDataIndicatorOff; |
|
2137 |
} |
|
2138 |
||
2139 |
iGprsSuspendedNoteShown = EFalse; |
|
2140 |
iGprsActivated = EFalse; |
|
2141 |
iGprsSuspended = EFalse; |
|
2142 |
iCallActivated = EFalse; |
|
2143 |
break; |
|
2144 |
} |
|
2145 |
} |
|
2146 |
||
2147 |
if(bearerValue == EBearerEdgeGPRS) //EdgeGPRS connection |
|
2148 |
{ |
|
2149 |
if( iSysApFeatureManager->Supported( KSysApFeatureIdUseEdgeGPRSIcon ) ) |
|
2150 |
{ |
|
2151 |
iSignalNotify->SetEdgeStateL( signalGprsIndicatorState ); |
|
2152 |
} |
|
2153 |
else |
|
2154 |
{ |
|
2155 |
iSignalNotify->SetCommonPacketDataStateL( signalIndicatorState ); |
|
2156 |
} |
|
2157 |
} |
|
2158 |
else |
|
2159 |
{ |
|
2160 |
||
2161 |
if ( iSysApFeatureManager->Supported( KSysApFeatureIdGprs_G_Icon ) ) |
|
2162 |
{ |
|
2163 |
iSignalNotify->SetGprsStateL( signalGprsIndicatorState ); |
|
2164 |
} |
|
2165 |
else |
|
2166 |
{ |
|
2167 |
TRACES( RDebug::Print( _L("CSysApAppUi::SetSignalIndicatorGsmL SetCommonPacketDataStateL( %d )" ), signalIndicatorState ) ); |
|
2168 |
iSignalNotify->SetCommonPacketDataStateL( signalIndicatorState ); |
|
2169 |
} |
|
2170 |
} |
|
2171 |
} |
|
2172 |
||
2173 |
// ---------------------------------------------------------------------------- |
|
2174 |
// CSysApAppUi::SetSignalIndicatorWcdmaL() |
|
2175 |
// ---------------------------------------------------------------------------- |
|
2176 |
void CSysApAppUi::SetSignalIndicatorWcdmaL() |
|
2177 |
{ |
|
2178 |
TInt wcdmaStatus; |
|
2179 |
wcdmaStatus = StateOfProperty( KUidSystemCategory, KPSUidWcdmaStatusValue ); |
|
2180 |
TRACES( RDebug::Print( _L("CSysApAppUi::SetSignalIndicatorWcdmaL: wcdmaStatus: %d" ), wcdmaStatus ) ); |
|
2181 |
||
2182 |
if ( iSysApFeatureManager->Supported( KSysApFeatureIdGprs_G_Icon ) ) |
|
2183 |
{ |
|
2184 |
iSignalNotify->SetGprsStateL( EAknSignalGprsIndicatorOff ); |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2185 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2186 |
else |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2187 |
{ |
63 | 2188 |
iSignalNotify->SetCommonPacketDataStateL( EAknSignalCommonPacketDataIndicatorOff ); |
2189 |
} |
|
2190 |
||
2191 |
TInt signalWcdmaIndicatorState; |
|
2192 |
TInt signalHsdpaIndicatorState; |
|
2193 |
||
2194 |
switch ( wcdmaStatus ) |
|
2195 |
{ |
|
2196 |
case EPSWcdmaContextActive: |
|
2197 |
signalWcdmaIndicatorState = EAknSignalWcdmaIndicatorContext; |
|
2198 |
signalHsdpaIndicatorState = EAknSignalHsdpaIndicatorContext; |
|
2199 |
break; |
|
2200 |
case EPSWcdmaContextActivating: |
|
2201 |
signalWcdmaIndicatorState = EAknSignalWcdmaIndicatorEstablishingContext; |
|
2202 |
signalHsdpaIndicatorState = EAknSignalHsdpaIndicatorEstablishingContext; |
|
2203 |
break; |
|
2204 |
case EPSWcdmaSuspend: |
|
2205 |
signalWcdmaIndicatorState = EAknSignalWcdmaIndicatorSuspended; |
|
2206 |
signalHsdpaIndicatorState = EAknSignalHsdpaIndicatorSuspended; |
|
2207 |
break; |
|
2208 |
case EPSWcdmaAttach: |
|
2209 |
signalWcdmaIndicatorState = EAknSignalWcdmaIndicatorAttached; |
|
2210 |
signalHsdpaIndicatorState = EAknSignalHsdpaIndicatorAttached; |
|
2211 |
break; |
|
2212 |
case EPSWcdmaMultipleContextActive: |
|
2213 |
signalWcdmaIndicatorState = EAknSignalWcdmaIndicatorMultipdp; |
|
2214 |
signalHsdpaIndicatorState = EAknSignalHsdpaIndicatorMultipdp; |
|
2215 |
break; |
|
2216 |
case EPSWcdmaUnattached: |
|
2217 |
default: |
|
2218 |
signalWcdmaIndicatorState = EAknSignalWcdmaIndicatorAvailable; |
|
2219 |
signalHsdpaIndicatorState = EAknSignalHsdpaIndicatorAvailable; |
|
2220 |
break; |
|
2221 |
} |
|
2222 |
||
2223 |
TBool showHsdpaAvailable = EFalse; |
|
2224 |
||
2225 |
if ( iSysApFeatureManager->Supported( KSysApFeatureIdUseHsdpaAvailableIcon ) ) |
|
2226 |
{ |
|
2227 |
// HSDPA Resource Availability information is a configurable feature. |
|
2228 |
showHsdpaAvailable = iSysApEtelConnector->HsdpaAvailable(); |
|
2229 |
} |
|
2230 |
||
2231 |
TBool isHsdpaBearer = iSysApEtelConnector->IsBearerHsdpa(); |
|
2232 |
||
2233 |
TRACES( RDebug::Print( _L("CSysApAppUi::SetSignalIndicatorWcdmaL: isHdpaBearer=%d, showHsdpaAvailable=%d" ), |
|
2234 |
isHsdpaBearer, showHsdpaAvailable ) ); |
|
2235 |
||
2236 |
if ( isHsdpaBearer || showHsdpaAvailable ) |
|
2237 |
{ |
|
2238 |
iSignalNotify->SetWcdmaStateL( EAknSignalWcdmaIndicatorOff ); |
|
2239 |
iSignalNotify->SetHsdpaStateL( signalHsdpaIndicatorState ); |
|
2240 |
} |
|
2241 |
else |
|
2242 |
{ |
|
2243 |
iSignalNotify->SetHsdpaStateL( EAknSignalHsdpaIndicatorOff ); |
|
2244 |
iSignalNotify->SetWcdmaStateL( signalWcdmaIndicatorState ); |
|
2245 |
} |
|
2246 |
} |
|
2247 |
||
2248 |
// ---------------------------------------------------------------------------- |
|
2249 |
// CSysApAppUi::SetSignalIndicatorGanL() |
|
2250 |
// ---------------------------------------------------------------------------- |
|
2251 |
void CSysApAppUi::SetSignalIndicatorGanL() |
|
2252 |
{ |
|
2253 |
TRACES( RDebug::Print(_L("CSysApAppUi::SetSignalIndicatorGanL: available" ) ) ); |
|
2254 |
||
2255 |
TInt gprsStatus( 0 ); |
|
2256 |
gprsStatus = StateOfProperty( KUidSystemCategory, KPSUidGprsStatusValue ); |
|
2257 |
||
2258 |
TRACES( RDebug::Print( _L("CSysApAppUi::SetSignalIndicatorGanL gprsStatus: %d" ), gprsStatus ) ); |
|
2259 |
||
2260 |
switch ( gprsStatus ) |
|
2261 |
{ |
|
2262 |
case EPSGprsContextActive: |
|
2263 |
iSignalNotify->SetUmaStateL( EAknSignalUmaIndicatorContext ); |
|
2264 |
break; |
|
2265 |
||
2266 |
case EPSGprsContextActivating: |
|
2267 |
iSignalNotify->SetUmaStateL( EAknSignalUmaIndicatorEstablishingContext ); |
|
2268 |
break; |
|
2269 |
||
2270 |
case EPSGprsSuspend: |
|
2271 |
iSignalNotify->SetUmaStateL( EAknSignalUmaIndicatorSuspended ); |
|
2272 |
break; |
|
2273 |
||
2274 |
case EPSGprsAttach: |
|
2275 |
iSignalNotify->SetUmaStateL( EAknSignalUmaIndicatorAttached ); |
|
2276 |
break; |
|
2277 |
||
2278 |
case EPSGprsMultibleContextActive: |
|
2279 |
iSignalNotify->SetUmaStateL( EAknSignalUmaIndicatorMultipdp ); |
|
2280 |
break; |
|
2281 |
||
2282 |
case EPSGprsUnattached: |
|
2283 |
default: |
|
2284 |
iSignalNotify->SetUmaStateL( EAknSignalUmaIndicatorAvailable ); |
|
2285 |
break; |
|
2286 |
} |
|
2287 |
} |
|
2288 |
||
2289 |
// ---------------------------------------------------------------------------- |
|
2290 |
// CSysApAppUi::HandleGprsNotesL() |
|
2291 |
// ---------------------------------------------------------------------------- |
|
2292 |
||
2293 |
void CSysApAppUi::HandleGprsNotesL() |
|
2294 |
{ |
|
2295 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleGprsNotesL" ) ) ); |
|
2296 |
if ( iSysApFeatureManager->Supported( KSysApFeatureIdGPRSNotes ) ) |
|
2297 |
{ |
|
2298 |
// In WCDMA system, receiving or making calls has no effect to the possibly |
|
2299 |
// existing PDP contexts i.e. GPRS notes are not needed. |
|
2300 |
TInt networkMode = StateOfProperty( KPSUidNetworkInfo, KNWTelephonyNetworkMode ); |
|
2301 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleGprsNotesL: networkMode %d" ), networkMode ) ); |
|
2302 |
if ( networkMode != ENWNetworkModeWcdma ) |
|
2303 |
{ |
|
2304 |
if ( iGprsActivated && iGprsSuspended && iCallActivated && !iGprsSuspendedNoteShown ) |
|
2305 |
{ |
|
2306 |
StartGprsSuspendedTimer(); |
|
2307 |
} |
|
2308 |
else if ( iGprsSuspendedNoteShown && !iGprsSuspended ) |
|
2309 |
{ |
|
2310 |
iGprsSuspendedNoteShown = EFalse; |
|
2311 |
iGprsSuspended = EFalse; |
|
2312 |
iCallActivated = EFalse; |
|
2313 |
} |
|
2314 |
} |
|
2315 |
} |
|
2316 |
} |
|
2317 |
||
2318 |
// ---------------------------------------------------------------------------- |
|
2319 |
// CSysApAppUi::SetIndicatorStateL( TInt aIndicator, TInt aState ) |
|
2320 |
// ---------------------------------------------------------------------------- |
|
2321 |
||
2322 |
void CSysApAppUi::SetIndicatorStateL( const TInt aIndicator, const TInt aState ) const |
|
2323 |
{ |
|
2324 |
CAknSmallIndicator* theIndicator = CAknSmallIndicator::NewLC( TUid::Uid( aIndicator ) ); |
|
2325 |
theIndicator->SetIndicatorStateL( aState ); |
|
2326 |
CleanupStack::PopAndDestroy(); //theIndicator |
|
2327 |
} |
|
2328 |
||
2329 |
// ---------------------------------------------------------------------------- |
|
2330 |
// CSysApAppUi::GoOnlineL() |
|
2331 |
// ---------------------------------------------------------------------------- |
|
2332 |
||
2333 |
void CSysApAppUi::GoOnlineL( TBool aDoProfileChange ) |
|
2334 |
{ |
|
2335 |
if ( iSysApFeatureManager->OfflineModeSupported() ) |
|
2336 |
{ |
|
2337 |
TRACES( RDebug::Print( _L("CSysApAppUi::GoOnlineL: going from off-line into on-line: aDoProfileChange=%d" ), aDoProfileChange ) ); |
|
2338 |
// in case profile change is not needed, event handling for subsequent profile changes are must be allowed |
|
2339 |
iHandleNextProfileEvent = !aDoProfileChange; |
|
2340 |
iActivateBt = iSysApOfflineModeController->MustBtBeActivated(); |
|
2341 |
||
2342 |
if ( aDoProfileChange ) |
|
2343 |
{ |
|
2344 |
TRAPD( err, ActivateProfileL( iSysApCenRepController->GetInt( KCRUidCoreApplicationUIsSysAp, KSysApProfileBeforeOfflineMode ) ) ); |
|
2345 |
if ( err == KErrNotFound ) |
|
2346 |
{ |
|
2347 |
// Activate general profile instead, if previously used profile was not found |
|
2348 |
TRACES( RDebug::Print( _L("CSysApAppUi::GoOnlineL: Previously used profile was not found, restoring to general profile" ) ) ); |
|
2349 |
ActivateProfileL(KGeneralProfileId); |
|
2350 |
} |
|
2351 |
} |
|
2352 |
||
2353 |
iSysApOfflineModeController->SwitchFromOfflineToOnlineModeL(); |
|
2354 |
TRACES( RDebug::Print( _L("CSysApAppUi::GoOnlineL: iActivateBt = %d" ), iActivateBt ) ); |
|
2355 |
} |
|
2356 |
} |
|
2357 |
||
2358 |
// ---------------------------------------------------------------------------- |
|
2359 |
// CSysApAppUi::GoOfflineL() |
|
2360 |
// ---------------------------------------------------------------------------- |
|
2361 |
||
2362 |
void CSysApAppUi::GoOfflineL() |
|
2363 |
{ |
|
2364 |
if ( iSysApFeatureManager->OfflineModeSupported() ) |
|
2365 |
{ |
|
2366 |
TRACES( RDebug::Print( _L("CSysApAppUi::GoOfflineL" ) ) ); |
|
2367 |
iHandleNextProfileEvent = EFalse; |
|
2368 |
iDeactivateBt = ETrue; |
|
2369 |
ActivateProfileL( KOfflineModeProfileId ); |
|
2370 |
iSysApOfflineModeController->SwitchFromOnlineToOfflineModeL(); |
|
2371 |
} |
|
2372 |
} |
|
2373 |
||
2374 |
// ---------------------------------------------------------------------------- |
|
2375 |
// CSysApAppUi::SwitchFromOnlineToOfflineModeL() |
|
2376 |
// ---------------------------------------------------------------------------- |
|
2377 |
void CSysApAppUi::SwitchFromOnlineToOfflineModeL() |
|
2378 |
{ |
|
2379 |
if ( iSysApFeatureManager->FmTxSupported() ) |
|
2380 |
{ |
|
2381 |
TFmTxState state = static_cast<TFmTxState>(StateOfProperty( KPSUidHWRMFmTx, KHWRMFmTxStatus )); |
|
2382 |
switch ( state ) |
|
2383 |
{ |
|
2384 |
case EFmTxStateActive: |
|
2385 |
case EFmTxStateInactive: |
|
2386 |
case EFmTxStateScanning: |
|
2387 |
ShowQueryL( ESysApUseFmTxInOfflineQuery ); // show "use fm tx in offline?" if FM TX is on |
|
2388 |
break; |
|
2389 |
||
2390 |
default: |
|
2391 |
// do nothing |
|
2392 |
break; |
|
2393 |
} |
|
2394 |
} |
|
2395 |
iSysApOfflineModeController->SwitchFromOnlineToOfflineModeL(); |
|
2396 |
} |
|
2397 |
||
2398 |
// ---------------------------------------------------------------------------- |
|
2399 |
// CSysApAppUi::OfflineModeChangedL() |
|
2400 |
// ---------------------------------------------------------------------------- |
|
2401 |
void CSysApAppUi::OfflineModeChangedL() |
|
2402 |
{ |
|
2403 |
#ifdef SYSAP_USE_STARTUP_UI_PHASE |
|
2404 |
// if UI is not ready, don't update indicators |
|
2405 |
if ( !UiReady() ) |
|
2406 |
{ |
|
2407 |
return; |
|
2408 |
} |
|
2409 |
#endif // SYSAP_USE_STARTUP_UI_PHASE |
|
2410 |
||
2411 |
// Update network bar indicator |
|
2412 |
if ( OfflineModeActive() ) |
|
2413 |
{ |
|
2414 |
UpdateSignalBarsL( KAknSignalOffLineMode ); |
|
2415 |
} |
|
2416 |
else |
|
2417 |
{ |
|
2418 |
UpdateSignalBarsL(); |
|
2419 |
} |
|
2420 |
||
2421 |
// Update network mode indicator |
|
2422 |
SetSignalIndicatorL(); |
|
2423 |
||
2424 |
// Update HAC indicator |
|
2425 |
SetHacIndicatorL(); |
|
2426 |
} |
|
2427 |
||
2428 |
// ---------------------------------------------------------------------------- |
|
2429 |
// CSysApAppUi::OfflineModeActive() |
|
2430 |
// ---------------------------------------------------------------------------- |
|
2431 |
TBool CSysApAppUi::OfflineModeActive() |
|
2432 |
{ |
|
2433 |
return iSysApOfflineModeController->OfflineModeActive(); |
|
2434 |
} |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2435 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2436 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2437 |
// CSysApAppUi::DoNotActivateBt() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2438 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2439 |
void CSysApAppUi::DoNotActivateBt() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2440 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2441 |
iSysApOfflineModeController->DoNotActivateBt(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2442 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2443 |
|
63 | 2444 |
// ---------------------------------------------------------------------------- |
2445 |
// CSysApAppUi::SetBtPowerState() |
|
2446 |
// ---------------------------------------------------------------------------- |
|
2447 |
TInt CSysApAppUi::SetBtPowerState( TBool aBtState ) |
|
2448 |
{ |
|
2449 |
if ( iSysApBtController ) |
|
2450 |
{ |
|
2451 |
return iSysApBtController->SetPowerState( aBtState ); |
|
2452 |
} |
|
2453 |
else |
|
2454 |
{ |
|
2455 |
return KErrNotReady; |
|
2456 |
} |
|
2457 |
} |
|
2458 |
||
2459 |
// ---------------------------------------------------------------------------- |
|
2460 |
// CSysApAppUi::KeyLockState() const |
|
2461 |
// ---------------------------------------------------------------------------- |
|
2462 |
||
2463 |
TBool CSysApAppUi::KeyLockState() const |
|
2464 |
{ |
|
2465 |
return iKeyLockEnabled; |
|
2466 |
} |
|
2467 |
||
2468 |
// ---------------------------------------------------------------------------- |
|
2469 |
// CSysApAppUi::DeviceLockState() const |
|
2470 |
// ---------------------------------------------------------------------------- |
|
2471 |
||
2472 |
TBool CSysApAppUi::DeviceLockState() const |
|
2473 |
{ |
|
2474 |
return iDeviceLockEnabled; |
|
2475 |
} |
|
2476 |
||
2477 |
// ---------------------------------------------------------------------------- |
|
2478 |
// CSysApAppUi::ChangeFmTxStateL() |
|
2479 |
// ---------------------------------------------------------------------------- |
|
2480 |
void CSysApAppUi::ChangeFmTxStateL( TBool aEnable ) |
|
2481 |
{ |
|
2482 |
// disable fm transmission |
|
2483 |
CHWRMFmTx* fmtx = CHWRMFmTx::NewLC(); |
|
2484 |
if ( aEnable ) |
|
2485 |
{ |
|
2486 |
fmtx->EnableL(); |
|
2487 |
} |
|
2488 |
else |
|
2489 |
{ |
|
2490 |
fmtx->DisableL(); |
|
2491 |
} |
|
2492 |
CleanupStack::PopAndDestroy( fmtx ); |
|
2493 |
} |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2494 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2495 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2496 |
// CSysApAppUi::SetIhfIndicatorL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2497 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2498 |
void CSysApAppUi::SetIhfIndicatorL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2499 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2500 |
TBool accessoryConnected ( EFalse ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2501 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2502 |
TInt callState( StateOfProperty( KPSUidCtsyCallInformation, KCTsyCallState ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2503 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2504 |
TAccMode accMode(EAccModeHandPortable); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2505 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2506 |
if ( iSysApAccessoryObserver ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2507 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2508 |
accMode = iSysApAccessoryObserver->GetAccessoryMode(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2509 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2510 |
if ( accMode != EAccModeHandPortable ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2511 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2512 |
accessoryConnected = ETrue; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2513 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2514 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2515 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2516 |
if( (callState != EPSCTsyCallStateNone && IhfEnabledL() && !accessoryConnected) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2517 |
|| accMode == EAccModeMusicStand ) // Music stand always shows IHF indicator |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2518 |
{ |
63 | 2519 |
SetIndicatorStateL( EAknIndicatorIHFActive, EAknIndicatorStateOn ); |
2520 |
||
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2521 |
if ( accMode == EAccModeMusicStand ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2522 |
{ |
63 | 2523 |
// hide other accessory indicators to prevent displaying of duplicate icons in some cases |
2524 |
// e.g. when wireless hf is connected |
|
2525 |
SetIndicatorStateL( EAknIndicatorLoopset, EAknIndicatorStateOff ); |
|
2526 |
SetIndicatorStateL( EAknIndicatorTTY, EAknIndicatorStateOff ); |
|
2527 |
SetIndicatorStateL( EAknIndicatorHeadset, EAknIndicatorStateOff ); |
|
2528 |
SetIndicatorStateL( EAknIndicatorHeadsetUnavailable, EAknIndicatorStateOff ); |
|
2529 |
SetIndicatorStateL( EAknIndicatorCarkit, EAknIndicatorStateOff ); |
|
2530 |
SetIndicatorStateL( EAknIndicatorTvOut, EAknIndicatorStateOff ); |
|
2531 |
SetIndicatorStateL( EAknIndicatorHDMI, EAknIndicatorStateOff ); |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2532 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2533 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2534 |
else |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2535 |
{ |
63 | 2536 |
SetIndicatorStateL( EAknIndicatorIHFActive, EAknIndicatorStateOff ); |
2537 |
} |
|
2538 |
} |
|
2539 |
||
2540 |
// ---------------------------------------------------------------------------- |
|
2541 |
// CSysApAppUi::HandleSmsStorageNotificationL( TBool aSimStoreFull ) |
|
2542 |
// ---------------------------------------------------------------------------- |
|
2543 |
||
2544 |
void CSysApAppUi::HandleSmsStorageNotificationL( TBool aSimStoreFull ) |
|
2545 |
{ |
|
2546 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleSmsStorageNotificationL: aSimStoreFull: %d "), aSimStoreFull ) ); |
|
2547 |
||
2548 |
if ( aSimStoreFull ) |
|
2549 |
{ |
|
2550 |
HBufC* noteStringBuf; |
|
2551 |
noteStringBuf = StringLoader::LoadLC( R_QTN_MEMLO_MEMORY_LOW_SIM_MES, iEikonEnv ); |
|
2552 |
TPtr textBuffer = noteStringBuf->Des(); |
|
2553 |
iSysApMsgSimMemLowQuery->StartL( textBuffer ); |
|
2554 |
CleanupStack::PopAndDestroy(); |
|
2555 |
} |
|
2556 |
||
2557 |
SetEnvelopeIndicatorL(); |
|
2558 |
} |
|
2559 |
||
2560 |
// ---------------------------------------------------------------------------- |
|
2561 |
// CSysApAppUi::HandleNspsRawKeyEventL() |
|
2562 |
// ---------------------------------------------------------------------------- |
|
2563 |
||
2564 |
void CSysApAppUi::HandleNspsRawKeyEventL() |
|
2565 |
{ |
|
2566 |
#ifdef __SYSAP_MODULE_TEST |
|
2567 |
ModuleTestShowUiNoteL( _L("Network wakeup from NSPS") ); |
|
2568 |
#endif |
|
2569 |
||
2570 |
if ( iSysApEtelConnector ) |
|
2571 |
{ |
|
2572 |
iSysApEtelConnector->CommandNetCsWakeupOnNsps(); |
|
2573 |
} |
|
2574 |
} |
|
2575 |
||
2576 |
// ---------------------------------------------------------------------------- |
|
2577 |
// CSysApAppUi::HandleNetworkNspsNotification( RMmCustomAPI::TNspsStatus aNspsStatus ) |
|
2578 |
// ---------------------------------------------------------------------------- |
|
2579 |
||
2580 |
void CSysApAppUi::HandleNetworkNspsNotification( RMmCustomAPI::TNspsStatus aNspsStatus ) |
|
2581 |
{ |
|
2582 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleNetworkNspsNotification aNspsStatus:%d, iNsps:%d )" ), aNspsStatus, iNsps ) ); |
|
2583 |
if( iSysApNspsHandler ) |
|
2584 |
{ |
|
2585 |
if( aNspsStatus == RMmCustomAPI::ENspsOn ) |
|
2586 |
{ |
|
2587 |
if( !iNsps ) |
|
2588 |
{ |
|
2589 |
#ifdef __SYSAP_MODULE_TEST |
|
2590 |
TRAPD( err, ModuleTestShowUiNoteL( _L("Setting NSPS on") ) ); |
|
2591 |
#endif |
|
2592 |
iSysApNspsHandler->SetNspsOn(); |
|
2593 |
iNsps = ETrue; |
|
2594 |
} |
|
2595 |
} |
|
2596 |
else if( aNspsStatus == RMmCustomAPI::ENspsOff ) |
|
2597 |
{ |
|
2598 |
if( iNsps ) |
|
2599 |
{ |
|
2600 |
#ifdef __SYSAP_MODULE_TEST |
|
2601 |
TRAPD( err, ModuleTestShowUiNoteL( _L("Setting NSPS off") ) ); |
|
2602 |
#endif |
|
2603 |
iSysApNspsHandler->SetNspsOff(); |
|
2604 |
iNsps = EFalse; |
|
2605 |
} |
|
2606 |
} |
|
2607 |
} |
|
2608 |
} |
|
2609 |
||
2610 |
// ---------------------------------------------------------------------------- |
|
2611 |
// CSysApAppUi::HandleMessageTonePlayingQuitability( TInt aTonePlayingStatus ) |
|
2612 |
// ---------------------------------------------------------------------------- |
|
2613 |
||
2614 |
void CSysApAppUi::HandleMessageTonePlayingQuitability( TInt aTonePlayingStatus ) |
|
2615 |
{ |
|
2616 |
if( iSysApNspsHandler ) |
|
2617 |
{ |
|
2618 |
if( aTonePlayingStatus == ECoreAppUIsStopTonePlaying ) |
|
2619 |
{ |
|
2620 |
iSysApNspsHandler->SetMessageToneNotPlaying(); |
|
2621 |
} |
|
2622 |
else if( aTonePlayingStatus == ECoreAppUIsTonePlaying ) |
|
2623 |
{ |
|
2624 |
iSysApNspsHandler->SetMessageTonePlaying(); |
|
2625 |
} |
|
2626 |
} |
|
2627 |
} |
|
2628 |
||
2629 |
// ---------------------------------------------------------------------------- |
|
2630 |
// CSysApAppUi::ActivateKeyeventForwardingForLights() |
|
2631 |
// ---------------------------------------------------------------------------- |
|
2632 |
||
2633 |
void CSysApAppUi::ActivateKeyeventForwardingForLights(TBool aActivate) |
|
2634 |
{ |
|
2635 |
if( iSysApNspsHandler ) |
|
2636 |
{ |
|
2637 |
if ( aActivate ) |
|
2638 |
{ |
|
2639 |
iSysApNspsHandler->ActivateKeyeventForwardingForLights(); |
|
2640 |
} |
|
2641 |
else |
|
2642 |
{ |
|
2643 |
iSysApNspsHandler->DeActivateKeyeventForwardingForLights(); |
|
2644 |
} |
|
2645 |
} |
|
2646 |
} |
|
2647 |
||
2648 |
// ---------------------------------------------------------------------------- |
|
2649 |
// CSysApAppUi::StartShutDownTimerOnAlarmAndChargingStates() |
|
2650 |
// ---------------------------------------------------------------------------- |
|
2651 |
||
2652 |
void CSysApAppUi::StartShutDownTimerOnAlarmAndChargingStates() |
|
2653 |
{ |
|
2654 |
if( !iAlarmOrChargingStateShutdownStarted ) |
|
2655 |
{ |
|
2656 |
if ( !iTimer ) |
|
2657 |
{ |
|
2658 |
TRAPD( err, iTimer = CPeriodic::NewL( EPriorityNormal ) ); |
|
2659 |
||
2660 |
if ( err != KErrNone ) |
|
2661 |
{ |
|
2662 |
TRACES( RDebug::Print( _L("CSysApAppUi::StartShutDownTimerOnAlarmAndChargingStates: CPeriodic::NewL failed: %d"), err ) ); |
|
2663 |
return; |
|
2664 |
} |
|
2665 |
} |
|
2666 |
iTimer->Cancel(); |
|
2667 |
iTimer->Start( KDelayBeforeShuttingDownInAlarmAndChargingStates, |
|
2668 |
KDelayBeforeShuttingDownInAlarmAndChargingStates, |
|
2669 |
TCallBack( DoShutdownOnAlarmStateAfterCallBack, this ) ); |
|
2670 |
iAlarmOrChargingStateShutdownStarted = ETrue; |
|
2671 |
} |
|
2672 |
} |
|
2673 |
||
2674 |
// ---------------------------------------------------------------------------- |
|
2675 |
// CSysApAppUi::DoShutdownOnAlarmStateAfterCallBack( TAny* aObject ) |
|
2676 |
// ---------------------------------------------------------------------------- |
|
2677 |
||
2678 |
TInt CSysApAppUi::DoShutdownOnAlarmStateAfterCallBack( TAny* aObject ) |
|
2679 |
{ |
|
2680 |
CSysApAppUi* appUi = STATIC_CAST( CSysApAppUi*, aObject ); |
|
2681 |
||
2682 |
if ( appUi->iTimer ) |
|
2683 |
{ |
|
2684 |
appUi->iTimer->Cancel(); |
|
2685 |
} |
|
2686 |
||
2687 |
TRAP_IGNORE( appUi->DoShutdownL( EFalse, KDummyReason ) ); |
|
2688 |
||
2689 |
return KErrNone; |
|
2690 |
} |
|
2691 |
||
2692 |
#ifndef RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
2693 |
// ---------------------------------------------------------------------------- |
|
2694 |
// CSysApAppUi::StartAnimTiming() |
|
2695 |
// ---------------------------------------------------------------------------- |
|
2696 |
void CSysApAppUi::StartAnimTiming() |
|
2697 |
{ |
|
2698 |
TRACES( RDebug::Print( _L("CSysApAppUi::StartAnimTiming() Start animation timer, time %d ms" ), iAnimationShowingTime ) ); |
|
2699 |
||
2700 |
if ( !iAnimTimer ) |
|
2701 |
{ |
|
2702 |
TRAPD( err, iAnimTimer = CPeriodic::NewL( EPriorityNormal ) ); |
|
2703 |
||
2704 |
if ( err != KErrNone ) |
|
2705 |
{ |
|
2706 |
TRACES( RDebug::Print( _L("CSysApAppUi::StartAnimTiming() CPeriodic::NewL failed %d " ), err ) ); |
|
2707 |
return; |
|
2708 |
} |
|
2709 |
} |
|
2710 |
||
2711 |
iAnimTimer->Start( |
|
2712 |
iAnimationShowingTime*KCoefficientToMakeMicroToMilliSeconds, |
|
2713 |
iAnimationShowingTime*KCoefficientToMakeMicroToMilliSeconds, |
|
2714 |
TCallBack( DoStopAnimTiming, this ) ); |
|
2715 |
} |
|
2716 |
#endif // RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
2717 |
||
2718 |
// ---------------------------------------------------------------------------- |
|
2719 |
// CSysApAppUi::DoStopAnimTiming( TAny* aObject ) |
|
2720 |
// ---------------------------------------------------------------------------- |
|
2721 |
||
2722 |
TInt CSysApAppUi::DoStopAnimTiming( TAny* aObject ) |
|
2723 |
{ |
|
2724 |
TInt err(KErrNone); |
|
2725 |
CSysApAppUi* appUi = STATIC_CAST( CSysApAppUi*, aObject ); |
|
2726 |
||
2727 |
// This method could theoretically be called by two timers (iAnimTimer and one in CSysApShutdownAnimation), |
|
2728 |
// so a check is needed to prevent multiple executions. |
|
2729 |
if ( !(appUi->iShutdownContinued) ) |
|
2730 |
{ |
|
2731 |
appUi->iShutdownContinued = ETrue; |
|
2732 |
||
2733 |
TRACES( RDebug::Print( _L("CSysApAppUi::DoStopAnimTiming() Animation timer completed or animation skipped" ) ) ); |
|
2734 |
||
2735 |
#ifndef RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
2736 |
if ( appUi->iAnimTimer ) |
|
2737 |
{ |
|
2738 |
appUi->iAnimTimer->Cancel(); |
|
2739 |
} |
|
2740 |
#endif // RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
2741 |
||
2742 |
if ( appUi->iTimer ) |
|
2743 |
{ |
|
2744 |
appUi->iTimer->Cancel(); |
|
2745 |
} |
|
2746 |
||
2747 |
TRACES( RDebug::Print( _L("CSysApAppUi::DoStopAnimTiming() Call ContinueShutdown(...)" ) ) ); |
|
2748 |
appUi->ContinueShutdown(); |
|
2749 |
TRACES( RDebug::Print( _L("CSysApAppUi::DoStopAnimTiming() end") ) ); |
|
2750 |
} |
|
2751 |
||
2752 |
return err; |
|
2753 |
} |
|
2754 |
||
2755 |
||
2756 |
// ---------------------------------------------------------------------------- |
|
2757 |
// CSysApAppUi::StartGprsSuspendedTimer() |
|
2758 |
// ---------------------------------------------------------------------------- |
|
2759 |
||
2760 |
void CSysApAppUi::StartGprsSuspendedTimer() |
|
2761 |
{ |
|
2762 |
TRACES( RDebug::Print( _L("CSysApAppUi::StartGprsSuspendedTimer()") ) ); |
|
2763 |
if( !iAlarmOrChargingStateShutdownStarted ) // not relevant if shutting down |
|
2764 |
{ |
|
2765 |
if ( !iTimer ) |
|
2766 |
{ |
|
2767 |
TRAPD( err, iTimer = CPeriodic::NewL( EPriorityNormal ) ); |
|
2768 |
||
2769 |
if ( err != KErrNone ) |
|
2770 |
{ |
|
2771 |
TRACES( RDebug::Print( _L("CSysApAppUi::StartGprsSuspendedTimer: CPeriodic::NewL failed: %d"), err ) ); |
|
2772 |
return; |
|
2773 |
} |
|
2774 |
} |
|
2775 |
||
2776 |
iTimer->Cancel(); |
|
2777 |
iTimer->Start( KDelayBeforeShowingGprsSuspendedNote, |
|
2778 |
KDelayBeforeShowingGprsSuspendedNote, |
|
2779 |
TCallBack( ShowGprsSuspendedNoteAfterCallBack, this ) ); |
|
2780 |
} |
|
2781 |
} |
|
2782 |
||
2783 |
// ---------------------------------------------------------------------------- |
|
2784 |
// CSysApAppUi::ShowGprsSuspendedNoteAfterCallBack( TAny* aObject ) |
|
2785 |
// ---------------------------------------------------------------------------- |
|
2786 |
||
2787 |
TInt CSysApAppUi::ShowGprsSuspendedNoteAfterCallBack( TAny* aObject ) |
|
2788 |
{ |
|
2789 |
TRACES( RDebug::Print( _L("CSysApAppUi::ShowGprsSuspendedNoteAfterCallBack") ) ); |
|
2790 |
||
2791 |
CSysApAppUi* appUi = STATIC_CAST( CSysApAppUi*, aObject ); |
|
2792 |
||
2793 |
if ( appUi->iTimer ) |
|
2794 |
{ |
|
2795 |
appUi->iTimer->Cancel(); |
|
2796 |
} |
|
2797 |
||
2798 |
// Note is needed if call is still active and used network is not WCDMA |
|
2799 |
TInt callType = appUi->StateOfProperty( KPSUidCtsyCallInformation, KCTsyCallType ); |
|
2800 |
TInt networkMode = appUi->StateOfProperty( KPSUidNetworkInfo, KNWTelephonyNetworkMode ); |
|
2801 |
TRACES( RDebug::Print( |
|
2802 |
_L("CSysApAppUi::ShowGprsSuspendedNoteAfterCallBack: callType %d networkMode %d"), |
|
2803 |
callType, networkMode ) ); |
|
2804 |
if ( EPSCTsyCallTypeCSVoice == callType && ENWNetworkModeWcdma != networkMode ) |
|
2805 |
{ |
|
2806 |
appUi->iGprsSuspendedNoteShown = ETrue; |
|
2807 |
} |
|
2808 |
return KErrNone; |
|
2809 |
} |
|
2810 |
||
2811 |
// ---------------------------------------------------------------------------- |
|
2812 |
// CSysApAppUi::HandleAccessoryConnectedL() |
|
2813 |
// ---------------------------------------------------------------------------- |
|
2814 |
||
2815 |
void CSysApAppUi::HandleAccessoryConnectedL( TAccMode aAccessoryState ) |
|
2816 |
{ |
|
2817 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleAccessoryConnectedL( aAccessoryState: %d ) "), aAccessoryState ) ); |
|
2818 |
||
2819 |
if ( aAccessoryState == EAccModeWirelessHeadset || |
|
2820 |
aAccessoryState == EAccModeWiredHeadset || |
|
2821 |
aAccessoryState == EAccModeHeadphones ) |
|
2822 |
{ |
|
2823 |
SetIndicatorStateL( EAknIndicatorLoopset, EAknIndicatorStateOff ); |
|
2824 |
SetIndicatorStateL( EAknIndicatorTTY, EAknIndicatorStateOff ); |
|
2825 |
SetIndicatorStateL( EAknIndicatorHeadset, EAknIndicatorStateOn ); |
|
2826 |
SetIndicatorStateL( EAknIndicatorHeadsetUnavailable, EAknIndicatorStateOff ); |
|
2827 |
SetIndicatorStateL( EAknIndicatorCarkit, EAknIndicatorStateOff ); |
|
2828 |
SetIndicatorStateL( EAknIndicatorTvOut, EAknIndicatorStateOff ); |
|
2829 |
SetIndicatorStateL( EAknIndicatorHDMI, EAknIndicatorStateOff ); |
|
2830 |
} |
|
2831 |
else if ( aAccessoryState == EAccModeLoopset ) |
|
2832 |
{ |
|
2833 |
SetIndicatorStateL( EAknIndicatorHeadset, EAknIndicatorStateOff ); |
|
2834 |
SetIndicatorStateL( EAknIndicatorTTY, EAknIndicatorStateOff ); |
|
2835 |
SetIndicatorStateL( EAknIndicatorLoopset, EAknIndicatorStateOn ); |
|
2836 |
SetIndicatorStateL( EAknIndicatorHeadsetUnavailable, EAknIndicatorStateOff ); |
|
2837 |
SetIndicatorStateL( EAknIndicatorCarkit, EAknIndicatorStateOff ); |
|
2838 |
SetIndicatorStateL( EAknIndicatorTvOut, EAknIndicatorStateOff ); |
|
2839 |
SetIndicatorStateL( EAknIndicatorHDMI, EAknIndicatorStateOff ); |
|
2840 |
} |
|
2841 |
else if ( aAccessoryState == EAccModeTextDevice ) |
|
2842 |
{ |
|
2843 |
SetIndicatorStateL( EAknIndicatorHeadset, EAknIndicatorStateOff ); |
|
2844 |
SetIndicatorStateL( EAknIndicatorLoopset, EAknIndicatorStateOff ); |
|
2845 |
SetIndicatorStateL( EAknIndicatorTTY, EAknIndicatorStateOn ); |
|
2846 |
SetIndicatorStateL( EAknIndicatorHeadsetUnavailable, EAknIndicatorStateOff ); |
|
2847 |
SetIndicatorStateL( EAknIndicatorCarkit, EAknIndicatorStateOff ); |
|
2848 |
SetIndicatorStateL( EAknIndicatorTvOut, EAknIndicatorStateOff ); |
|
2849 |
SetIndicatorStateL( EAknIndicatorHDMI, EAknIndicatorStateOff ); |
|
2850 |
} |
|
2851 |
else if ( aAccessoryState == EAccModeWirelessCarKit || aAccessoryState == EAccModeWiredCarKit ) |
|
2852 |
{ |
|
2853 |
SetIndicatorStateL( EAknIndicatorHeadset, EAknIndicatorStateOff ); |
|
2854 |
SetIndicatorStateL( EAknIndicatorLoopset, EAknIndicatorStateOff ); |
|
2855 |
SetIndicatorStateL( EAknIndicatorTTY, EAknIndicatorStateOff ); |
|
2856 |
SetIndicatorStateL( EAknIndicatorHeadsetUnavailable, EAknIndicatorStateOff ); |
|
2857 |
SetIndicatorStateL( EAknIndicatorCarkit, EAknIndicatorStateOn ); |
|
2858 |
SetIndicatorStateL( EAknIndicatorTvOut, EAknIndicatorStateOff ); |
|
2859 |
SetIndicatorStateL( EAknIndicatorHDMI, EAknIndicatorStateOff ); |
|
2860 |
} |
|
2861 |
else if ( aAccessoryState == EAccModeTVOut ) |
|
2862 |
{ |
|
2863 |
SetIndicatorStateL( EAknIndicatorHeadset, EAknIndicatorStateOff ); |
|
2864 |
SetIndicatorStateL( EAknIndicatorLoopset, EAknIndicatorStateOff ); |
|
2865 |
SetIndicatorStateL( EAknIndicatorTTY, EAknIndicatorStateOff ); |
|
2866 |
SetIndicatorStateL( EAknIndicatorHeadsetUnavailable, EAknIndicatorStateOff ); |
|
2867 |
SetIndicatorStateL( EAknIndicatorCarkit, EAknIndicatorStateOff ); |
|
2868 |
SetIndicatorStateL( EAknIndicatorTvOut, EAknIndicatorStateOn ); |
|
2869 |
SetIndicatorStateL( EAknIndicatorHDMI, EAknIndicatorStateOff ); |
|
2870 |
} |
|
2871 |
else if (aAccessoryState == EAccModeHDMI ) |
|
2872 |
{ |
|
2873 |
SetIndicatorStateL( EAknIndicatorHeadset, EAknIndicatorStateOff ); |
|
2874 |
SetIndicatorStateL( EAknIndicatorLoopset, EAknIndicatorStateOff ); |
|
2875 |
SetIndicatorStateL( EAknIndicatorTTY, EAknIndicatorStateOff ); |
|
2876 |
SetIndicatorStateL( EAknIndicatorHeadsetUnavailable, EAknIndicatorStateOff ); |
|
2877 |
SetIndicatorStateL( EAknIndicatorCarkit, EAknIndicatorStateOff ); |
|
2878 |
SetIndicatorStateL( EAknIndicatorTvOut, EAknIndicatorStateOff); |
|
2879 |
SetIndicatorStateL( EAknIndicatorHDMI, EAknIndicatorStateOn ); |
|
2880 |
} |
|
2881 |
||
2882 |
TInt swState( StateOfProperty( KPSUidStartup, KPSGlobalSystemState ) ); |
|
2883 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleAccessoryConnectedL: swState: %d"), swState ) ); |
|
2884 |
||
2885 |
if( UiReady() || swState == ESwStateSecurityCheck ) |
|
2886 |
{ |
|
2887 |
iSysApLightsController->AccessoryConnectedL( ETrue ); |
|
2888 |
} |
|
2889 |
||
2890 |
if ( ( ! iIgnoreAccessorySpecificProfileChanges ) && ( ! iSysApOfflineModeController->OfflineModeActive() ) ) |
|
2891 |
{ |
|
2892 |
TInt profileId( 0 ); |
|
2893 |
TInt currentProfile( 0 ); |
|
2894 |
currentProfile = ActiveProfileId(); |
|
2895 |
||
2896 |
if ( iSysApCenRepController->GetInt( KCRUidCoreApplicationUIsSysAp, KSysApAccessoryConnected ) < 1 ) |
|
2897 |
// accessory not connected already |
|
2898 |
{ |
|
2899 |
iSysApCenRepController->SetInt( KCRUidCoreApplicationUIsSysAp, KSysApAccessoryConnected, 1 ); |
|
2900 |
iSysApCenRepController->SetInt( KCRUidCoreApplicationUIsSysAp, KSysApActiveProfileBeforeAccessoryConnected, currentProfile ); |
|
2901 |
} |
|
2902 |
||
2903 |
if ( aAccessoryState == EAccModeWirelessCarKit ) |
|
2904 |
{ |
|
2905 |
profileId = iSysApCenRepController->ProfileIdForSelectedAccessory( ESysApWirelessCarkit ); |
|
2906 |
} |
|
2907 |
else if( aAccessoryState == EAccModeWiredHeadset || |
|
2908 |
aAccessoryState == EAccModeWirelessHeadset ) |
|
2909 |
{ |
|
2910 |
profileId = iSysApCenRepController->ProfileIdForSelectedAccessory( ESysApHeadset ); |
|
2911 |
} |
|
2912 |
else if( aAccessoryState == EAccModeLoopset ) |
|
2913 |
{ |
|
2914 |
profileId = iSysApCenRepController->ProfileIdForSelectedAccessory( ESysApLoopset ); |
|
2915 |
} |
|
2916 |
else if( aAccessoryState == EAccModeTextDevice ) |
|
2917 |
{ |
|
2918 |
profileId = iSysApCenRepController->ProfileIdForSelectedAccessory( ESysApTty ); |
|
2919 |
} |
|
2920 |
else if( aAccessoryState == EAccModeTVOut || aAccessoryState == EAccModeHDMI ) |
|
2921 |
{ |
|
2922 |
profileId = iSysApCenRepController->ProfileIdForSelectedAccessory( ESysApTvOut ); |
|
2923 |
} |
|
2924 |
else if( aAccessoryState == EAccModeHeadphones ) |
|
2925 |
{ |
|
2926 |
profileId = iSysApCenRepController->ProfileIdForSelectedAccessory( ESysApHeadphones ); |
|
2927 |
} |
|
2928 |
else if ( aAccessoryState == EAccModeWiredCarKit ) |
|
2929 |
{ |
|
2930 |
profileId = iSysApCenRepController->ProfileIdForSelectedAccessory( ESysApCarkit ); |
|
2931 |
} |
|
2932 |
else if ( aAccessoryState == EAccModeMusicStand ) |
|
2933 |
{ |
|
2934 |
profileId = iSysApCenRepController->ProfileIdForSelectedAccessory( ESysApMusicStand ); |
|
2935 |
} |
|
2936 |
||
2937 |
// Carkit and music stand have also light on permanently option that needs to be checked |
|
2938 |
if( aAccessoryState == EAccModeWiredCarKit || aAccessoryState == EAccModeMusicStand ) |
|
2939 |
{ |
|
2940 |
// When device is placed on a handsfree cradle, keyguard must be disabled (unless device is locked) |
|
2941 |
// Note: It is assumed that if carkit/music stand is connected, the phone is in the cradle. |
|
2942 |
if ( iKeyLockEnabled || iDeviceLockEnabled || iKeyLockOnBeforeCall || iKeyLockOnBeforeAlarm ) |
|
2943 |
{ |
|
2944 |
iKeyLockOnBeforeCradle = ETrue; |
|
2945 |
||
2946 |
if ( iKeyLockEnabled && !iDeviceLockEnabled ) |
|
2947 |
{ |
|
2948 |
KeyLock().DisableWithoutNote(); |
|
2949 |
} |
|
2950 |
} |
|
2951 |
} |
|
2952 |
||
2953 |
if( profileId != KActiveProfile ) |
|
2954 |
{ |
|
2955 |
/*-1 because the first item in Accessory default profiles shared data values |
|
2956 |
is KActiveProfile and that must be subtracted from the index of profile to be activated*/ |
|
2957 |
||
2958 |
profileId -= 1; |
|
2959 |
||
2960 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleAccessoryConnectedL: current profile: %d, accessory profile: %d" ), |
|
2961 |
currentProfile, profileId ) ); |
|
2962 |
||
2963 |
if ( profileId != currentProfile ) |
|
2964 |
{ |
|
2965 |
iAccessoryJustConnected = ETrue; |
|
2966 |
iSysApCenRepController->SetInt( KCRUidCoreApplicationUIsSysAp, KSysApProfileUpdateRequired, 1 ); |
|
2967 |
ActivateProfileL( profileId ); |
|
2968 |
} |
|
2969 |
} |
|
2970 |
} |
|
2971 |
SetIhfIndicatorL(); |
|
2972 |
SetHacIndicatorL(); |
|
2973 |
} |
|
2974 |
||
2975 |
// ---------------------------------------------------------------------------- |
|
2976 |
// CSysApAppUi::HandleAccessoryDisconnectedL() |
|
2977 |
// ---------------------------------------------------------------------------- |
|
2978 |
||
2979 |
void CSysApAppUi::HandleAccessoryDisconnectedL() |
|
2980 |
{ |
|
2981 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleAccessoryDisconnectedL()" ) ) ); |
|
2982 |
||
2983 |
||
2984 |
TAccMode accessoryState(EAccModeHandPortable); |
|
2985 |
if ( iSysApAccessoryObserver ) |
|
2986 |
{ |
|
2987 |
accessoryState = iSysApAccessoryObserver->GetAccessoryMode(); |
|
2988 |
} |
|
2989 |
||
2990 |
if ( accessoryState == EAccModeHandPortable ) |
|
2991 |
{ |
|
2992 |
SetIndicatorStateL( EAknIndicatorTvOut, EAknIndicatorStateOff ); |
|
2993 |
SetIndicatorStateL( EAknIndicatorLoopset, EAknIndicatorStateOff ); |
|
2994 |
SetIndicatorStateL( EAknIndicatorHeadset, EAknIndicatorStateOff ); |
|
2995 |
SetIndicatorStateL( EAknIndicatorTTY, EAknIndicatorStateOff ); |
|
2996 |
SetIndicatorStateL( EAknIndicatorHeadsetUnavailable, EAknIndicatorStateOff ); |
|
2997 |
SetIndicatorStateL( EAknIndicatorCarkit, EAknIndicatorStateOff ); |
|
2998 |
SetIndicatorStateL( EAknIndicatorHDMI, EAknIndicatorStateOff ); |
|
2999 |
||
3000 |
iSysApLightsController->AccessoryConnectedL( EFalse ); |
|
3001 |
||
3002 |
if ( ! iIgnoreAccessorySpecificProfileChanges ) |
|
3003 |
{ |
|
3004 |
TInt activeProfile ( ActiveProfileId() ); |
|
3005 |
||
3006 |
TInt activeProfileBeforeConnectingAccessory( |
|
3007 |
iSysApCenRepController->GetInt( KCRUidCoreApplicationUIsSysAp, KSysApActiveProfileBeforeAccessoryConnected ) |
|
3008 |
); |
|
3009 |
if ( activeProfileBeforeConnectingAccessory < 0 ) // error |
|
3010 |
{ |
|
3011 |
activeProfileBeforeConnectingAccessory = 0; // General Profile |
|
3012 |
} |
|
3013 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleAccessoryDisconnectedL: active profile now: %d, active profile before: %d," ), |
|
3014 |
activeProfile, activeProfileBeforeConnectingAccessory ) ); |
|
3015 |
||
3016 |
if ( iSysApCenRepController->GetInt( KCRUidCoreApplicationUIsSysAp, KSysApProfileUpdateRequired ) == 1 ) |
|
3017 |
{ |
|
3018 |
iSysApCenRepController->SetInt( KCRUidCoreApplicationUIsSysAp, KSysApProfileUpdateRequired, 0 ); |
|
3019 |
if ( activeProfile != activeProfileBeforeConnectingAccessory && ! iSysApOfflineModeController->OfflineModeActive() ) |
|
3020 |
{ |
|
3021 |
ActivateProfileL( activeProfileBeforeConnectingAccessory ); |
|
3022 |
} |
|
3023 |
} |
|
3024 |
iSysApCenRepController->SetInt( KCRUidCoreApplicationUIsSysAp, KSysApAccessoryConnected, 0 ); |
|
3025 |
} |
|
3026 |
} |
|
3027 |
||
3028 |
SetIhfIndicatorL(); |
|
3029 |
SetHacIndicatorL(); |
|
3030 |
||
3031 |
// If lock disabled because of accessory, reactivate it, unless phone call or alarm is ongoing |
|
3032 |
if ( iKeyLockOnBeforeCradle ) |
|
3033 |
{ |
|
3034 |
iKeyLockOnBeforeCradle = EFalse; |
|
3035 |
if ( !iKeyLockOnBeforeCall && !iKeyLockOnBeforeAlarm ) |
|
3036 |
{ |
|
3037 |
if ( !iDeviceLockEnabled ) |
|
3038 |
{ |
|
3039 |
KeyLock().EnableKeyLock(); |
|
3040 |
} |
|
3041 |
else |
|
3042 |
{ |
|
3043 |
KeyLock().EnableAutoLockEmulation(); |
|
3044 |
} |
|
3045 |
} |
|
3046 |
} |
|
3047 |
} |
|
3048 |
||
3049 |
// ---------------------------------------------------------------------------- |
|
3050 |
// CSysApAppUi::HandleAccessoryProfileInStartupL() |
|
3051 |
// ---------------------------------------------------------------------------- |
|
3052 |
||
3053 |
void CSysApAppUi::HandleAccessoryProfileInStartupL() |
|
3054 |
{ |
|
3055 |
TRACES( RDebug::Print( _L( "CSysApAppUi::HandleAccessoryProfileInStartupL" ) ) ); |
|
3056 |
||
3057 |
if ( !iSysApOfflineModeController->OfflineModeActive() ) |
|
3058 |
{ |
|
3059 |
iIgnoreAccessorySpecificProfileChanges = EFalse; |
|
3060 |
TBool accessoryConnectedInShutdown( EFalse ); |
|
3061 |
TInt accessoryTemp( iSysApCenRepController->GetInt( KCRUidCoreApplicationUIsSysAp, KSysApAccessoryConnected ) ); |
|
3062 |
if ( accessoryTemp == 1 ) |
|
3063 |
{ |
|
3064 |
accessoryConnectedInShutdown = ETrue; |
|
3065 |
} |
|
3066 |
||
3067 |
TBool accessoryConnectedNow ( EFalse ); |
|
3068 |
||
3069 |
TAccMode accessoryState(EAccModeHandPortable); |
|
3070 |
if ( iSysApAccessoryObserver ) |
|
3071 |
{ |
|
3072 |
accessoryState = iSysApAccessoryObserver->GetAccessoryMode(); |
|
3073 |
} |
|
3074 |
||
3075 |
if ( accessoryState != EAccModeHandPortable ) |
|
3076 |
{ |
|
3077 |
accessoryConnectedNow = ETrue; |
|
3078 |
} |
|
3079 |
TRACES( RDebug::Print( _L( "CSysApAppUi::HandleAccessoryProfileInStartupL: accessoryConnectedInShutdown: %d, accessoryConnectedNow: %d" ), |
|
3080 |
accessoryConnectedInShutdown, accessoryConnectedNow ) ); |
|
3081 |
||
3082 |
if ( accessoryConnectedInShutdown && !accessoryConnectedNow ) |
|
3083 |
{ |
|
3084 |
HandleAccessoryDisconnectedL(); |
|
3085 |
} |
|
3086 |
else if ( !accessoryConnectedInShutdown && accessoryConnectedNow ) |
|
3087 |
{ |
|
3088 |
HandleAccessoryConnectedL( accessoryState ); |
|
3089 |
} |
|
3090 |
else if ( !accessoryConnectedNow ) |
|
3091 |
{ |
|
3092 |
TInt activeProfile ( ActiveProfileId() ); |
|
3093 |
iSysApCenRepController->SetInt( KCRUidCoreApplicationUIsSysAp, KSysApActiveProfileBeforeAccessoryConnected, activeProfile ); |
|
3094 |
} |
|
3095 |
} |
|
3096 |
} |
|
3097 |
||
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
3098 |
#ifndef RD_MULTIPLE_DRIVE |
63 | 3099 |
|
3100 |
// ---------------------------------------------------------------------------- |
|
3101 |
// CSysApAppUi::ResolveUidFromThread() |
|
3102 |
// ---------------------------------------------------------------------------- |
|
3103 |
TInt32 CSysApAppUi::ResolveUidFromThread( TUint aThreadId ) const |
|
3104 |
{ |
|
3105 |
TInt resolvedUid = 0; |
|
3106 |
||
3107 |
RThread appThread; |
|
3108 |
TInt err = appThread.Open( aThreadId ); |
|
3109 |
||
3110 |
if ( err == KErrNone ) |
|
3111 |
{ |
|
3112 |
resolvedUid = appThread.SecureId().iId; |
|
3113 |
} |
|
3114 |
||
3115 |
appThread.Close(); |
|
3116 |
||
3117 |
TRACES( RDebug::Print( _L("CSysApAppUi::ResolveUidFromThread: err=%d, aThreadId=%d, resolvedUid=0x%x"), |
|
3118 |
err, aThreadId, resolvedUid ) ); |
|
3119 |
||
3120 |
return resolvedUid; |
|
3121 |
} |
|
3122 |
||
3123 |
// ---------------------------------------------------------------------------- |
|
3124 |
// CSysApAppUi::CloseUIAppsInHotSwapL() |
|
3125 |
// ---------------------------------------------------------------------------- |
|
3126 |
void CSysApAppUi::CloseUIAppsInHotSwapL() |
|
3127 |
{ |
|
3128 |
TRACES( RDebug::Print( _L("CSysApAppUi::CloseUIAppsInHotSwapL") ) ); |
|
3129 |
||
3130 |
CArrayFixFlat<TInt>* wgIds=new(ELeave) CArrayFixFlat<TInt>(4); |
|
3131 |
CleanupStack::PushL(wgIds); |
|
3132 |
User::LeaveIfError(iCoeEnv->WsSession().WindowGroupList(0, wgIds)); |
|
3133 |
TInt lastEntry=wgIds->Count()-1; |
|
3134 |
TRACES( RDebug::Print( _L( "CSysApAppUi::CloseUIAppsInHotSwapL: Found %d UI applications running." ), lastEntry + 1 ) ); |
|
3135 |
TInt numberOfApplicationsToShutDown( 0 ); |
|
3136 |
iApplicationScanningRoundNumber++; |
|
3137 |
||
3138 |
for ( TInt i=lastEntry; i>=0; i--) |
|
3139 |
{ |
|
3140 |
CApaWindowGroupName* doomedApp = CApaWindowGroupName::NewLC(iCoeEnv->WsSession(),wgIds->At(i)); |
|
3141 |
||
3142 |
TBool systemApp = doomedApp->IsSystem(); |
|
3143 |
TBool hiddenApp = doomedApp->Hidden(); |
|
3144 |
||
3145 |
if ( systemApp || hiddenApp ) |
|
3146 |
{ |
|
3147 |
TRACES ( |
|
3148 |
TPtrC caption=doomedApp->Caption(); |
|
3149 |
RDebug::Print( _L("CSysApAppUi::CloseUIAppsInHotSwapL: Privileged app \"%S\" UID 0x%x will not be closed, system: %d, hidden: %d" ), |
|
3150 |
&caption, |
|
3151 |
doomedApp->AppUid().iUid, |
|
3152 |
systemApp, |
|
3153 |
hiddenApp); |
|
3154 |
); |
|
3155 |
} |
|
3156 |
else if ( ( iFileManagerCloseDisabled && doomedApp->AppUid().iUid == KFileManagerAppUid ) || |
|
3157 |
doomedApp->AppUid().iUid == KAutolockAppUid ) |
|
3158 |
{ |
|
3159 |
// An additional failure protection: Autolock must not be closed in any circumstances |
|
3160 |
TRACES ( |
|
3161 |
TPtrC caption=doomedApp->Caption(); |
|
3162 |
RDebug::Print( _L("CSysApAppUi::CloseUIAppsInHotSwapL: Privileged app \"%S\" will not be closed, UID 0x%x"), |
|
3163 |
&caption, |
|
3164 |
doomedApp->AppUid().iUid ); |
|
3165 |
); |
|
3166 |
} |
|
3167 |
else if ( doomedApp->AppUid().iUid == 0 && !iTimeToKill ) |
|
3168 |
{ |
|
3169 |
#ifdef _DEBUG |
|
3170 |
TApaTask task(iCoeEnv->WsSession()); |
|
3171 |
task.SetWgId(wgIds->At(i)); |
|
3172 |
TUint threadId = (TUint)(task.ThreadId()); |
|
3173 |
TInt32 uid = ResolveUidFromThread( threadId ); |
|
3174 |
// CApaWindowGroupName stores the application UID, and in early application startup state AppUid()-method returns 0 |
|
3175 |
// In order not to accidentally close application that hasn't yet its window group properly set up, decicision whether |
|
3176 |
// to close the application is postponed, in maximum to the end of the waiting period. |
|
3177 |
TRACES ( RDebug::Print( _L("CSysApAppUi::CloseUIAppsInHotSwapL: Unknown app will not be closed yet, threadId=%d, UID 0x%x, size=%d"), |
|
3178 |
threadId, uid, sizeof(TApaTask) ) ); |
|
3179 |
#endif // _DEBUG |
|
3180 |
numberOfApplicationsToShutDown++; // wait note must be displayed |
|
3181 |
} |
|
3182 |
else |
|
3183 |
{ |
|
3184 |
numberOfApplicationsToShutDown++; |
|
3185 |
TApaTask* task = new (ELeave) TApaTask(iCoeEnv->WsSession()); |
|
3186 |
CleanupDeletePushL(task); |
|
3187 |
task->SetWgId(wgIds->At(i)); |
|
3188 |
||
3189 |
TRACES ( |
|
3190 |
const TDesC& caption = doomedApp->Caption(); |
|
3191 |
const TDesC& docname = doomedApp->DocName(); |
|
3192 |
const TDesC& wgname = doomedApp->WindowGroupName(); |
|
3193 |
TUid uid = doomedApp->AppUid(); |
|
3194 |
RDebug::Print( _L("CSysApAppUi::CloseUIAppsInHotSwapL: Closing app \"%S\" (ThreadId %d, WgId %d, UID 0x%X); Docname: %S, WGName : %S"), |
|
3195 |
&caption, |
|
3196 |
(TUint)(task->ThreadId()), |
|
3197 |
wgIds->At(i), |
|
3198 |
uid.iUid, |
|
3199 |
&docname, |
|
3200 |
&wgname); |
|
3201 |
); |
|
3202 |
||
3203 |
ResolveUidFromThread( (TUint)(task->ThreadId()) ); |
|
3204 |
||
3205 |
if ( iApplicationScanningRoundNumber == 1 ) |
|
3206 |
{ |
|
3207 |
task->EndTask(); // applications are kindly requested to close themselves on the first round |
|
3208 |
} |
|
3209 |
else if ( iTimeToKill ) |
|
3210 |
{ |
|
3211 |
TBool doKill = ETrue; |
|
3212 |
||
3213 |
// final check, window group may still be uninitialized so use thread id for checking UID |
|
3214 |
if ( doomedApp->AppUid().iUid == 0 ) |
|
3215 |
{ |
|
3216 |
if ( ResolveUidFromThread( (TUint)(task->ThreadId()) ) == KAutolockAppUid ) |
|
3217 |
{ |
|
3218 |
doKill = EFalse; |
|
3219 |
} |
|
3220 |
} |
|
3221 |
||
3222 |
if ( doKill ) |
|
3223 |
{ |
|
3224 |
TRACES( RDebug::Print( _L("CSysApAppUi::CloseUIAppsInHotSwapL: Killing app \"%S\""), &caption ) ); |
|
3225 |
task->KillTask(); // used after timeout on the last round |
|
3226 |
} |
|
3227 |
} |
|
3228 |
||
3229 |
CleanupStack::PopAndDestroy(); // task |
|
3230 |
} |
|
3231 |
CleanupStack::PopAndDestroy(); // doomedApp |
|
3232 |
} |
|
3233 |
CleanupStack::PopAndDestroy(); // wgIds |
|
3234 |
||
3235 |
if ( numberOfApplicationsToShutDown > 0 && iApplicationScanningRoundNumber <= KMaxExitTimeInHotSwap ) |
|
3236 |
{ |
|
3237 |
TRACES( RDebug::Print( _L("CSysApAppUi::CloseUIAppsInHotSwapL: Show wait note, unless already showing") ) ); |
|
3238 |
if ( !iSysApWaitNote ) |
|
3239 |
{ |
|
3240 |
HBufC* noteStringBuf = StringLoader::LoadLC( R_QTN_MEMC_WAIT_EJECT, iEikonEnv ); |
|
3241 |
iSysApWaitNote = CSysApWaitNote::NewL( iSysApFeatureManager->CoverDisplaySupported() ); |
|
3242 |
iSysApWaitNote->ShowNoteL( EClosingApplicationsNote, noteStringBuf ); |
|
3243 |
CleanupStack::PopAndDestroy(); |
|
3244 |
} |
|
3245 |
||
3246 |
if ( iApplicationScanningRoundNumber >= KMaxExitTimeInHotSwap ) |
|
3247 |
{ |
|
3248 |
iTimeToKill = ETrue; |
|
3249 |
} |
|
3250 |
||
3251 |
if ( !iSysApTimer ) |
|
3252 |
{ |
|
3253 |
iSysApTimer = new ( ELeave ) CSysApTimer( *this ); |
|
3254 |
} |
|
3255 |
||
3256 |
iSysApTimer->ActivateTimerL( KApplicationScanningInterval ); |
|
3257 |
} |
|
3258 |
else |
|
3259 |
{ |
|
3260 |
iFileManagerCloseDisabled = EFalse; |
|
3261 |
CompleteAppsShuttingInHotSwapL(); |
|
3262 |
} |
|
3263 |
} |
|
3264 |
||
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
3265 |
#endif // RD_MULTIPLE_DRIVE |
63 | 3266 |
|
3267 |
// ---------------------------------------------------------------------------- |
|
3268 |
// CSysApAppUi::TimerExpiredL() |
|
3269 |
// ---------------------------------------------------------------------------- |
|
3270 |
void CSysApAppUi::TimerExpiredL() |
|
3271 |
{ |
|
3272 |
#ifndef RD_MULTIPLE_DRIVE |
|
3273 |
CloseUIAppsInHotSwapL(); |
|
3274 |
#endif // RD_MULTIPLE_DRIVE |
|
3275 |
} |
|
3276 |
||
3277 |
#ifndef RD_MULTIPLE_DRIVE |
|
3278 |
// ---------------------------------------------------------------------------- |
|
3279 |
// CSysApAppUi::CompleteAppsShuttingInHotSwapL() |
|
3280 |
// ---------------------------------------------------------------------------- |
|
3281 |
void CSysApAppUi::CompleteAppsShuttingInHotSwapL() |
|
3282 |
{ |
|
3283 |
TRACES( RDebug::Print( _L("CSysApAppUi::CompleteAppsShuttingInHotSwapL iMMCEjectUsed=%d, iMMCInserted=%d"), iMMCEjectUsed, iMMCInserted ) ); |
|
3284 |
CancelWaitNote(); |
|
3285 |
||
3286 |
if ( iMMCEjectUsed ) // From Powerkey Menu |
|
3287 |
{ |
|
3288 |
DismountMMC(); |
|
3289 |
TRACES( RDebug::Print( _L( "CSysApAppUi::CompleteAppsShuttingInHotSwapL: Show note: Remove MMC and press OK...." ) ) ); |
|
3290 |
ShowQueryL( ESysApRemoveMmcNote ); |
|
3291 |
} |
|
3292 |
else if ( !iMMCInserted ) // The MMC might have been already re-mounted, that's why !iMMCInserted |
|
3293 |
{ |
|
3294 |
ShowMMCDismountedDialogL(); |
|
3295 |
} |
|
3296 |
} |
|
3297 |
#endif // RD_MULTIPLE_DRIVE |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3298 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3299 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3300 |
// CSysApAppUi::InitCloseSimApplicationsL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3301 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3302 |
void CSysApAppUi::InitCloseSimApplicationsL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3303 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3304 |
iApplicationScanningRoundNumberInBtSap = 0; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3305 |
iTimeToKillInBtSap = EFalse; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3306 |
CloseSimApplicationsL(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3307 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3308 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3309 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3310 |
// CSysApAppUi::CloseSimApplicationsL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3311 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3312 |
void CSysApAppUi::CloseSimApplicationsL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3313 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3314 |
iApplicationScanningRoundNumberInBtSap++; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3315 |
TRACES( RDebug::Print( _L("CSysApAppUi::CloseSimApplicationsL: scanning round = %d"), |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3316 |
iApplicationScanningRoundNumberInBtSap ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3317 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3318 |
if ( iApplicationScanningRoundNumberInBtSap == KMaxExitTimeInBtSap ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3319 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3320 |
iTimeToKillInBtSap = ETrue; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3321 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3322 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3323 |
const TInt KNumberOfSimDependantApps( 7 ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3324 |
TUid simDependantAppUid[ KNumberOfSimDependantApps ]; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3325 |
simDependantAppUid[ 0 ] = KSysApGSUid; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3326 |
simDependantAppUid[ 1 ] = KSysApSATUid; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3327 |
simDependantAppUid[ 2 ] = KSysApMailboxUid; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3328 |
simDependantAppUid[ 3 ] = KSysApSpeedDialingUid; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3329 |
simDependantAppUid[ 4 ] = KSysApSimDirectoryUid; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3330 |
simDependantAppUid[ 5 ] = KSysApMCEUid; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3331 |
simDependantAppUid[ 6 ] = KSysApCellBroadcastMessagesUid; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3332 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3333 |
TBool appsExiting( EFalse ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3334 |
TApaTaskList apaTaskList( CCoeEnv::Static()->WsSession() ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3335 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3336 |
for ( TInt i = 0; i < KNumberOfSimDependantApps; i++ ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3337 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3338 |
TApaTask apaTask = apaTaskList.FindApp( simDependantAppUid[ i ] ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3339 |
if ( apaTask.Exists() ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3340 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3341 |
appsExiting = ETrue; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3342 |
if ( iApplicationScanningRoundNumberInBtSap == 1 ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3343 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3344 |
apaTask.EndTask(); // applications are kindly requested to close themselves on the first round |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3345 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3346 |
else if ( iTimeToKillInBtSap ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3347 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3348 |
apaTask.KillTask(); // used after timeout on the last round |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3349 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3350 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3351 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3352 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3353 |
if ( !appsExiting || iTimeToKillInBtSap ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3354 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3355 |
iSysApBtSapController->SimApplicationsClosed(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3356 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3357 |
else |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3358 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3359 |
if ( !iSapTimer ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3360 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3361 |
iSapTimer = CPeriodic::NewL( EPriorityNormal ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3362 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3363 |
iSapTimer->Cancel(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3364 |
iSapTimer->Start( KDelayBeforeNextScanningRound, |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3365 |
KDelayBeforeNextScanningRound, |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3366 |
TCallBack( DoCloseSimApplicationsAfterCallBack, this ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3367 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3368 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3369 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3370 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3371 |
// CSysApAppUi::DoCloseSimApplicationsAfterCallBack |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3372 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3373 |
TInt CSysApAppUi::DoCloseSimApplicationsAfterCallBack( TAny* aObject ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3374 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3375 |
CSysApAppUi* appUi = STATIC_CAST( CSysApAppUi*, aObject ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3376 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3377 |
if ( appUi->iSapTimer ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3378 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3379 |
appUi->iSapTimer->Cancel(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3380 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3381 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3382 |
TRAP_IGNORE( appUi->CloseSimApplicationsL() ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3383 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3384 |
return KErrNone; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3385 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3386 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3387 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3388 |
// CSysApAppUi::AlertUiAlertingL( const TBool aAlerting ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3389 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3390 |
void CSysApAppUi::AlertUiAlertingL( const TBool aAlerting ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3391 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3392 |
TRACES( RDebug::Print( _L("CSysApAppUi::AlertUiAlerting aAlerting:%d"), aAlerting ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3393 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3394 |
if ( aAlerting ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3395 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3396 |
TInt swState; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3397 |
RProperty::Get( KPSUidStartup, KPSGlobalSystemState, swState ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3398 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3399 |
if( swState == ESwStateCharging ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3400 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3401 |
SetStarterState( RStarterSession::EAlarm ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3402 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3403 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3404 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3405 |
iSysApLightsController->AlarmOccuredL( aAlerting ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3406 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3407 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3408 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3409 |
// CSysApAppUi::AlertUiKeyLockOff( const TBool aKeyLockOff ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3410 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3411 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3412 |
void CSysApAppUi::AlertUiKeyLockOff( const TBool aKeyLockOff ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3413 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3414 |
TRACES( RDebug::Print( _L("CSysApAppUi::AlertUiKeyLockOff aKeyLockOff:%d, devicelock:%d"), |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3415 |
aKeyLockOff, iDeviceLockEnabled ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3416 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3417 |
if( aKeyLockOff ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3418 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3419 |
// Notification to release keypad might come several times if e.g. calls are received |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3420 |
if ( !iKeyLockOnBeforeAlarm ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3421 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3422 |
if ( iKeyLockEnabled || iKeyLockOnBeforeCradle || iKeyLockOnBeforeCall ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3423 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3424 |
iKeyLockOnBeforeAlarm = ETrue; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3425 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3426 |
} |
63 | 3427 |
KeyLock().DisableWithoutNote(); |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3428 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3429 |
else |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3430 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3431 |
if (iDeviceLockEnabled) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3432 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3433 |
// Re-enable keylock in devicelock case only if phone call is not ongoing or is |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3434 |
// connected. Otherwise e.g. messages can be read using softkeys during ongoing call. |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3435 |
TInt callState( StateOfProperty( KPSUidCtsyCallInformation, KCTsyCallState ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3436 |
if ( callState == EPSCTsyCallStateNone || callState == EPSCTsyCallStateConnected ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3437 |
{ |
63 | 3438 |
KeyLock().EnableAutoLockEmulation(); |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3439 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3440 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3441 |
else if ( iKeyLockOnBeforeAlarm && !iKeyLockOnBeforeCradle && !iKeyLockOnBeforeCall ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3442 |
{ |
63 | 3443 |
KeyLock().EnableKeyLock(); |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3444 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3445 |
iKeyLockOnBeforeAlarm = EFalse; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3446 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3447 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3448 |
|
63 | 3449 |
// ---------------------------------------------------------------------------- |
3450 |
// CSysApAppUi::HandleLightsRequireL() |
|
3451 |
// ---------------------------------------------------------------------------- |
|
3452 |
||
3453 |
void CSysApAppUi::HandleLightsRequireL() const |
|
3454 |
{ |
|
3455 |
iSysApLightsController->HandleLightsRequireL(); |
|
3456 |
} |
|
3457 |
||
3458 |
// ---------------------------------------------------------------------------- |
|
3459 |
// CSysApAppUi::HandleRawKeyEventLightsRequireL() |
|
3460 |
// ---------------------------------------------------------------------------- |
|
3461 |
||
3462 |
void CSysApAppUi::HandleRawKeyEventLightsRequireL() const |
|
3463 |
{ |
|
3464 |
iSysApLightsController->HandleRawKeyEventLightsRequireL(); |
|
3465 |
} |
|
3466 |
||
3467 |
// ---------------------------------------------------------------------------- |
|
3468 |
// CSysApAppUi::HandleForcedLightsVTRequireL( const TInt aLightParameter ) |
|
3469 |
// ---------------------------------------------------------------------------- |
|
3470 |
||
3471 |
void CSysApAppUi::HandleForcedLightsVTRequireL( const TInt aLightsParameter ) const |
|
3472 |
{ |
|
3473 |
iSysApLightsController->HandleForcedLightsVTRequireL( aLightsParameter ); |
|
3474 |
} |
|
3475 |
||
3476 |
// ---------------------------------------------------------------------------- |
|
3477 |
// CSysApAppUi::HandleForcedLightsSSRequireL( const TInt aLightParameter ) |
|
3478 |
// ---------------------------------------------------------------------------- |
|
3479 |
||
3480 |
void CSysApAppUi::HandleForcedLightsSSRequireL( const TInt aLightsParameter ) const |
|
3481 |
{ |
|
3482 |
iSysApLightsController->HandleForcedLightsSSRequireL( aLightsParameter ); |
|
3483 |
} |
|
3484 |
||
3485 |
// ---------------------------------------------------------------------------- |
|
3486 |
// CSysApAppUi::HandleForcedLightsATCRequireL( const TInt aLightParameter ) |
|
3487 |
// ---------------------------------------------------------------------------- |
|
3488 |
void CSysApAppUi::HandleForcedLightsATCRequireL( const TInt aLightsParameter ) const |
|
3489 |
{ |
|
3490 |
iSysApLightsController->HandleForcedLightsATCRequireL( aLightsParameter ); |
|
3491 |
} |
|
3492 |
||
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3493 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3494 |
// CSysApAppUi::SwitchLightsOnSoftRejectL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3495 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3496 |
void CSysApAppUi::SwitchLightsOnSoftRejectL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3497 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3498 |
iSysApLightsController->SwitchLightsOnSoftRejectL(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3499 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3500 |
|
63 | 3501 |
// ---------------------------------------------------------------------------- |
3502 |
// CSysApAppUi::StateOfProperty() |
|
3503 |
// ---------------------------------------------------------------------------- |
|
3504 |
TInt CSysApAppUi::StateOfProperty( const TUid& aCategory, const TUint aKey ) const |
|
3505 |
{ |
|
3506 |
TInt err( KErrNone ); |
|
3507 |
TInt value( 0 ); |
|
3508 |
err = RProperty::Get( aCategory, aKey, value ); |
|
3509 |
if ( err ) |
|
3510 |
{ |
|
3511 |
TRACES( RDebug::Print( _L("CSysApAppUi::StateOfProperty. RProperty::Get: err=%d"), err ) ); |
|
3512 |
return err; |
|
3513 |
} |
|
3514 |
return value; |
|
3515 |
} |
|
3516 |
||
3517 |
// ---------------------------------------------------------------------------- |
|
3518 |
// CSysApAppUi::BluetoothPowerMode() |
|
3519 |
// ---------------------------------------------------------------------------- |
|
3520 |
TInt CSysApAppUi::BluetoothPowerMode() const |
|
3521 |
{ |
|
3522 |
return iSysApCenRepBtObserver->BluetoothPowerMode(); |
|
3523 |
} |
|
3524 |
||
3525 |
// ---------------------------------------------------------------------------- |
|
3526 |
// CSysApAppUi::ActivateProfileL( const TInt aProfileId ) const |
|
3527 |
// ---------------------------------------------------------------------------- |
|
3528 |
||
3529 |
void CSysApAppUi::ActivateProfileL( const TInt aProfileId ) const |
|
3530 |
{ |
|
3531 |
TRACES( RDebug::Print( _L("CSysApAppUi::ActivateProfile aProfileId: %d"), aProfileId ) ); |
|
3532 |
//No use of returning the Profile error code since it only tells if the activation was succesfull or not. |
|
3533 |
iProfileEngine->SetActiveProfileL( aProfileId ); |
|
3534 |
} |
|
3535 |
||
3536 |
// ---------------------------------------------------------------------------- |
|
3537 |
// CSysApAppUi::ActivateOnlineProfileL() const |
|
3538 |
// ---------------------------------------------------------------------------- |
|
3539 |
||
3540 |
void CSysApAppUi::ActivateOnlineProfileL() const |
|
3541 |
{ |
|
3542 |
ActivateProfileL( iProfileToBeActivated ); |
|
3543 |
} |
|
3544 |
||
3545 |
// ---------------------------------------------------------------------------- |
|
3546 |
// CSysApAppUi::ActiveProfileNameL( TPtr aProfileName ) const |
|
3547 |
// ---------------------------------------------------------------------------- |
|
3548 |
||
3549 |
void CSysApAppUi::ActiveProfileNameL( TPtr aProfileName ) |
|
3550 |
{ |
|
3551 |
TRACES( RDebug::Print( _L("CSysApAppUi::ActiveProfileNameL START") ) ); |
|
3552 |
MProfile* profile = iProfileEngine->ActiveProfileL(); |
|
3553 |
const MProfileName& mProfileName = profile->ProfileName(); |
|
3554 |
aProfileName = mProfileName.Name(); |
|
3555 |
profile->Release(); |
|
3556 |
TRACES( RDebug::Print( _L("CSysApAppUi::ActiveProfileNameL END") ) ); |
|
3557 |
} |
|
3558 |
||
3559 |
// ---------------------------------------------------------------------------- |
|
3560 |
// CSysApAppUi::CheckSilentModeL() |
|
3561 |
// ---------------------------------------------------------------------------- |
|
3562 |
void CSysApAppUi::CheckSilentModeL() |
|
3563 |
{ |
|
3564 |
TBool isSilent( EFalse ); |
|
3565 |
MProfile* profile = iProfileEngine->ActiveProfileL(); |
|
3566 |
isSilent = profile->IsSilent(); |
|
3567 |
profile->Release(); |
|
3568 |
if ( isSilent ) |
|
3569 |
{ |
|
3570 |
TRACES( RDebug::Print( _L("CSysApAppUi::CheckSilentModeL: active profile is SILENT") ) ); |
|
3571 |
iSysApLightsController->SetSilentModeOn( ETrue ); |
|
3572 |
} |
|
3573 |
else |
|
3574 |
{ |
|
3575 |
TRACES( RDebug::Print( _L("CSysApAppUi::CheckSilentModeL: active profile is NOT SILENT") ) ); |
|
3576 |
iSysApLightsController->SetSilentModeOn( EFalse ); |
|
3577 |
} |
|
3578 |
} |
|
3579 |
||
3580 |
// ---------------------------------------------------------------------------- |
|
3581 |
// CSysApAppUi::HandleProfileChangedL( const TInt aValue ) |
|
3582 |
// ---------------------------------------------------------------------------- |
|
3583 |
void CSysApAppUi::HandleProfileChangedL( const TInt aNewProfileId ) |
|
3584 |
{ |
|
3585 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleProfileChangedL: aNewProfileId=%d"), aNewProfileId ) ); |
|
3586 |
CheckSilentModeL(); |
|
3587 |
if ( iHandleNextProfileEvent ) |
|
3588 |
{ |
|
3589 |
if ( iAccessoryJustConnected ) |
|
3590 |
{ |
|
3591 |
iAccessoryJustConnected = EFalse; |
|
3592 |
} |
|
3593 |
else |
|
3594 |
{ |
|
3595 |
// if the user delibarately changes profiles, the selected profile will |
|
3596 |
// remain active after disconnecting an accessory. |
|
3597 |
iSysApCenRepController->SetInt( KCRUidCoreApplicationUIsSysAp, KSysApProfileUpdateRequired, 0 ); |
|
3598 |
} |
|
3599 |
||
3600 |
// Added as a part of REQ 415-6750 : Conditional UI-note for "Activated profile" |
|
3601 |
TInt noNeedToShowTheNote = 0; // if True, then note should not be shown |
|
3602 |
TInt err = KErrNone; |
|
3603 |
||
3604 |
err = RProperty::Get( KPSUidCoreApplicationUIs, KCoreAppUIsProfileActivatedNote, |
|
3605 |
noNeedToShowTheNote ); |
|
3606 |
/* |
|
3607 |
If there occured an error, it is likely caused by the non-existing property. |
|
3608 |
So trying to set it only if no error occured for maintaining the default behavior. |
|
3609 |
*/ |
|
3610 |
if( KErrNone == err ) |
|
3611 |
{ |
|
3612 |
TInt error = RProperty::Set( KPSUidCoreApplicationUIs, KCoreAppUIsProfileActivatedNote, |
|
3613 |
ECoreAppUIsProfileActivatedNoteNotShown ); |
|
3614 |
} |
|
3615 |
||
3616 |
if(!noNeedToShowTheNote) // The value doesn't deny the showing, then... |
|
3617 |
{ |
|
3618 |
ShowProfileNoteL(); |
|
3619 |
} |
|
3620 |
} |
|
3621 |
||
3622 |
if ( aNewProfileId != KOfflineModeProfileId ) |
|
3623 |
{ |
|
3624 |
iActiveProfileBeforeOfflineMode = aNewProfileId; |
|
3625 |
iSysApCenRepController->SetInt( KCRUidCoreApplicationUIsSysAp, KSysApProfileBeforeOfflineMode, aNewProfileId ); |
|
3626 |
} |
|
3627 |
||
3628 |
if ( aNewProfileId == KOfflineModeProfileId && ! iSysApOfflineModeController->OfflineModeActive() ) |
|
3629 |
{ |
|
3630 |
if ( BtSapEnabled() ) |
|
3631 |
{ |
|
3632 |
// Choosing "Offline Mode" will disconnect BT SAP |
|
3633 |
// SwitchFromOnlineToOfflineModeL() will be called from CSysApBtSapController |
|
3634 |
iSysApBtSapController->SwitchingToOffline(); |
|
3635 |
iSysApBtSapController->Disconnect(); |
|
3636 |
} |
|
3637 |
else |
|
3638 |
{ |
|
3639 |
SwitchFromOnlineToOfflineModeL(); |
|
3640 |
} |
|
3641 |
} |
|
3642 |
else if ( aNewProfileId != KOfflineModeProfileId && iSysApOfflineModeController->OfflineModeActive() ) |
|
3643 |
{ |
|
3644 |
if ( BtSapEnabled() ) |
|
3645 |
{ |
|
3646 |
iSysApOfflineModeController->DoNotActivateRF(); // Will be activated after BT SAP disconnection |
|
3647 |
} |
|
3648 |
iSysApOfflineModeController->SwitchFromOfflineToOnlineModeL(); |
|
3649 |
} |
|
3650 |
iHandleNextProfileEvent = ETrue; |
|
3651 |
} |
|
3652 |
||
3653 |
||
3654 |
// ---------------------------------------------------------------------------- |
|
3655 |
// CSysApAppUi::RestoreProfileL() |
|
3656 |
// ---------------------------------------------------------------------------- |
|
3657 |
||
3658 |
void CSysApAppUi::RestoreProfileL( const TBool aOffline ) |
|
3659 |
{ |
|
3660 |
iHandleNextProfileEvent = EFalse; |
|
3661 |
if ( aOffline ) |
|
3662 |
{ |
|
3663 |
ActivateProfileL( KOfflineModeProfileId ); |
|
3664 |
} |
|
3665 |
else |
|
3666 |
{ |
|
3667 |
ActivateProfileL( iActiveProfileBeforeOfflineMode ); |
|
3668 |
} |
|
3669 |
} |
|
3670 |
||
3671 |
// ---------------------------------------------------------------------------- |
|
3672 |
// CSysApAppUi::ActiveProfileId() |
|
3673 |
// ---------------------------------------------------------------------------- |
|
3674 |
||
3675 |
TInt CSysApAppUi::ActiveProfileId() |
|
3676 |
{ |
|
3677 |
return iProfileEngine->ActiveProfileId(); |
|
3678 |
} |
|
3679 |
||
3680 |
||
3681 |
// ---------------------------------------------------------------------------- |
|
3682 |
// CSysApAppUi::AddMmcMenuItemsL() |
|
3683 |
// ---------------------------------------------------------------------------- |
|
3684 |
// |
|
3685 |
void CSysApAppUi::AddMmcMenuItemsL( CDesCArray*& aProfileNameCDesCArray, RArray<TInt>& aItemIdArray, |
|
3686 |
TInt& aPowerMenuItemIndex ) |
|
3687 |
{ |
|
3688 |
TInt propertyValue( StateOfProperty( KPSUidUsbWatcher, |
|
3689 |
KUsbWatcherSelectedPersonality ) ); |
|
3690 |
||
3691 |
HBufC* itemStringBuf; |
|
3692 |
#ifndef RD_MULTIPLE_DRIVE |
|
3693 |
iPowerkeyMenuEjectSelection = KErrAccessDenied; |
|
3694 |
if ( !IsEncryptionOperationOngoingL() ) |
|
3695 |
{ |
|
3696 |
if ( iSysApFeatureManager->MmcHotSwapSupported() && |
|
3697 |
iMMCInserted && |
|
3698 |
iSysApFeatureManager->EjectRequiredInPowerMenu() && |
|
3699 |
propertyValue != KUsbPersonalityIdMS ) |
|
3700 |
{ |
|
3701 |
iPowerkeyMenuEjectShown = ETrue; |
|
3702 |
TRACES( RDebug::Print(_L("CSysApAppUi::AddMmcMenuItemsL: adding \"Eject\"" ) ) ); |
|
3703 |
itemStringBuf = StringLoader::LoadLC( R_QTN_PWRC_EJECT_MMC, iEikonEnv ); |
|
3704 |
aProfileNameCDesCArray->AppendL( itemStringBuf->Des() ); |
|
3705 |
CleanupStack::PopAndDestroy(); // itemStringBuf |
|
3706 |
if ( iSysApFeatureManager->CoverDisplaySupported() ) |
|
3707 |
{ |
|
3708 |
aItemIdArray.AppendL(SecondaryDisplay::EPwrMenuItemEjectMMC); |
|
3709 |
} |
|
3710 |
iPowerkeyMenuEjectShown = ETrue; |
|
3711 |
iPowerkeyMenuEjectSelection = aPowerMenuItemIndex; |
|
3712 |
aPowerMenuItemIndex++; |
|
3713 |
} |
|
3714 |
} |
|
3715 |
||
3716 |
#else // RD_MULTIPLE_DRIVE |
|
3717 |
iPowerkeyMenuEjectSelectionBase = KErrAccessDenied; |
|
3718 |
if ( !IsEncryptionOperationOngoingL() ) |
|
3719 |
{ |
|
3720 |
if ( iSysApFeatureManager->MmcHotSwapSupported() |
|
3721 |
&& iSysApFeatureManager->EjectRequiredInPowerMenu() |
|
3722 |
&& propertyValue != KUsbPersonalityIdMS ) |
|
3723 |
{ |
|
3724 |
// Reset old eject status and dialog |
|
3725 |
iSysApDriveList->ResetDrivesToEject(); |
|
3726 |
if ( iSysApConfirmationQuery ) |
|
3727 |
{ |
|
3728 |
if ( iSysApConfirmationQuery->CurrentQuery() == ESysApEjectMmcQuery ) |
|
3729 |
{ |
|
3730 |
iSysApConfirmationQuery->Cancel(); |
|
3731 |
} |
|
3732 |
} |
|
3733 |
||
3734 |
// Append memory cards for eject selection |
|
3735 |
TInt count( iInsertedMemoryCards.Count() ); |
|
3736 |
TInt corruptedMedia = 0; |
|
3737 |
for ( TInt i( 0 ); i < count; ++i ) |
|
3738 |
{ |
|
3739 |
TVolumeInfo info; |
|
3740 |
TInt err = iEikonEnv->FsSession().Volume(info, iInsertedMemoryCards[ i ].iDrive); |
|
3741 |
TRACES( RDebug::Print(_L("CSysApAppUi::AddMmcMenuItemsL: corrupted media, iDrive (%d) Error: %d" ),iInsertedMemoryCards[ i ].iDrive, err ) ); |
|
3742 |
if(err != KErrNone) |
|
3743 |
{ |
|
3744 |
corruptedMedia++; |
|
3745 |
continue; |
|
3746 |
} |
|
3747 |
itemStringBuf = iSysApDriveList->GetFormattedDriveNameLC( |
|
3748 |
iInsertedMemoryCards[ i ].iDrive, |
|
3749 |
R_QTN_PWRC_EJECT_MEMORY_STORAGE ); |
|
3750 |
aProfileNameCDesCArray->AppendL( *itemStringBuf ); |
|
3751 |
CleanupStack::PopAndDestroy( itemStringBuf ); |
|
3752 |
||
3753 |
if ( iSysApFeatureManager->CoverDisplaySupported() ) |
|
3754 |
{ |
|
3755 |
aItemIdArray.AppendL( |
|
3756 |
SecondaryDisplay::EPwrMenuItemEjectItemBase + i ); |
|
3757 |
} |
|
3758 |
} |
|
3759 |
if ( (count-corruptedMedia) > 0 ) |
|
3760 |
{ |
|
3761 |
TRACES( RDebug::Print(_L("CSysApAppUi::AddMmcMenuItemsL: added \"Eject\"" ) ) ); |
|
3762 |
iPowerkeyMenuEjectShown = ETrue; |
|
3763 |
iPowerkeyMenuEjectSelectionBase = aPowerMenuItemIndex; |
|
3764 |
aPowerMenuItemIndex += (count-corruptedMedia); |
|
3765 |
} |
|
3766 |
} |
|
3767 |
} |
|
3768 |
#endif // RD_MULTIPLE_DRIVE |
|
3769 |
} |
|
3770 |
||
3771 |
||
3772 |
// ---------------------------------------------------------------------------- |
|
3773 |
// CSysApAppUi::ShowPowerKeyPopUpMenuL() |
|
3774 |
// ---------------------------------------------------------------------------- |
|
3775 |
||
3776 |
void CSysApAppUi::ShowPowerKeyPopUpMenuL() |
|
3777 |
{ |
|
3778 |
TRACES( RDebug::Print(_L("CSysApAppUi::ShowPowerKeyPopUpMenuL iPowerKeyPopupMenuActive: %d" ), |
|
3779 |
iPowerKeyPopupMenuActive ) ); |
|
3780 |
||
3781 |
if ( !iPowerKeyPopupMenuActive && !iDisablePowerkeyMenu |
|
3782 |
&& iSysApPowerKeyMenuObserver ) // normal state construction has been executed |
|
3783 |
{ |
|
3784 |
iPowerKeyPopupMenuDismissed = EFalse; |
|
3785 |
iPowerkeyMenuPowerOffShown = EFalse; |
|
3786 |
CancelGlobalListQuery(); |
|
3787 |
||
3788 |
iGlobalListQuery = CAknGlobalListQuery::NewL(); |
|
3789 |
||
3790 |
iSysApPowerKeyMenuObserver->Cancel(); |
|
3791 |
||
3792 |
CDesCArray* profileNameCDesCArray; // Array for Powerkey Menu items |
|
3793 |
||
3794 |
RArray<TInt> itemIdArray; // needed for cover UI |
|
3795 |
CleanupClosePushL(itemIdArray); |
|
3796 |
||
3797 |
// make sure old profile names array is clean |
|
3798 |
delete iProfileNamesArray; |
|
3799 |
iProfileNamesArray = NULL; |
|
3800 |
||
3801 |
// Must pop iProfileNamesArray here as cannot leave trap harness with uneven push/pop count. |
|
3802 |
// This is because profileEngine doesn't provide non-LC version of ProfilesNamesArrayLC |
|
3803 |
TRAPD( err, |
|
3804 |
iProfileNamesArray = iProfileEngine->ProfilesNamesArrayLC(); |
|
3805 |
CleanupStack::Pop(); |
|
3806 |
); |
|
3807 |
||
3808 |
if ( err != KErrNone ) |
|
3809 |
{ |
|
3810 |
// creating menu failed, return (i.e. just don't show the menu) |
|
3811 |
TRACES( RDebug::Print(_L("CSysApAppUi::ShowPowerKeyPopUpMenuL iProfileEngine->ProfilesNamesArrayLC() ERROR: %d" ), err ) ); |
|
3812 |
iNumberOfProfileNamesInPowerKeyMenu = 0; |
|
3813 |
} |
|
3814 |
else |
|
3815 |
{ |
|
3816 |
iNumberOfProfileNamesInPowerKeyMenu = iProfileNamesArray->MdcaCount(); |
|
3817 |
TRACES( RDebug::Print(_L("CSysApAppUi::ShowPowerKeyPopUpMenuL iNumberOfProfileNamesInPowerKeyMenu: %d" ), |
|
3818 |
iNumberOfProfileNamesInPowerKeyMenu ) ); |
|
3819 |
} |
|
3820 |
||
3821 |
if ( BtSapEnabled() ) |
|
3822 |
{ |
|
3823 |
profileNameCDesCArray = new( ELeave ) CDesCArrayFlat( iNumberOfProfileNamesInPowerKeyMenu + 4 ); |
|
3824 |
} |
|
3825 |
else |
|
3826 |
{ |
|
3827 |
profileNameCDesCArray = new( ELeave ) CDesCArrayFlat( iNumberOfProfileNamesInPowerKeyMenu + 3 ); |
|
3828 |
} |
|
3829 |
||
3830 |
CleanupStack::PushL( profileNameCDesCArray ); |
|
3831 |
profileNameCDesCArray->Reset(); |
|
3832 |
HBufC* itemStringBuf; |
|
3833 |
||
3834 |
TInt powerMenuItemIndex = 0; |
|
3835 |
||
3836 |
// "Switch off" menu item |
|
3837 |
if ( !IsEncryptionOperationOngoingL() ) |
|
3838 |
{ |
|
3839 |
itemStringBuf = StringLoader::LoadLC( R_QTN_PWRC_SWITCH_OFF, iEikonEnv ); |
|
3840 |
profileNameCDesCArray->InsertL( 0, itemStringBuf->Des() ); |
|
3841 |
CleanupStack::PopAndDestroy(); // itemStringBuf |
|
3842 |
if ( iSysApFeatureManager->CoverDisplaySupported() ) |
|
3843 |
{ |
|
3844 |
itemIdArray.AppendL(SecondaryDisplay::EPwrMenuItemSwitchOff); |
|
3845 |
} |
|
3846 |
iPowerkeyMenuPowerOffShown = ETrue; |
|
3847 |
powerMenuItemIndex++; |
|
3848 |
} |
|
3849 |
||
3850 |
iPowerkeyMenuLockKeypadShown = EFalse; |
|
3851 |
iPowerkeyMenuExitSapShown = EFalse; |
|
3852 |
iPowerkeyMenuLockSystemShown = EFalse; |
|
3853 |
iPowerkeyMenuEjectShown = EFalse; |
|
3854 |
||
3855 |
iPowerkeyMenuLockKeypadSelection = KErrAccessDenied; |
|
3856 |
iPowerkeyMenuExitSapSelection = KErrAccessDenied; |
|
3857 |
iPowerkeyMenuLockSystemSelection = KErrAccessDenied; |
|
3858 |
||
3859 |
#ifndef RD_MULTIPLE_DRIVE |
|
3860 |
iPowerkeyMenuEjectSelection = KErrAccessDenied; |
|
3861 |
#else // RD_MULTIPLE_DRIVE |
|
3862 |
iPowerkeyMenuEjectSelectionBase = KErrAccessDenied; |
|
3863 |
#endif // RD_MULTIPLE_DRIVE |
|
3864 |
||
3865 |
// "Lock keypad" menu item |
|
3866 |
||
3867 |
TInt callState ( StateOfProperty( KPSUidCtsyCallInformation, KCTsyCallState ) ); |
|
3868 |
TInt callType ( StateOfProperty( KPSUidCtsyCallInformation, KCTsyCallType ) ); |
|
3869 |
if ( !( callState == EPSCTsyCallStateConnected && callType == EPSCTsyCallTypeH324Multimedia ) ) |
|
3870 |
{ |
|
3871 |
if ( ( iSysApFeatureManager->GripNotSupported() && !iSysApFeatureManager->SlideSupported() ) || |
|
3872 |
( (!iSysApFeatureManager->GripNotSupported() || iSysApFeatureManager->SlideSupported() ) && |
|
3873 |
( StateOfProperty( KPSUidHWRM, KHWRMGripStatus ) == EPSHWRMGripClosed ) ) ) |
|
3874 |
// "Lock keypad" command is shown always when there is no grip, and if there |
|
3875 |
// there is no grip, only when the grip is closed. |
|
3876 |
{ |
|
3877 |
if ( CKeyLockPolicyApi::KeyguardAllowed() ) |
|
3878 |
{ |
|
3879 |
if ( iSysApFeatureManager->PenEnabled() ) |
|
3880 |
{ |
|
3881 |
itemStringBuf = StringLoader::LoadLC( R_QTN_PWRC_LOCK_DISPLAY, iEikonEnv ); |
|
3882 |
} |
|
3883 |
else |
|
3884 |
{ |
|
3885 |
itemStringBuf = StringLoader::LoadLC( R_QTN_PWRC_LOCK_KEYS, iEikonEnv ); |
|
3886 |
} |
|
3887 |
profileNameCDesCArray->AppendL( itemStringBuf->Des() ); |
|
3888 |
CleanupStack::PopAndDestroy(); // itemStringBuf |
|
3889 |
if ( iSysApFeatureManager->CoverDisplaySupported() ) |
|
3890 |
{ |
|
3891 |
itemIdArray.AppendL(SecondaryDisplay::EPwrMenuItemLockKeypad); |
|
3892 |
} |
|
3893 |
iPowerkeyMenuLockKeypadShown = ETrue; |
|
3894 |
iPowerkeyMenuLockKeypadSelection = powerMenuItemIndex; |
|
3895 |
powerMenuItemIndex++; |
|
3896 |
} |
|
3897 |
} |
|
3898 |
} |
|
3899 |
if ( iSysApFeatureManager->PowerKeyIsLockKey() ) |
|
3900 |
{ |
|
3901 |
AddMmcMenuItemsL( profileNameCDesCArray, |
|
3902 |
itemIdArray, powerMenuItemIndex ); |
|
3903 |
} |
|
3904 |
// "Exit SIM access profile" menu item |
|
3905 |
if ( BtSapEnabled() ) |
|
3906 |
{ |
|
3907 |
TRACES( RDebug::Print(_L( "CSysApAppUi::ShowPowerKeyPopUpMenuL: show \"Exit SIM access profile\" item" ) ) ); |
|
3908 |
itemStringBuf = StringLoader::LoadLC( R_QTN_PWRC_EXIT_SIM_ACCESS, iEikonEnv ); |
|
3909 |
profileNameCDesCArray->AppendL( itemStringBuf->Des() ); |
|
3910 |
CleanupStack::PopAndDestroy(); // itemStringBuf |
|
3911 |
if ( iSysApFeatureManager->CoverDisplaySupported() ) |
|
3912 |
{ |
|
3913 |
itemIdArray.AppendL(SecondaryDisplay::EPwrMenuItemExitBtSap); |
|
3914 |
} |
|
3915 |
iPowerkeyMenuExitSapShown = ETrue; |
|
3916 |
iPowerkeyMenuExitSapSelection = powerMenuItemIndex; |
|
3917 |
powerMenuItemIndex++; |
|
3918 |
} |
|
3919 |
||
3920 |
// Profile menu items |
|
3921 |
iProfileItemsOffset = powerMenuItemIndex; |
|
3922 |
TInt arrayIndex( 0 ); |
|
3923 |
TBufC<KMaxProfileNameLength> profileName; |
|
3924 |
||
3925 |
for ( arrayIndex = 0; arrayIndex < iNumberOfProfileNamesInPowerKeyMenu; arrayIndex++ ) |
|
3926 |
{ |
|
3927 |
profileName = iProfileNamesArray->MdcaPoint( arrayIndex ); |
|
3928 |
TPtr profileNamePtr = profileName.Des(); |
|
3929 |
AknTextUtils::DisplayTextLanguageSpecificNumberConversion( profileNamePtr ); |
|
3930 |
profileNameCDesCArray->AppendL( profileNamePtr ); |
|
3931 |
||
3932 |
if ( iSysApFeatureManager->CoverDisplaySupported() ) |
|
3933 |
{ |
|
3934 |
TInt profileId = ( iProfileNamesArray->ProfileName( arrayIndex ) )->Id(); |
|
3935 |
itemIdArray.AppendL(SecondaryDisplay::EPwrMenuItemProfileItemBase+profileId); |
|
3936 |
} |
|
3937 |
powerMenuItemIndex++; |
|
3938 |
} |
|
3939 |
||
3940 |
// "Lock device" menu item |
|
3941 |
||
3942 |
callState = StateOfProperty( KPSUidCtsyCallInformation, KCTsyCallState ); |
|
3943 |
||
3944 |
TInt devLockStatus( EAutolockStatusUninitialized ); |
|
3945 |
devLockStatus = StateOfProperty( KPSUidCoreApplicationUIs, KCoreAppUIsAutolockStatus ); // check whether Autolock has been started |
|
3946 |
||
3947 |
||
3948 |
if ( callState == EPSCTsyCallStateNone && devLockStatus != EAutolockStatusUninitialized ) |
|
3949 |
{ |
|
3950 |
TRACES( RDebug::Print(_L("CSysApAppUi::ShowPowerKeyPopUpMenuL: adding \"Lock device\", devLockStatus=%d" ), devLockStatus ) ); |
|
3951 |
iPowerkeyMenuLockSystemShown = ETrue; |
|
3952 |
itemStringBuf = StringLoader::LoadLC( R_QTN_SET_SEC_LOCK_SYSTEM, iEikonEnv ); |
|
3953 |
profileNameCDesCArray->AppendL( itemStringBuf->Des() ); |
|
3954 |
CleanupStack::PopAndDestroy(); // itemStringBuf |
|
3955 |
if ( iSysApFeatureManager->CoverDisplaySupported() ) |
|
3956 |
{ |
|
3957 |
itemIdArray.AppendL(SecondaryDisplay::EPwrMenuItemLockDevice); |
|
3958 |
} |
|
3959 |
iPowerkeyMenuLockSystemShown = ETrue; |
|
3960 |
iPowerkeyMenuLockSystemSelection = powerMenuItemIndex; |
|
3961 |
powerMenuItemIndex++; |
|
3962 |
} |
|
3963 |
if ( !iSysApFeatureManager->PowerKeyIsLockKey() ) |
|
3964 |
{ |
|
3965 |
AddMmcMenuItemsL( profileNameCDesCArray, itemIdArray, powerMenuItemIndex ); |
|
3966 |
} |
|
3967 |
||
3968 |
// Activate/deactive power save mode |
|
3969 |
if ( iSysApPsmController ) // variable feature, not create if power save is not used |
|
3970 |
{ |
|
3971 |
TBool showActivate = !(iSysApPsmController->FullPsmEnabled()); |
|
3972 |
||
3973 |
TInt textId = ( showActivate ? R_QTN_PWRC_ACTIVATE_POWER_SAVING : R_QTN_PWRC_DEACTIVATE_POWER_SAVING ); |
|
3974 |
||
3975 |
itemStringBuf = StringLoader::LoadLC( textId, iEikonEnv ); |
|
3976 |
iSysApPsmController->SetNextUiOperation( showActivate ); |
|
3977 |
||
3978 |
if ( iSysApFeatureManager->CoverDisplaySupported() ) |
|
3979 |
{ |
|
3980 |
itemIdArray.AppendL( showActivate ? |
|
3981 |
SecondaryDisplay::EPwrMenuItemActivatePowerSaving : |
|
3982 |
SecondaryDisplay::EPwrMenuItemDeactivatePowerSaving ); |
|
3983 |
} |
|
3984 |
||
3985 |
profileNameCDesCArray->AppendL( itemStringBuf->Des() ); |
|
3986 |
CleanupStack::PopAndDestroy( itemStringBuf ); |
|
3987 |
||
3988 |
iSysApPsmController->SetUiItemId( powerMenuItemIndex ); |
|
3989 |
powerMenuItemIndex++; |
|
3990 |
} |
|
3991 |
||
3992 |
TRACES( RDebug::Print(_L("CSysApAppUi::ShowPowerKeyPopUpMenuL NumberOfAllItemsInPowerKeyMenu: %d" ), |
|
3993 |
profileNameCDesCArray->Count() ) ); |
|
3994 |
||
3995 |
iSysApPowerKeyMenuObserver->Start(); |
|
3996 |
||
3997 |
// Set secondary display data if necessary |
|
3998 |
if ( iSysApFeatureManager->CoverDisplaySupported() ) |
|
3999 |
{ |
|
4000 |
CAknSDData* sd = CAknSDData::NewL(SecondaryDisplay::KCatSysAp, SecondaryDisplay::ECmdShowPowerKeyListQuery, KNullDesC8); |
|
4001 |
sd->InsertGlobalListQueryItemIdsL(itemIdArray); |
|
4002 |
iGlobalListQuery->SetSecondaryDisplayData(sd); // ownership to notifier client |
|
4003 |
} |
|
4004 |
||
4005 |
iGlobalListQuery->ShowListQueryL( (MDesCArray*) profileNameCDesCArray, |
|
4006 |
iSysApPowerKeyMenuObserver->iStatus, |
|
4007 |
KProfileListInitialIndex ); |
|
4008 |
||
4009 |
TRACES( RDebug::Print(_L("CSysApAppUi::ShowPowerKeyPopUpMenuL: list query shown" ) ) ); |
|
4010 |
||
4011 |
CleanupStack::PopAndDestroy( profileNameCDesCArray ); // profileNameCDesCArray |
|
4012 |
TRACES( RDebug::Print(_L("CSysApAppUi::ShowPowerKeyPopUpMenuL: profileNameCDesCArray popped" ) ) ); |
|
4013 |
||
4014 |
CleanupStack::Pop(&itemIdArray); |
|
4015 |
itemIdArray.Close(); |
|
4016 |
||
4017 |
// Without following variable set ETrue powerkey up event would change the hightlighted item to be |
|
4018 |
// the second one instead of the wanted first one. |
|
4019 |
iIgnoreNextPowerKeyUpEvent = ETrue; |
|
4020 |
||
4021 |
if ( iSysApBatteryInfoController ) |
|
4022 |
{ |
|
4023 |
iSysApBatteryInfoController->PowerMenuShownL(); |
|
4024 |
} |
|
4025 |
||
4026 |
TRACES( RDebug::Print(_L("CSysApAppUi::ShowPowerKeyPopUpMenuL:end" ) ) ); |
|
4027 |
} |
|
4028 |
} |
|
4029 |
||
4030 |
// ---------------------------------------------------------------------------- |
|
4031 |
// CSysApAppUi::PowerKeyPopUpMenuSelectionDoneL( TInt aSelection ) |
|
4032 |
// ---------------------------------------------------------------------------- |
|
4033 |
||
4034 |
void CSysApAppUi::PowerKeyPopUpMenuSelectionDoneL( TInt aSelection ) |
|
4035 |
{ |
|
4036 |
iPowerKeyPopupMenuDismissed = ETrue; |
|
4037 |
iPowerKeyPopupMenuActive = EFalse; |
|
4038 |
TRACES( RDebug::Print(_L("CSysApAppUi::PowerKeyPopUpMenuSelectionDoneL: START aSelection:%d" ), aSelection ) ); |
|
4039 |
if ( aSelection == KPowerKeyMenuSelectionCancelled ) |
|
4040 |
{ |
|
4041 |
TRACES( RDebug::Print(_L("CSysApAppUi::PowerKeyPopUpMenuSelectionDoneL: Powerkey menu cancelled" ) ) ); |
|
4042 |
} |
|
4043 |
else if( aSelection < KPowerKeyMenuSelectionCancelled ) |
|
4044 |
{ |
|
4045 |
iIgnoreNextPowerKeyUpEvent = EFalse; |
|
4046 |
} |
|
4047 |
else |
|
4048 |
{ |
|
4049 |
// first menu item <=> Switch off |
|
4050 |
if ( aSelection == KPowerKeyMenuSelectionSwitchOff ) |
|
4051 |
{ |
|
4052 |
TRACES( RDebug::Print(_L("CSysApAppUi::PowerKeyPopUpMenuSelectionDoneL: \"Switch off\" selected" ) ) ); |
|
4053 |
DoShutdownL( EFalse, KDummyReason ); |
|
4054 |
} |
|
4055 |
// 2nd menu item: lock display & keys |
|
4056 |
else if ( iPowerkeyMenuLockKeypadShown && aSelection == iPowerkeyMenuLockKeypadSelection ) |
|
4057 |
{ |
|
4058 |
TRACES( RDebug::Print(_L("CSysApAppUi::PowerKeyPopUpMenuSelectionDoneL: \"Lock keypad\" selected" ) ) ); |
|
4059 |
KeyLock().EnableKeyLock(); |
|
4060 |
} |
|
4061 |
// BT |
|
4062 |
else if ( iPowerkeyMenuExitSapShown && aSelection == iPowerkeyMenuExitSapSelection ) |
|
4063 |
{ |
|
4064 |
TRACES( RDebug::Print(_L("CSysApAppUi::PowerKeyPopUpMenuSelectionDoneL: \"Exit SAP\" selected" ) ) ); |
|
4065 |
ShowQueryL( ESysApBtSapDisconnectQuery ); |
|
4066 |
} |
|
4067 |
// Profile Items |
|
4068 |
else if ( ( aSelection >= iProfileItemsOffset ) && ( aSelection < iProfileItemsOffset + iNumberOfProfileNamesInPowerKeyMenu ) ) |
|
4069 |
{ |
|
4070 |
__ASSERT_DEBUG( iProfileNamesArray, User::Invariant() ); |
|
4071 |
||
4072 |
if ( iProfileNamesArray ) |
|
4073 |
{ |
|
4074 |
iProfileToBeActivated = ( iProfileNamesArray->ProfileName( aSelection - iProfileItemsOffset ) )->Id(); |
|
4075 |
||
4076 |
TRACES( RDebug::Print(_L("CSysApAppUi::PowerKeyPopUpMenuSelectionDoneL: profile id: %d selected" ), iProfileToBeActivated ) ); |
|
4077 |
if ( ! iSysApOfflineModeController->OfflineModeActive() || |
|
4078 |
( iProfileToBeActivated ) == KOfflineModeProfileId ) |
|
4079 |
{ |
|
4080 |
ActivateProfileL( iProfileToBeActivated ); |
|
4081 |
} |
|
4082 |
else |
|
4083 |
{ |
|
4084 |
// iProfileToBeActivated profile will be activated from iSysApOfflineModeController if ok |
|
4085 |
iSysApOfflineModeController->GoOnlineIfOkL(); |
|
4086 |
} |
|
4087 |
} |
|
4088 |
} |
|
4089 |
// device lock |
|
4090 |
else if ( iPowerkeyMenuLockSystemShown && aSelection == iPowerkeyMenuLockSystemSelection ) |
|
4091 |
{ |
|
4092 |
TRACES( RDebug::Print(_L("CSysApAppUi::PowerKeyPopUpMenuSelectionDoneL: \"Lock system\" selected" ) ) ); |
|
4093 |
iSysApSystemLock->SetLockedL(); |
|
4094 |
} |
|
4095 |
#ifndef RD_MULTIPLE_DRIVE |
|
4096 |
//eject single MMC |
|
4097 |
else if ( iPowerkeyMenuEjectShown && aSelection == iPowerkeyMenuEjectSelection ) |
|
4098 |
{ |
|
4099 |
TRACES( RDebug::Print(_L("CSysApAppUi::PowerKeyPopUpMenuSelectionDoneL: \"Eject\" selected" ) ) ); |
|
4100 |
ShowQueryL( ESysApEjectMmcQuery ); |
|
4101 |
} |
|
4102 |
#else // RD_MULTIPLE_DRIVE |
|
4103 |
//eject nth MMC |
|
4104 |
else if ( iPowerkeyMenuEjectShown && |
|
4105 |
aSelection >= iPowerkeyMenuEjectSelectionBase && |
|
4106 |
aSelection < iPowerkeyMenuEjectSelectionBase + iInsertedMemoryCards.Count() ) |
|
4107 |
{ |
|
4108 |
iDriveToEject = |
|
4109 |
iInsertedMemoryCards[ aSelection - iPowerkeyMenuEjectSelectionBase ].iDrive; |
|
4110 |
TRACES( RDebug::Print( |
|
4111 |
_L( "CSysApAppUi::PowerKeyPopUpMenuSelectionDoneL: \"Eject\" selected, drive=%d" ), |
|
4112 |
iDriveToEject ) ); |
|
4113 |
iSysApDriveList->ResetDrivesToEject(); |
|
4114 |
RProperty::Set( KPSUidUikon, KUikMMCInserted, 0 ); |
|
4115 |
EjectMMCL(); |
|
4116 |
} |
|
4117 |
#endif // RD_MULTIPLE_DRIVE |
|
4118 |
else if ( iSysApPsmController && aSelection == iSysApPsmController->UiItemId() ) |
|
4119 |
{ |
|
4120 |
TRACES( RDebug::Print(_L("CSysApAppUi::PowerKeyPopUpMenuSelectionDoneL: \"Activate|Deactivate power save\" selected" ) ) ); |
|
4121 |
iSysApPsmController->DoEnableFullPsm( iSysApPsmController->NextUiOperation() ); |
|
4122 |
} |
|
4123 |
||
4124 |
} |
|
4125 |
||
4126 |
delete iProfileNamesArray; |
|
4127 |
iProfileNamesArray = NULL; |
|
4128 |
delete iGlobalListQuery; |
|
4129 |
iGlobalListQuery = NULL; |
|
4130 |
||
4131 |
TRACES( RDebug::Print(_L("CSysApAppUi::PowerKeyPopUpMenuSelectionDoneL: END" ) ) ); |
|
4132 |
} |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4133 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4134 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4135 |
// CSysApAppUi::SetDeviceLockEnabledL( const TBool aLockEnabled ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4136 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4137 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4138 |
void CSysApAppUi::SetDeviceLockEnabledL( const TBool aLockEnabled ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4139 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4140 |
TRACES( RDebug::Print(_L("CSysApAppUi::SetDeviceLockEnabledL aLockEnabled:%d" ), aLockEnabled ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4141 |
TBool currentState( iDeviceLockEnabled ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4142 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4143 |
iDeviceLockEnabled = aLockEnabled; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4144 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4145 |
if ( currentState != iDeviceLockEnabled ) // filter out unnecessary light status modifications |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4146 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4147 |
iSysApLightsController->DeviceLockStateChangedL( iDeviceLockEnabled ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4148 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4149 |
|
63 | 4150 |
/* if( iDeviceLockEnabled ) |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4151 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4152 |
if( iKeyLockEnabled ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4153 |
{ |
63 | 4154 |
KeyLock().DisableWithoutNote(); |
4155 |
} |
|
4156 |
}*/ |
|
4157 |
if(! iDeviceLockEnabled ) |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4158 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4159 |
// let's not activate keylock in case device lock was disabled during call or in cradle |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4160 |
iKeyLockOnBeforeCall = EFalse; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4161 |
iKeyLockOnBeforeCradle = EFalse; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4162 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4163 |
// Memory card needs to be unlocked when device is unlocked |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4164 |
if ( iSysApFeatureManager->MmcHotSwapSupported() ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4165 |
{ |
63 | 4166 |
RunUnlockNotifierL(); |
4167 |
} |
|
4168 |
} |
|
4169 |
} |
|
4170 |
||
4171 |
// ---------------------------------------------------------------------------- |
|
4172 |
// CSysApAppUi::DoNotEnableKeylock() |
|
4173 |
// ---------------------------------------------------------------------------- |
|
4174 |
||
4175 |
void CSysApAppUi::DoNotEnableKeylock() |
|
4176 |
{ |
|
4177 |
if ( !iKeyLockOnBeforeCradle ) |
|
4178 |
{ |
|
4179 |
iShowkeypadActivatedNoteAfterSoftReject = iKeyLockOnBeforeCall; |
|
4180 |
} |
|
4181 |
||
4182 |
iKeyLockOnBeforeCall = EFalse; |
|
4183 |
} |
|
4184 |
||
4185 |
// ---------------------------------------------------------------------------- |
|
4186 |
// CSysApAppUi::DoShutdownL( const TBool aReset, const TSWStartupReason aSWStartupReason ) |
|
4187 |
// ---------------------------------------------------------------------------- |
|
4188 |
||
4189 |
void CSysApAppUi::DoShutdownL( const TBool aReset, const TInt aResetReason ) |
|
4190 |
{ |
|
4191 |
TRACES( RDebug::Print(_L("CSysApAppUi::DoShutdownL: aResetReason:%d, aReset:%d" ), |
|
4192 |
aResetReason, aReset ) ); |
|
4193 |
#ifndef RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
4194 |
TBool animationenabled( EFalse ); |
|
4195 |
#endif // RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
4196 |
||
4197 |
if( OkToInitiateShutdown() ) |
|
4198 |
{ |
|
4199 |
TRACES( RDebug::Print(_L("CSysApAppUi::DoShutdownL: Was OkToToInitiateShutdown" ) ) ); |
|
4200 |
||
4201 |
||
4202 |
if ( !aReset && iSysApFeatureManager->Supported(KSysApFeatureIdGoodbyeNote) ) |
|
4203 |
{ |
|
4204 |
TRAPD( ignore, ShowShutdownNoteL() ); |
|
4205 |
if ( ignore ) ignore = 0; // hide compiler warning about not using variable |
|
4206 |
} |
|
4207 |
||
4208 |
if( !aReset ) |
|
4209 |
{ |
|
4210 |
#ifdef RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
4211 |
TRAPD( err, ShowAnimationL() ); |
|
4212 |
if ( err ) |
|
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
4213 |
{ |
63 | 4214 |
TRACES( RDebug::Print(_L("CSysApAppUi::DoShutdownL ShowAnimationL() leaved: %d" ), err ) ); |
4215 |
CompleteShutdown(aReset, aResetReason); |
|
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
4216 |
} |
63 | 4217 |
} |
4218 |
else // aReset |
|
4219 |
{ |
|
4220 |
CompleteShutdown(aReset, aResetReason); |
|
4221 |
} |
|
4222 |
#else // RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
4223 |
TRAPD( err, animationenabled = ShowAnimationL() ); |
|
4224 |
if ( err ) |
|
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
4225 |
{ |
63 | 4226 |
TRACES( RDebug::Print(_L("CSysApAppUi::DoShutdownL ShowAnimationL() leaved: %d" ), err ) ); |
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
4227 |
} |
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
4228 |
} |
63 | 4229 |
|
4230 |
if ( !animationenabled ) |
|
4231 |
{ |
|
4232 |
CompleteShutdown(aReset, aResetReason); |
|
4233 |
} |
|
4234 |
#endif // RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
4235 |
} |
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
4236 |
else |
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
4237 |
{ |
63 | 4238 |
TRACES( RDebug::Print(_L("CSysApAppUi::DoShutdownL: Was not OkToToInitiateShutdown" ) ) ); |
4239 |
} |
|
4240 |
TRACES( RDebug::Print(_L("CSysApAppUi::DoShutdownL: END" ) ) ); |
|
4241 |
} |
|
4242 |
||
4243 |
// ---------------------------------------------------------------------------- |
|
4244 |
// CSysApAppUi::ContinueShutdown() |
|
4245 |
// ---------------------------------------------------------------------------- |
|
4246 |
||
4247 |
void CSysApAppUi::ContinueShutdown() |
|
4248 |
{ |
|
4249 |
TRACES( RDebug::Print(_L("CSysApAppUi::ContinueShutdown() started" ) ) ); |
|
4250 |
CompleteShutdown(); |
|
4251 |
TRACES( RDebug::Print(_L("CSysApAppUi::ContinueShutdown() completed" ) ) ); |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4252 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4253 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4254 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4255 |
// CSysApAppUi::ShowAnimationL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4256 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4257 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4258 |
#ifdef RD_STARTUP_ANIMATION_CUSTOMIZATION |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4259 |
void |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4260 |
#else // RD_STARTUP_ANIMATION_CUSTOMIZATION |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4261 |
TBool |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4262 |
#endif // RD_STARTUP_ANIMATION_CUSTOMIZATION |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4263 |
CSysApAppUi::ShowAnimationL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4264 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4265 |
TRACES( RDebug::Print(_L("CSysApAppUi::ShowAnimationL(): START" ) ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4266 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4267 |
TRACES( RDebug::Print( _L("CSysApAppUi::ShowAnimationL: Initialise shutdown animation") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4268 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4269 |
#ifdef RD_STARTUP_ANIMATION_CUSTOMIZATION |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4270 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4271 |
PrepareForShutdownAnimation(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4272 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4273 |
iSysApShutdownAnimation = CSysApShutdownAnimation::NewL( *iSysApShutdownImage ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4274 |
iSysApShutdownAnimation->Play( TCallBack( DoStopAnimTiming, this ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4275 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4276 |
TRACES( RDebug::Print(_L("CSysApAppUi::ShowAnimationL(): End" ) ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4277 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4278 |
#else // RD_STARTUP_ANIMATION_CUSTOMIZATION |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4279 |
iSysApShutdownAnimation = CSysApShutdownAnimation::NewL( this ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4280 |
AddToStackL( iSysApShutdownAnimation ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4281 |
iAnimationShowingTime = iSysApShutdownAnimation->ShowingTime(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4282 |
TRACES( RDebug::Print( _L("CSysApAppUi::ShowAnimationL: Shutdown animation initialised. Animation time = %d") ,iAnimationShowingTime) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4283 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4284 |
TBool ret_val( EFalse ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4285 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4286 |
if ( iAnimationShowingTime ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4287 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4288 |
if ( iSysApFeatureManager->CoverDisplaySupported() ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4289 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4290 |
// Construct mediator observer |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4291 |
iSysApMediatorObserver = CSysApMediatorObserver::NewL( this ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4292 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4293 |
// Sync animation |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4294 |
TInt err = iSysApMediatorObserver->SyncShutdownAnimation(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4295 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4296 |
if ( err != KErrNone ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4297 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4298 |
// Pretend coverUI synced instantly if error in issuing command. |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4299 |
ShutdownAnimationSyncOK(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4300 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4301 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4302 |
else |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4303 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4304 |
// Pretend coverUI synced instantly when it is not supported. |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4305 |
ShutdownAnimationSyncOK(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4306 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4307 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4308 |
ret_val = ETrue; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4309 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4310 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4311 |
TRACES( RDebug::Print(_L("CSysApAppUi::ShowAnimationL(): returns: %d" ),ret_val ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4312 |
return ret_val; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4313 |
#endif // RD_STARTUP_ANIMATION_CUSTOMIZATION |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4314 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4315 |
|
63 | 4316 |
#ifndef RD_STARTUP_ANIMATION_CUSTOMIZATION |
4317 |
// ---------------------------------------------------------------------------- |
|
4318 |
// CSysApAppUi::ShutdownAnimationSyncOK() |
|
4319 |
// ---------------------------------------------------------------------------- |
|
4320 |
||
4321 |
void CSysApAppUi::ShutdownAnimationSyncOK() |
|
4322 |
{ |
|
4323 |
TRACES( RDebug::Print(_L("CSysApAppUi::ShutdownAnimationSyncOK(): Call PrepareForShutdownAnimation()" ) ) ); |
|
4324 |
PrepareForShutdownAnimation();//SysAp's internal preparation for ShutDown with animation |
|
4325 |
TRACES( RDebug::Print(_L("CSysApAppUi::ShutdownAnimationSyncOK(): Called PrepareForShutdownAnimation()" ) ) ); |
|
4326 |
} |
|
4327 |
#endif // RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
4328 |
||
4329 |
// ---------------------------------------------------------------------------- |
|
4330 |
// CSysApAppUi::SkipShutdownAnimation() |
|
4331 |
// ---------------------------------------------------------------------------- |
|
4332 |
||
4333 |
void CSysApAppUi::SkipShutdownAnimation() |
|
4334 |
{ |
|
4335 |
TRACES( RDebug::Print(_L("CSysApAppUi::SkipShutdownAnimation() " ) ) ); |
|
4336 |
||
4337 |
#ifdef RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
4338 |
if ( iSysApShutdownAnimation ) |
|
4339 |
{ |
|
4340 |
iSysApShutdownAnimation->Cancel(); |
|
4341 |
} |
|
4342 |
#else // RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
4343 |
if ( iAnimationShowingTime ) |
|
4344 |
{ |
|
4345 |
iSysApShutdownAnimation->EndAnimation(); |
|
4346 |
} |
|
4347 |
#endif // RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
4348 |
} |
|
4349 |
||
4350 |
// ---------------------------------------------------------------------------- |
|
4351 |
// CSysApAppUi::NotifyShutdownAnimationSkip() |
|
4352 |
// ---------------------------------------------------------------------------- |
|
4353 |
||
4354 |
void CSysApAppUi::NotifyShutdownAnimationSkip() |
|
4355 |
{ |
|
4356 |
TRACES( RDebug::Print(_L("CSysApAppUi::NotifyShutdownAnimationSkip() " ) ) ); |
|
4357 |
||
4358 |
if ( iSysApMediatorObserver ) |
|
4359 |
{ |
|
4360 |
iSysApMediatorObserver->ShutdownAnimationSkipped(); |
|
4361 |
} |
|
4362 |
} |
|
4363 |
||
4364 |
// ---------------------------------------------------------------------------- |
|
4365 |
// CSysApAppUi::CompleteShutdown() |
|
4366 |
// ---------------------------------------------------------------------------- |
|
4367 |
||
4368 |
void CSysApAppUi::CompleteShutdown( const TBool aReset, const TInt aResetReason ) |
|
4369 |
{ |
|
4370 |
TRACES( RDebug::Print(_L("CSysApAppUi::CompleteShutdown(): START" ) ) ); |
|
4371 |
||
4372 |
PrepareForShutdownImage();//SysAp's internal preparation for ShutDown with image |
|
4373 |
||
4374 |
FreeResources(); |
|
4375 |
||
4376 |
if ( aReset ) |
|
4377 |
{ |
|
4378 |
__ASSERT_DEBUG( aResetReason >= RStarterSession::ELanguageSwitchReset && |
|
4379 |
aResetReason <= RStarterSession::EDataRestoreReset, |
|
4380 |
User::Invariant() ); |
|
4381 |
StarterSession().Reset( static_cast<RStarterSession::TResetReason>( aResetReason ) ); |
|
4382 |
} |
|
4383 |
else |
|
4384 |
{ |
|
4385 |
StarterSession().Shutdown(); |
|
4386 |
} |
|
4387 |
||
4388 |
StarterSession().Close(); |
|
4389 |
||
4390 |
TRACES( RDebug::Print(_L("CSysApAppUi::CompleteShutdown(): END" ) ) ); |
|
4391 |
} |
|
4392 |
||
4393 |
#ifndef SYSAP_USE_STARTUP_UI_PHASE |
|
4394 |
// ---------------------------------------------------------------------------- |
|
4395 |
// CSysApAppUi::DoStateChangedL(const RStarterSession::TGlobalState aSwState) |
|
4396 |
// This method is not called after boot has finished. |
|
4397 |
// ---------------------------------------------------------------------------- |
|
4398 |
||
4399 |
void CSysApAppUi::DoStateChangedL(const RStarterSession::TGlobalState aSwState) |
|
4400 |
{ |
|
4401 |
TRACES( RDebug::Print(_L("CSysApAppUi::DoStateChangedL: %d" ), aSwState ) ); |
|
4402 |
||
4403 |
switch ( aSwState ) |
|
4404 |
{ |
|
4405 |
case RStarterSession::ENormal: |
|
4406 |
SetStatusPaneLayoutL( ESysApNormal ); |
|
4407 |
break; |
|
4408 |
case RStarterSession::ECharging: |
|
4409 |
SetStatusPaneLayoutL( ESysApCharging ); |
|
4410 |
break; |
|
4411 |
case RStarterSession::EAlarm: |
|
4412 |
SetStatusPaneLayoutL( ESysApAlarm ); |
|
4413 |
break; |
|
4414 |
default: |
|
4415 |
break; |
|
4416 |
}; |
|
4417 |
||
4418 |
TRAPD( simChangedErr, DoSimChangedFromPreviousBootL() ); |
|
4419 |
TRACES( RDebug::Print( _L("CSysApAppUi::DoStateChangedL: simChangedErr = %d" ), simChangedErr ) ); |
|
4420 |
simChangedErr = simChangedErr; // suppress 'variable not used' warning |
|
4421 |
LogsObserverL().HandleSimChangedCheckDoneL(); |
|
4422 |
||
4423 |
if ( iSysApFeatureManager->PowerSaveSupported() ) |
|
4424 |
{ |
|
4425 |
// create controller before checking battery state, so that power saving can be enabled during boot if needed |
|
4426 |
if ( !iSysApPsmController ) // created only in first state change |
|
4427 |
{ |
|
4428 |
iSysApPsmController = CSysApPsmController::NewL( *this ); |
|
4429 |
} |
|
4430 |
||
4431 |
// in charger boot explicitly disable partial power save mode |
|
4432 |
if ( aSwState == RStarterSession::ECharging && !iCharging ) |
|
4433 |
{ |
|
4434 |
iSysApPsmController->ChargerConnected(); |
|
4435 |
iSysApPsmController->DoEnablePartialPsm( EFalse ); // disable partial power save now |
|
4436 |
} |
|
4437 |
} |
|
4438 |
||
4439 |
TInt state( StateOfProperty( KPSUidHWRMPowerState, KHWRMBatteryLevel ) ); |
|
4440 |
//Also Charging status will be updated with the following function. |
|
4441 |
UpdateBatteryBarsL( state ); |
|
4442 |
||
4443 |
if( IsStateNormal() ) |
|
4444 |
{ |
|
4445 |
TRACES( RDebug::Print(_L("CSysApAppUi::DoStateChangedL to normal state.") ) ); |
|
4446 |
||
4447 |
DoSwStateNormalConstructionL(); |
|
4448 |
||
4449 |
InitializeStatusPaneAreaL(); |
|
4450 |
CheckSilentModeL(); |
|
4451 |
HandleAccessoryProfileInStartupL(); |
|
4452 |
||
4453 |
if ( iSysApFeatureManager->MmcSupported() ) |
|
4454 |
{ |
|
4455 |
#ifndef RD_MULTIPLE_DRIVE |
|
4456 |
MountMMC(); |
|
4457 |
MMCStatusChangedL(); |
|
4458 |
iHideFirstBeep = EFalse; |
|
4459 |
#else // RD_MULTIPLE_DRIVE |
|
4460 |
iSysApDriveList->MountDrive( iSysApDriveList->DefaultMemoryCard() ); |
|
4461 |
UpdateInsertedMemoryCardsL(); |
|
4462 |
#endif // RD_MULTIPLE_DRIVE |
|
4463 |
} |
|
4464 |
if ( iSysApFeatureManager->MmcHotSwapSupported() ) |
|
4465 |
{ |
|
4466 |
iSysApMMCObserver->StartMountObserver(); |
|
4467 |
} |
|
4468 |
||
4469 |
||
4470 |
if ( iSysApPsmController ) |
|
4471 |
{ |
|
4472 |
if ( iCharging ) // if charger is connected on boot PSM queries may need to be shown |
|
4473 |
{ |
|
4474 |
HandleChargingStatusL( StateOfProperty( KPSUidHWRMPowerState, KHWRMChargingStatus ) ); |
|
4475 |
} |
|
4476 |
} |
|
4477 |
||
4478 |
TInt batteryStatus = StateOfProperty( KPSUidHWRMPowerState, KHWRMBatteryStatus ); |
|
4479 |
TRACES( RDebug::Print(_L("CSysApAppUi::DoStateChangedL: batteryStatus %d" ), batteryStatus ) ); |
|
4480 |
if( batteryStatus == EBatteryStatusLow || batteryStatus == EBatteryStatusEmpty ) |
|
4481 |
{ |
|
4482 |
// low and empty battery states are informed to the user in device startup |
|
4483 |
HandleBatteryStatusL( batteryStatus ); |
|
4484 |
} |
|
4485 |
else if ( iSysApPsmController && !iCharging ) |
|
4486 |
{ |
|
4487 |
TRACES( RDebug::Print(_L("CSysApAppUi::DoStateChangedL: batteryStatus %d, iCharging %d -> disable partial psm" ), batteryStatus, iCharging ) ); |
|
4488 |
||
4489 |
iSysApPsmController->BatteryLow( EFalse ); |
|
4490 |
iSysApPsmController->DoEnablePartialPsm( EFalse ); |
|
4491 |
} |
|
4492 |
||
4493 |
iSysApBtController = CreateSysApBtControllerL( *this ); |
|
4494 |
iSysApBtSapController = CreateSysApBtSapControllerL( *this ); |
|
4495 |
||
4496 |
if ( iActivateBt ) |
|
4497 |
{ |
|
4498 |
TRACES( RDebug::Print(_L("CSysApAppUi::DoStateChangedL Activating BT" ) ) ); |
|
4499 |
SetBtPowerState( ETrue ); |
|
4500 |
} |
|
4501 |
||
4502 |
if ( iDeactivateBt ) |
|
4503 |
{ |
|
4504 |
TRACES( RDebug::Print(_L("CSysApAppUi::DoStateChangedL Deactivating BT" ) ) ); |
|
4505 |
SetBtPowerState( EFalse ); |
|
4506 |
} |
|
4507 |
iSysApLocationPrivacyIndicator = CreateSysApLocationPrivacyIndicatorL( *this ); |
|
4508 |
iSysApLocationPrivacyIndicator->InitL(); |
|
4509 |
||
4510 |
if ( ! iSysApUsbIndicatorController ) |
|
4511 |
{ |
|
4512 |
TRAPD ( usbErr, iSysApUsbIndicatorController = CreateSysApUsbIndicatorL( *this ) ); |
|
4513 |
if ( usbErr ) |
|
4514 |
{ |
|
4515 |
TRACES( RDebug::Print(_L("CSysApAppUi::DoStateChangedL: error in constructing USB ind. controller %d" ), usbErr ) ); |
|
4516 |
} |
|
4517 |
} |
|
4518 |
||
4519 |
// Other late initializations. |
|
4520 |
// In order to prevent unexpected behaviour e.g. in OOM situations, these calls are made to ensure |
|
4521 |
// that the services are connected when they are needed for the first time. |
|
4522 |
if ( !StarterSession().Handle() ) |
|
4523 |
{ |
|
4524 |
User::Leave( KErrBadHandle ); |
|
4525 |
} |
|
4526 |
||
4527 |
if ( !KeyLock().Handle() ) |
|
4528 |
{ |
|
4529 |
User::Leave( KErrBadHandle ); |
|
4530 |
} |
|
4531 |
||
4532 |
#ifdef __SYSAP_MODULE_TEST |
|
4533 |
ModuleTestShowUiNoteL( _L("SysAp: SW state normal!") ); |
|
4534 |
#endif |
|
4535 |
} |
|
4536 |
||
4537 |
// Allow lights |
|
4538 |
iSysApLightsController->AllowLightsOn(); |
|
4539 |
} |
|
4540 |
||
4541 |
#else // SYSAP_USE_STARTUP_UI_PHASE |
|
4542 |
||
4543 |
// ---------------------------------------------------------------------------- |
|
4544 |
// CSysApAppUi::HandleUiReadyAfterBootL() |
|
4545 |
// Called when startup UI activities has been finished |
|
4546 |
// ---------------------------------------------------------------------------- |
|
4547 |
||
4548 |
void CSysApAppUi::HandleUiReadyAfterBootL() |
|
4549 |
{ |
|
4550 |
TRACES( RDebug::Print(_L("CSysApAppUi::HandleUiReadyAfterBootL" ) ) ); |
|
4551 |
||
4552 |
SetStatusPaneLayoutL( ESysApNormal ); |
|
4553 |
||
4554 |
TInt state( StateOfProperty( KPSUidHWRMPowerState, KHWRMBatteryLevel ) ); |
|
4555 |
//Also Charging status will be updated with the following function. |
|
4556 |
UpdateBatteryBarsL( state ); |
|
4557 |
||
4558 |
DoSwStateNormalConstructionL(); |
|
4559 |
||
4560 |
InitializeStatusPaneAreaL(); |
|
4561 |
CheckSilentModeL(); |
|
4562 |
HandleAccessoryProfileInStartupL(); |
|
4563 |
||
4564 |
if ( iSysApFeatureManager->MmcSupported() ) |
|
4565 |
{ |
|
4566 |
#ifndef RD_MULTIPLE_DRIVE |
|
4567 |
MountMMC(); |
|
4568 |
MMCStatusChangedL(); |
|
4569 |
iHideFirstBeep = EFalse; |
|
4570 |
#else // RD_MULTIPLE_DRIVE |
|
4571 |
iSysApDriveList->MountDrive( iSysApDriveList->DefaultMemoryCard() ); |
|
4572 |
UpdateInsertedMemoryCardsL(); |
|
4573 |
#endif // RD_MULTIPLE_DRIVE |
|
4574 |
} |
|
4575 |
||
4576 |
if ( iSysApFeatureManager->MmcHotSwapSupported() ) |
|
4577 |
{ |
|
4578 |
iSysApMMCObserver->StartMountObserver(); |
|
4579 |
} |
|
4580 |
||
4581 |
if ( iSysApPsmController ) |
|
4582 |
{ |
|
4583 |
if ( iCharging ) // if charger is connected on boot PSM queries may need to be shown |
|
4584 |
{ |
|
4585 |
HandleChargingStatusL( StateOfProperty( KPSUidHWRMPowerState, KHWRMChargingStatus ) ); |
|
4586 |
} |
|
4587 |
} |
|
4588 |
||
4589 |
TInt batteryStatus = StateOfProperty( KPSUidHWRMPowerState, KHWRMBatteryStatus ); |
|
4590 |
TRACES( RDebug::Print(_L("CSysApAppUi::HandleUiReadyAfterBootL: batteryStatus %d" ), batteryStatus ) ); |
|
4591 |
if( batteryStatus == EBatteryStatusLow || batteryStatus == EBatteryStatusEmpty ) |
|
4592 |
{ |
|
4593 |
// low and empty battery states are informed to the user in device startup |
|
4594 |
HandleBatteryStatusL( batteryStatus ); |
|
4595 |
} |
|
4596 |
else if ( iSysApPsmController && !iCharging ) |
|
4597 |
{ |
|
4598 |
TRACES( RDebug::Print(_L("CSysApAppUi::HandleUiReadyAfterBootL: batteryStatus %d, iCharging %d -> disable partial psm" ), batteryStatus, iCharging ) ); |
|
4599 |
||
4600 |
iSysApPsmController->BatteryLow( EFalse ); |
|
4601 |
iSysApPsmController->DoEnablePartialPsm( EFalse ); |
|
4602 |
} |
|
4603 |
||
4604 |
iSysApLocationPrivacyIndicator = CreateSysApLocationPrivacyIndicatorL( *this ); |
|
4605 |
iSysApLocationPrivacyIndicator->InitL(); |
|
4606 |
||
4607 |
if ( ! iSysApUsbIndicatorController ) |
|
4608 |
{ |
|
4609 |
TRAPD ( usbErr, iSysApUsbIndicatorController = CreateSysApUsbIndicatorL( *this ) ); |
|
4610 |
if ( usbErr ) |
|
4611 |
{ |
|
4612 |
TRACES( RDebug::Print(_L("CSysApAppUi::HandleUiReadyAfterBootL: error in constructing USB ind. controller %d" ), usbErr ) ); |
|
4613 |
} |
|
4614 |
} |
|
4615 |
} |
|
4616 |
||
4617 |
// ---------------------------------------------------------------------------- |
|
4618 |
// CSysApAppUi::DoStateChangedL(const RStarterSession::TGlobalState aSwState) |
|
4619 |
// This method is not called after boot has finished. |
|
4620 |
// ---------------------------------------------------------------------------- |
|
4621 |
||
4622 |
void CSysApAppUi::DoStateChangedL(const RStarterSession::TGlobalState aSwState) |
|
4623 |
{ |
|
4624 |
TRACES( RDebug::Print(_L("CSysApAppUi::DoStateChangedL: %d" ), aSwState ) ); |
|
4625 |
||
4626 |
switch ( aSwState ) |
|
4627 |
{ |
|
4628 |
case RStarterSession::ENormal: |
|
4629 |
// status pane layout will updated when UI is ready |
|
4630 |
break; |
|
4631 |
case RStarterSession::ECharging: |
|
4632 |
SetStatusPaneLayoutL( ESysApCharging ); |
|
4633 |
break; |
|
4634 |
case RStarterSession::EAlarm: |
|
4635 |
SetStatusPaneLayoutL( ESysApAlarm ); |
|
4636 |
break; |
|
4637 |
default: |
|
4638 |
break; |
|
4639 |
}; |
|
4640 |
||
4641 |
TRAPD( simChangedErr, DoSimChangedFromPreviousBootL() ); |
|
4642 |
TRACES( RDebug::Print( _L("CSysApAppUi::DoStateChangedL: simChangedErr = %d" ), simChangedErr ) ); |
|
4643 |
simChangedErr = simChangedErr; // suppress 'variable not used' warning |
|
4644 |
LogsObserverL().HandleSimChangedCheckDoneL(); |
|
4645 |
||
4646 |
if ( iSysApFeatureManager->PowerSaveSupported() ) |
|
4647 |
{ |
|
4648 |
// create controller before checking battery state, so that power saving can be enabled during boot if needed |
|
4649 |
if ( !iSysApPsmController ) // created only in first state change |
|
4650 |
{ |
|
4651 |
iSysApPsmController = CSysApPsmController::NewL( *this ); |
|
4652 |
} |
|
4653 |
||
4654 |
// in charger boot explicitly disable partial power save mode |
|
4655 |
if ( aSwState == RStarterSession::ECharging ) |
|
4656 |
{ |
|
4657 |
iSysApPsmController->ChargerConnected(); |
|
4658 |
iSysApPsmController->DoEnablePartialPsm( EFalse ); // disable partial power save now |
|
4659 |
} |
|
4660 |
} |
|
4661 |
||
4662 |
if ( aSwState == RStarterSession::ECharging || aSwState == RStarterSession::EAlarm ) |
|
4663 |
{ |
|
4664 |
TInt state( StateOfProperty( KPSUidHWRMPowerState, KHWRMBatteryLevel ) ); |
|
4665 |
//Also Charging status will be updated with the following function. |
|
4666 |
UpdateBatteryBarsL( state ); |
|
4667 |
} |
|
4668 |
||
4669 |
if( IsStateNormal() ) |
|
4670 |
{ |
|
4671 |
TRACES( RDebug::Print(_L("CSysApAppUi::DoStateChangedL to normal state.") ) ); |
|
4672 |
||
4673 |
iSysApBtController = CreateSysApBtControllerL( *this ); |
|
4674 |
iSysApBtSapController = CreateSysApBtSapControllerL( *this ); |
|
4675 |
||
4676 |
if ( iActivateBt ) |
|
4677 |
{ |
|
4678 |
TRACES( RDebug::Print(_L("CSysApAppUi::DoStateChangedL Activating BT" ) ) ); |
|
4679 |
SetBtPowerState( ETrue ); |
|
4680 |
} |
|
4681 |
||
4682 |
if ( iDeactivateBt ) |
|
4683 |
{ |
|
4684 |
TRACES( RDebug::Print(_L("CSysApAppUi::DoStateChangedL Deactivating BT" ) ) ); |
|
4685 |
SetBtPowerState( EFalse ); |
|
4686 |
} |
|
4687 |
||
4688 |
// Other late initializations. |
|
4689 |
// In order to prevent unexpected behaviour e.g. in OOM situations, these calls are made to ensure |
|
4690 |
// that the services are connected when they are needed for the first time. |
|
4691 |
if ( !StarterSession().Handle() ) |
|
4692 |
{ |
|
4693 |
User::Leave( KErrBadHandle ); |
|
4694 |
} |
|
4695 |
||
4696 |
if ( !KeyLock().Handle() ) |
|
4697 |
{ |
|
4698 |
User::Leave( KErrBadHandle ); |
|
4699 |
} |
|
4700 |
||
4701 |
#ifdef __SYSAP_MODULE_TEST |
|
4702 |
ModuleTestShowUiNoteL( _L("SysAp: SW state normal!") ); |
|
4703 |
#endif |
|
4704 |
} |
|
4705 |
||
4706 |
// Allow lights |
|
4707 |
iSysApLightsController->AllowLightsOn(); |
|
4708 |
} |
|
4709 |
||
4710 |
||
4711 |
#endif // SYSAP_USE_STARTUP_UI_PHASE |
|
4712 |
||
4713 |
// ---------------------------------------------------------------------------- |
|
4714 |
// CSysApAppUi::UiReady() |
|
4715 |
// |
|
4716 |
// ---------------------------------------------------------------------------- |
|
4717 |
||
4718 |
TBool CSysApAppUi::UiReady() const |
|
4719 |
{ |
|
4720 |
#ifdef SYSAP_USE_STARTUP_UI_PHASE |
|
4721 |
return iSysApStartupController->UiReady(); |
|
4722 |
#else // SYSAP_USE_STARTUP_UI_PHASE |
|
4723 |
// if startup UI phase information is not used, global system state normal is handled as UI idle state |
|
4724 |
return IsStateNormal(); |
|
4725 |
#endif // SYSAP_USE_STARTUP_UI_PHASE |
|
4726 |
} |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4727 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4728 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4729 |
// CSysApAppUi::PrepareForShutdownAnimation() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4730 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4731 |
void CSysApAppUi::PrepareForShutdownAnimation() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4732 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4733 |
TRACES( RDebug::Print( _L("CSysApAppUi::PrepareForShutdownAnimation() begin") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4734 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4735 |
#ifndef RD_STARTUP_ANIMATION_CUSTOMIZATION |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4736 |
TRACES( RDebug::Print( _L("CSysApAppUi::PrepareForShutdownAnimation() showtime = %d"), iAnimationShowingTime ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4737 |
if ( iAnimationShowingTime ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4738 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4739 |
#endif // RD_STARTUP_ANIMATION_CUSTOMIZATION |
63 | 4740 |
static_cast<CAknAppUi*>(iEikonEnv->EikAppUi())->KeySounds()->PlaySound( EAvkonSIDPowerOffTone ); |
4741 |
CancelGlobalListQuery(); |
|
4742 |
||
4743 |
if ( iSysApPowerKeyMenuObserver ) |
|
4744 |
{ |
|
4745 |
iSysApPowerKeyMenuObserver->Cancel(); |
|
4746 |
} |
|
4747 |
||
4748 |
// deactivate notifiers before showing the shutdown image |
|
4749 |
AknNotifierController::CancelAllNotifications(); |
|
4750 |
AknNotifierController::HideAllNotifications(ETrue); |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4751 |
RWindowGroup groupWin = iCoeEnv->RootWin(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4752 |
iCapturedAppskey = groupWin.CaptureKey( EKeyApplication, KModifierMask, KModifierMask ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4753 |
iCapturedAppskeyUpAndDowns = groupWin.CaptureKeyUpAndDowns( EStdKeyApplication0, KModifierMask, KModifierMask ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4754 |
iEikonEnv->RootWin().SetOrdinalPosition(0, ECoeWinPriorityAlwaysAtFront ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4755 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4756 |
TRACES( RDebug::Print( _L("CSysApAppUi::PrepareForShutdownAnimation() Draw background image" ) ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4757 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4758 |
ShowShutdownImage( KBackgroundImageID ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4759 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4760 |
#ifndef RD_STARTUP_ANIMATION_CUSTOMIZATION |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4761 |
TRACES( RDebug::Print( _L("CSysApAppUi::PrepareForShutdownAnimation() Show Shutdown animation" ) ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4762 |
TInt err(0); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4763 |
TRAP( err, iSysApShutdownAnimation->StartL( iLastPowerKeyWasShort ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4764 |
if ( err ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4765 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4766 |
TRACES( RDebug::Print( _L("SysAp: Shutdown animation fails. Error code: %d" ), err ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4767 |
// Start animation timing immediatily if animation starting fails. |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4768 |
// Otherwise animation will call StartAnimTiming when it is ready. |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4769 |
StartAnimTiming(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4770 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4771 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4772 |
#endif // RD_STARTUP_ANIMATION_CUSTOMIZATION |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4773 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4774 |
TRACES( RDebug::Print( _L("CSysApAppUi::PrepareForShutdownAnimation() end") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4775 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4776 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4777 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4778 |
// ---------------------------------------------------------------------------- |
63 | 4779 |
// CSysApAppUi::PrepareForShutdownImage() |
4780 |
// ---------------------------------------------------------------------------- |
|
4781 |
||
4782 |
void CSysApAppUi::PrepareForShutdownImage() |
|
4783 |
{ |
|
4784 |
TRACES( RDebug::Print( _L("CSysApAppUi::PrepareForShutdownImage() START" ) ) ); |
|
4785 |
||
4786 |
// If RD_STARTUP_ANIMATION_CUSTOMIZATION is enabled, the following actions are always taken in PrepareForShutdownAnimation |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4787 |
#ifndef RD_STARTUP_ANIMATION_CUSTOMIZATION |
63 | 4788 |
if ( !iAnimationShowingTime ) // actions already taken in PrepareForShutdownAnimation |
4789 |
{ |
|
4790 |
static_cast<CAknAppUi*>(iEikonEnv->EikAppUi())->KeySounds()->PlaySound( EAvkonSIDPowerOffTone ); |
|
4791 |
CancelGlobalListQuery(); |
|
4792 |
||
4793 |
if ( iSysApPowerKeyMenuObserver ) |
|
4794 |
{ |
|
4795 |
iSysApPowerKeyMenuObserver->Cancel(); |
|
4796 |
} |
|
4797 |
||
4798 |
// deactivate notifiers before showing the shutdown image |
|
4799 |
AknNotifierController::CancelAllNotifications(); |
|
4800 |
AknNotifierController::HideAllNotifications(ETrue); |
|
4801 |
RWindowGroup groupWin = iCoeEnv->RootWin(); |
|
4802 |
iCapturedAppskey = groupWin.CaptureKey( EKeyApplication, KModifierMask, KModifierMask ); |
|
4803 |
iCapturedAppskeyUpAndDowns = groupWin.CaptureKeyUpAndDowns( EStdKeyApplication0, KModifierMask, KModifierMask ); |
|
4804 |
} |
|
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
4805 |
#endif // RD_STARTUP_ANIMATION_CUSTOMIZATION |
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
4806 |
|
63 | 4807 |
#ifndef __SYSAP_MODULE_TEST //to make errors during shutdown sequence being seen more easily |
4808 |
iEikonEnv->RootWin().SetOrdinalPosition(0, ECoeWinPriorityAlwaysAtFront ); |
|
4809 |
TRACES( RDebug::Print( _L("CSysApAppUi::PrepareForShutdownImage() Show Shutdown image" ) ) ); |
|
4810 |
ShowShutdownImage( EMbmSysapQgn_startup_screen ); |
|
4811 |
#endif |
|
4812 |
TRACES( RDebug::Print( _L("CSysApAppUi::PrepareForShutdownImage() END" ) ) ); |
|
4813 |
} |
|
4814 |
||
4815 |
// ---------------------------------------------------------------------------- |
|
4816 |
// CSysApAppUi::SetStatusPaneLauoutL( const TSysApPhoneState aState ) |
|
4817 |
// ---------------------------------------------------------------------------- |
|
4818 |
||
4819 |
void CSysApAppUi::SetStatusPaneLayoutL( const TSysApPhoneState aState ) |
|
4820 |
{ |
|
4821 |
TRACES( RDebug::Print( _L("CSysApAppUi::SetStatusPaneLayoutL aState: %d"), aState ) ); |
|
4822 |
if( aState == ESysApNormal ) |
|
4823 |
//Status pane cannot be even visible on Normal mode |
|
4824 |
{ |
|
4825 |
StatusPane()->MakeVisible( EFalse ); |
|
4826 |
StatusPane()->SwitchLayoutL( R_AVKON_STATUS_PANE_LAYOUT_EMPTY ); |
|
4827 |
} |
|
4828 |
else if( aState == ESysApCharging ) |
|
4829 |
//SysAp's statuspane is visible on Charging mode |
|
4830 |
{ |
|
4831 |
StatusPane()->MakeVisible( ETrue ); |
|
4832 |
StatusPane()->SwitchLayoutL( R_AVKON_STATUS_PANE_LAYOUT_POWER_OFF_RECHARGE ); |
|
4833 |
} |
|
4834 |
else if( aState == ESysApAlarm ) |
|
4835 |
{ |
|
4836 |
if ( !Layout_Meta_Data::IsLandscapeOrientation() ) |
|
4837 |
{ |
|
4838 |
// Portrait mode |
|
4839 |
StatusPane()->MakeVisible( ETrue ); |
|
4840 |
StatusPane()->SwitchLayoutL( R_AVKON_STATUS_PANE_LAYOUT_POWER_OFF_RECHARGE ); |
|
4841 |
} |
|
4842 |
else |
|
4843 |
{ |
|
4844 |
// Landscape mode |
|
4845 |
TInt layout = R_AVKON_STATUS_PANE_LAYOUT_POWER_OFF_RECHARGE; |
|
4846 |
// For side softkey devices, use different layout |
|
4847 |
if (AVKONENV->StatusPaneResIdForCurrentLayout(R_AVKON_STATUS_PANE_LAYOUT_USUAL) == R_AVKON_STACON_PANE_LAYOUT_USUAL_SOFTKEYS_RIGHT) |
|
4848 |
layout = R_AVKON_STACON_PANE_LAYOUT_EMPTY_SOFTKEYS_RIGHT; |
|
4849 |
else if (AVKONENV->StatusPaneResIdForCurrentLayout(R_AVKON_STATUS_PANE_LAYOUT_USUAL) == R_AVKON_STACON_PANE_LAYOUT_USUAL_SOFTKEYS_LEFT) |
|
4850 |
layout = R_AVKON_STACON_PANE_LAYOUT_EMPTY_SOFTKEYS_LEFT; |
|
4851 |
||
4852 |
StatusPane()->MakeVisible( ETrue ); |
|
4853 |
StatusPane()->SwitchLayoutL( layout ); |
|
4854 |
} |
|
4855 |
} |
|
4856 |
} |
|
4857 |
||
4858 |
// ---------------------------------------------------------------------------- |
|
4859 |
// CSysApAppUi::OkToInitiateShutdown() |
|
4860 |
// ---------------------------------------------------------------------------- |
|
4861 |
||
4862 |
TBool CSysApAppUi::OkToInitiateShutdown() |
|
4863 |
{ |
|
4864 |
TInt swState; |
|
4865 |
RProperty::Get( KPSUidStartup, KPSGlobalSystemState, swState ); |
|
4866 |
||
4867 |
if( !iShutdownStarted && |
|
4868 |
swState == ESwStateStartingCriticalApps || |
|
4869 |
swState == ESwStateSelfTestOK || |
|
4870 |
swState == ESwStateSecurityCheck || |
|
4871 |
swState == ESwStateCriticalPhaseOK || |
|
4872 |
swState == ESwStateEmergencyCallsOnly || |
|
4873 |
swState == ESwStateCharging || |
|
4874 |
swState == ESwStateAlarm || |
|
4875 |
swState == ESwStateNormalRfOn || |
|
4876 |
swState == ESwStateNormalRfOff || |
|
4877 |
swState == ESwStateNormalBTSap || |
|
4878 |
swState == ESwStateFatalStartupError ) |
|
4879 |
{ |
|
4880 |
iShutdownStarted = ETrue; |
|
4881 |
return ETrue; |
|
4882 |
} |
|
4883 |
else |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4884 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4885 |
return EFalse; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4886 |
} |
63 | 4887 |
} |
4888 |
||
4889 |
/** |
|
4890 |
* To check the for an emergency call. |
|
4891 |
* |
|
4892 |
* @return ETrue if there is an emergency call active otherwise, EFalse. |
|
4893 |
*/ |
|
4894 |
TBool IsEmergencyCall() |
|
4895 |
{ |
|
4896 |
TBool retVal( EFalse ); |
|
4897 |
TInt err( KErrNone ); |
|
4898 |
TInt state( 0 ); |
|
4899 |
||
4900 |
err = RProperty::Get(KPSUidCtsyEmergencyCallInfo, KCTSYEmergencyCallInfo, state ); |
|
4901 |
if ( err == KErrNone && state ) |
|
4902 |
{ |
|
4903 |
retVal = ETrue; |
|
4904 |
} |
|
4905 |
return retVal; |
|
4906 |
} |
|
4907 |
||
4908 |
// ---------------------------------------------------------------------------- |
|
4909 |
// CSysApAppUi::HandleCurrentCallStateChangeL() |
|
4910 |
// ---------------------------------------------------------------------------- |
|
4911 |
||
4912 |
void CSysApAppUi::HandleCurrentCallStateChangeL( TInt aCurrentCallState ) |
|
4913 |
{ |
|
4914 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleCurrentCallStateChangeL: KUidCurrentCall: %d" ), aCurrentCallState ) ); |
|
4915 |
||
4916 |
if( iPowerKeyPopupMenuActive ) |
|
4917 |
{ |
|
4918 |
CancelGlobalListQuery(); |
|
4919 |
} |
|
4920 |
||
4921 |
switch ( aCurrentCallState ) |
|
4922 |
{ |
|
4923 |
case EPSCTsyCallStateRinging: |
|
4924 |
{ |
|
4925 |
iSysApLightsController->CallComingInL( ETrue ); |
|
4926 |
// Disable keylock when a call is coming in |
|
4927 |
if ( iKeyLockEnabled || iDeviceLockEnabled || iKeyLockOnBeforeCradle || iKeyLockOnBeforeAlarm ) |
|
4928 |
{ |
|
4929 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleCurrentCallStateChangeL: EPSCTsyCallStateRinging: disable keylock") ) ); |
|
4930 |
iKeyLockOnBeforeCall = ETrue; |
|
4931 |
||
4932 |
if ( iKeyLockEnabled || iDeviceLockEnabled ) |
|
4933 |
{ |
|
4934 |
if ( !iSysApFeatureManager->TouchUnlockStrokeSupported() ) |
|
4935 |
{ |
|
4936 |
KeyLock().DisableWithoutNote(); |
|
4937 |
} |
|
4938 |
} |
|
4939 |
} |
|
4940 |
break; |
|
4941 |
} |
|
4942 |
||
4943 |
case EPSCTsyCallStateDialling: |
|
4944 |
{ |
|
4945 |
// Disable keypad lock during an emergency call |
|
4946 |
// no need to disable the key lock when a call is made using the wireless car-kit |
|
4947 |
// but if the call is an emergency one then we will disable the keypad lock |
|
4948 |
if ( iKeyLockEnabled || iDeviceLockEnabled || iKeyLockOnBeforeCradle ) |
|
4949 |
{ |
|
4950 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleCurrentCallStateChangeL: EPSCTsyCallStateDialling: disable keylock") ) ); |
|
4951 |
iKeyLockOnBeforeCall = ETrue; |
|
4952 |
||
4953 |
if ( IsEmergencyCall() && (iKeyLockEnabled || iDeviceLockEnabled )) |
|
4954 |
{ |
|
4955 |
KeyLock().DisableWithoutNote(); |
|
4956 |
} |
|
4957 |
} |
|
4958 |
||
4959 |
// Enable signal & network indicators when an emergency call is made in Offline Mode |
|
4960 |
if( iSysApOfflineModeController->OfflineModeActive() ) |
|
4961 |
{ |
|
4962 |
// Signal indicators not updated with VoIP call |
|
4963 |
if ( StateOfProperty(KPSUidCtsyCallInformation, KCTsyCallType) != EPSCTsyCallTypeVoIP) |
|
4964 |
{ |
|
4965 |
iEmergencyCallActive = ETrue; |
|
4966 |
UpdateSignalBarsL(); |
|
4967 |
SetSignalIndicatorL(); |
|
4968 |
} |
|
4969 |
} |
|
4970 |
break; |
|
4971 |
} |
|
4972 |
||
4973 |
case EPSCTsyCallStateConnected: |
|
4974 |
{ |
|
4975 |
if (StateOfProperty(KPSUidCtsyCallInformation, KCTsyCallType) == EPSCTsyCallTypeCSVoice) |
|
4976 |
{ |
|
4977 |
// Check if GPRS suspended note is required |
|
4978 |
iCallActivated = ETrue; |
|
4979 |
HandleGprsNotesL(); |
|
4980 |
} |
|
4981 |
if ( iDeviceLockEnabled ) |
|
4982 |
{ |
|
4983 |
// Enable keylock via autolock emulation if device lock enabled. |
|
4984 |
// Otherwise e.g. messages can be read using softkeys during ongoing call. |
|
4985 |
KeyLock().EnableAutoLockEmulation(); |
|
4986 |
} |
|
4987 |
break; |
|
4988 |
} |
|
4989 |
||
4990 |
case EPSCTsyCallStateNone: |
|
4991 |
{ |
|
4992 |
// reset timers in ScreenSaver and Autolock |
|
4993 |
User::ResetInactivityTime(); |
|
4994 |
||
4995 |
if ( iEmergencyCallActive ) |
|
4996 |
{ |
|
4997 |
iEmergencyCallActive = EFalse; |
|
4998 |
UpdateSignalBarsL( 0 ); |
|
4999 |
SetSignalIndicatorL(); |
|
5000 |
} |
|
5001 |
if ( iKeyLockOnBeforeCall ) |
|
5002 |
{ |
|
5003 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleCurrentCallStateChangeL: EPSCTsyCallStateNone: enable keylock") ) ); |
|
5004 |
iKeyLockOnBeforeCall = EFalse; |
|
5005 |
if ( !iDeviceLockEnabled ) |
|
5006 |
{ |
|
5007 |
if ( !iKeyLockOnBeforeCradle && !iKeyLockOnBeforeAlarm && |
|
5008 |
!iSysApFeatureManager->TouchUnlockStrokeSupported() ) |
|
5009 |
{ |
|
5010 |
if ( iSysApCenRepController->GetInt( KCRUidCommonTelephonySettings, KSettingsSummaryAfterCall ) == 1 ) |
|
5011 |
{ |
|
5012 |
KeyLock().EnableWithoutNote(); // Let's not hide "Summary After Call" dialog |
|
5013 |
} |
|
5014 |
else |
|
5015 |
{ |
|
5016 |
KeyLock().EnableKeyLock(); |
|
5017 |
} |
|
5018 |
} |
|
5019 |
} |
|
5020 |
else |
|
5021 |
{ |
|
5022 |
KeyLock().EnableAutoLockEmulation(); |
|
5023 |
} |
|
5024 |
} |
|
5025 |
if ( iShowkeypadActivatedNoteAfterSoftReject ) |
|
5026 |
{ |
|
5027 |
ShowUiNoteL( EKeypadActiveNote ); |
|
5028 |
iShowkeypadActivatedNoteAfterSoftReject = EFalse; |
|
5029 |
} |
|
5030 |
iCallActivated = EFalse; |
|
5031 |
break; |
|
5032 |
} |
|
5033 |
||
5034 |
default: |
|
5035 |
break; |
|
5036 |
} |
|
5037 |
||
5038 |
if ( aCurrentCallState != EPSCTsyCallStateRinging ) |
|
5039 |
{ |
|
5040 |
iSysApLightsController->CallComingInL( EFalse ); |
|
5041 |
} |
|
5042 |
||
5043 |
SetIhfIndicatorL(); |
|
5044 |
SetHacIndicatorL(); |
|
5045 |
} |
|
5046 |
||
5047 |
// ---------------------------------------------------------------------------- |
|
5048 |
// CSysApAppUi::DoSwStateNormalConstructionL() |
|
5049 |
// ---------------------------------------------------------------------------- |
|
5050 |
||
5051 |
void CSysApAppUi::DoSwStateNormalConstructionL() |
|
5052 |
{ |
|
5053 |
// Let's ensure that the lights will remain on for 15 secs after sw state normal |
|
5054 |
User::ResetInactivityTime(); |
|
5055 |
||
5056 |
TRACES( RDebug::Print( _L("CSysApAppUi::DoSwStateNormalConstructionL : START" ) ) ); |
|
5057 |
||
5058 |
// In case of unexpected reset (e.g. hidden boot) the keylock must be enabled silently. Locking is done |
|
5059 |
// prior to time-consuming initializations, because otherwise UI is in unlocked state for a few seconds. |
|
5060 |
if ( iSysApCenRepController->GetInt( KCRUidCoreApplicationUIsSysAp, KSysApKeyguardActive ) == 1 ) |
|
5061 |
{ |
|
5062 |
TRACES( RDebug::Print( _L("CSysApAppUi::DoSwStateNormalConstructionL: enabling keylock") ) ); |
|
5063 |
KeyLock().EnableWithoutNote(); |
|
5064 |
} |
|
5065 |
||
5066 |
// Initiate bearer change observation |
|
5067 |
iSysApConnectionMonitorObserver = CSysApConnectionMonitorObserver::NewL( *this ); |
|
5068 |
||
5069 |
TRACES( RDebug::Print( _L("CSysApAppUi::DoSwStateNormalConstructionL: trying CSysApSsSettingsObserver::NewL()") ) ); |
|
5070 |
iSysApSsSettingsObserver = CSysApSsSettingsObserver::NewL( *this ); |
|
5071 |
||
5072 |
TRACES( RDebug::Print( _L("CSysApAppUi::DoSwStateNormalConstructionL: trying new ( ELeave ) CSysApPowerKeyMenuObserver") ) ); |
|
5073 |
iSysApPowerKeyMenuObserver = new( ELeave ) CSysApPowerKeyMenuObserver( *this ); |
|
5074 |
||
5075 |
TRACES( RDebug::Print( _L("SysAp: trying CSystemLock::NewL" ) ) ); |
|
5076 |
iSysApSystemLock = CSystemLock::NewL(); |
|
5077 |
||
5078 |
iSysApCenRepCallForwardingObserver = CSysApCenRepCallForwardingObserver::NewL( *this ); |
|
5079 |
||
5080 |
iSysApCenRepMsgWaitingObserver = CSysApCenRepMsgWaitingObserver::NewL( *this ); |
|
5081 |
||
5082 |
||
5083 |
if ( iSysApFeatureManager->Supported( KSysApFeatureIdBatteryInfoPopup ) ) |
|
5084 |
{ |
|
5085 |
if( iSysApBatteryInfoController == NULL) |
|
5086 |
{ |
|
5087 |
iSysApBatteryInfoController = CSysApBatteryInfoController::NewL( iSysApCenRepController->GetInt( KCRUidCoreApplicationUIsConf, |
|
5088 |
KCoreAppUIsBatteryInformationLowThreshold ) ); |
|
5089 |
} |
|
5090 |
} |
|
5091 |
||
5092 |
||
5093 |
TRACES( RDebug::Print( _L("CSysApAppUi::DoSwStateNormalConstructionL : END" ) ) ); |
|
5094 |
} |
|
5095 |
||
5096 |
// ---------------------------------------------------------------------------- |
|
5097 |
// CSysApAppUi::DoSimChangedFromPreviousBootL() |
|
5098 |
// ---------------------------------------------------------------------------- |
|
5099 |
||
5100 |
void CSysApAppUi::DoSimChangedFromPreviousBootL() |
|
5101 |
{ |
|
5102 |
TRACES( RDebug::Print( _L("CSysApAppUi::DoSimChangedFromPreviousBootL: iSimChangedDone=%d" ), iSimChangedDone ) ); |
|
5103 |
||
5104 |
if ( !iSimChangedDone ) |
|
5105 |
{ |
|
5106 |
iSimChangedDone = ETrue; |
|
5107 |
CSysApSimChanged* simChanged = CSysApSimChanged::NewL( *this, iEikonEnv->FsSession() ); |
|
5108 |
CleanupStack::PushL( simChanged ); |
|
5109 |
simChanged->HandleSimChangedL(); |
|
5110 |
CleanupStack::PopAndDestroy( simChanged ); |
|
5111 |
} |
|
5112 |
} |
|
5113 |
||
5114 |
// ---------------------------------------------------------------------------- |
|
5115 |
// CSysApAppUi::CancelWaitNote() |
|
5116 |
// ---------------------------------------------------------------------------- |
|
5117 |
||
5118 |
void CSysApAppUi::CancelWaitNote() |
|
5119 |
{ |
|
5120 |
TRACES( RDebug::Print( _L("CSysApAppUi::CancelWaitNote" ) ) ); |
|
5121 |
if ( iSysApWaitNote ) |
|
5122 |
{ |
|
5123 |
iSysApWaitNote->Cancel(); |
|
5124 |
delete iSysApWaitNote; |
|
5125 |
iSysApWaitNote = NULL; |
|
5126 |
} |
|
5127 |
} |
|
5128 |
||
5129 |
// ---------------------------------------------------------------------------- |
|
5130 |
// CSysApAppUi::CancelGlobalListQuery() |
|
5131 |
// ---------------------------------------------------------------------------- |
|
5132 |
||
5133 |
void CSysApAppUi::CancelGlobalListQuery() |
|
5134 |
{ |
|
5135 |
TRACES( RDebug::Print( _L("CSysApAppUi::CancelGlobalListQuery" ) ) ); |
|
5136 |
if ( iGlobalListQuery ) |
|
5137 |
{ |
|
5138 |
iGlobalListQuery->CancelListQuery(); |
|
5139 |
delete iGlobalListQuery; |
|
5140 |
iGlobalListQuery = NULL; |
|
5141 |
} |
|
5142 |
} |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5143 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5144 |
#ifndef RD_MULTIPLE_DRIVE |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5145 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5146 |
// CSysApAppUi::MountMMC() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5147 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5148 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5149 |
TInt CSysApAppUi::MountMMC() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5150 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5151 |
TRACES( RDebug::Print( _L("CSysApAppUi::MountMMC") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5152 |
TInt err ( KErrNotSupported ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5153 |
if ( iSysApFeatureManager->MmcSupported() ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5154 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5155 |
#ifdef __WINS__ // Let's sleep a second in WINS |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5156 |
User::After( 1000000 ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5157 |
#endif |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5158 |
err = iEikonEnv->FsSession().MountFileSystem( KFSName, KMMCDrive ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5159 |
TRACES( RDebug::Print( _L("CSysApAppUi::MountMMC: RFs::MountFileSystem() returned: %d"), err ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5160 |
if ( err == KErrInUse ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5161 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5162 |
User::After( 1000000 ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5163 |
err = iEikonEnv->FsSession().MountFileSystem( KFSName, KMMCDrive ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5164 |
TRACES( RDebug::Print( _L("CSysApAppUi::MountMMC: RFs::MountFileSystem() returned: %d"), err ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5165 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5166 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5167 |
return err; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5168 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5169 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5170 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5171 |
// CSysApAppUi::DismountMMC() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5172 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5173 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5174 |
TInt CSysApAppUi::DismountMMC() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5175 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5176 |
TRACES( RDebug::Print( _L("CSysApAppUi::DismountMMC") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5177 |
#ifdef __WINS__ // Let's sleep a second in WINS |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5178 |
User::After( 1000000 ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5179 |
#endif |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5180 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5181 |
TInt err ( KErrNotSupported ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5182 |
if ( iSysApFeatureManager->MmcSupported() ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5183 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5184 |
err = iEikonEnv->FsSession().DismountFileSystem( KFSName, KMMCDrive ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5185 |
TRACES( RDebug::Print( _L("CSysApAppUi::DismountMMC: RFs::DismountFileSystem() returned: %d"), err ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5186 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5187 |
return err; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5188 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5189 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5190 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5191 |
// CSysApAppUi::EjectMMCL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5192 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5193 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5194 |
void CSysApAppUi::EjectMMCL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5195 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5196 |
TRACES( RDebug::Print( _L("CSysApAppUi::EjectMMCL") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5197 |
iMMCEjectUsed = ETrue; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5198 |
iMMCPowerMenuEjectUsed = ETrue; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5199 |
iTimeToKill = EFalse; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5200 |
iApplicationScanningRoundNumber = 0; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5201 |
CloseUIAppsInHotSwapL(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5202 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5203 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5204 |
#else // RD_MULTIPLE_DRIVE |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5205 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5206 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5207 |
// CSysApAppUi::EjectMMCL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5208 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5209 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5210 |
void CSysApAppUi::EjectMMCL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5211 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5212 |
// Called from eject confirm query, check drive inserted before start |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5213 |
TInt insertedIndex( CSysApDriveList::Find( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5214 |
iInsertedMemoryCards, iDriveToEject ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5215 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5216 |
TRACES( RDebug::Print( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5217 |
_L( "CSysApAppUi::EjectMMCL: iMMCEjectUsed: %d, drive: %d, index: %d "), |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5218 |
iMMCEjectUsed, iDriveToEject, insertedIndex ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5219 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5220 |
if ( insertedIndex != KErrNotFound ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5221 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5222 |
iSysApDriveList->MarkDriveToEject( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5223 |
iDriveToEject, CSysApDriveList::EEjectFromMenu ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5224 |
iSysApDriveEjectHandler->StartEject(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5225 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5226 |
iMMCEjectUsed = EFalse; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5227 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5228 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5229 |
#endif // RD_MULTIPLE_DRIVE |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5230 |
|
63 | 5231 |
// ---------------------------------------------------------------------------- |
5232 |
// CSysApAppUi::DisconnectBtSap() |
|
5233 |
// ---------------------------------------------------------------------------- |
|
5234 |
||
5235 |
void CSysApAppUi::DisconnectBtSap() |
|
5236 |
{ |
|
5237 |
TRACES( RDebug::Print( _L("CSysApAppUi::DisconnectBtSap") ) ); |
|
5238 |
iSysApBtSapController->Disconnect(); |
|
5239 |
} |
|
5240 |
||
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5241 |
#ifndef RD_MULTIPLE_DRIVE |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5242 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5243 |
// CSysApAppUi::RunUnlockNotifierL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5244 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5245 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5246 |
void CSysApAppUi::RunUnlockNotifierL( TSysApMemoryCardStatus aMemoryCardStatus ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5247 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5248 |
TRACES( RDebug::Print( _L("CSysApAppUi::RunUnlockNotifierL: START") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5249 |
if ( iSysApFeatureManager->MmcSupported() ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5250 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5251 |
if ( UiReady() ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5252 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5253 |
TSysApMemoryCardStatus memoryCardStatus; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5254 |
if ( aMemoryCardStatus == ESysApMemoryCardStatusNotKnown ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5255 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5256 |
memoryCardStatus = iSysApMMCObserver->MemoryCardStatus(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5257 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5258 |
else |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5259 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5260 |
memoryCardStatus = aMemoryCardStatus; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5261 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5262 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5263 |
TRACES( RDebug::Print( _L("CSysApAppUi::RunUnlockNotifierL: memoryCardStatus=%d"), memoryCardStatus ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5264 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5265 |
switch ( memoryCardStatus ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5266 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5267 |
case ESysApMemoryCardInserted: |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5268 |
TRACES( RDebug::Print( _L("CSysApAppUi::RunUnlockNotifierL MMC inserted") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5269 |
if ( aMemoryCardStatus == ESysApMemoryCardInserted ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5270 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5271 |
RProperty::Set( KPSUidUikon, KUikMMCInserted, 1 ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5272 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5273 |
break; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5274 |
case ESysApMemoryCardLocked: |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5275 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5276 |
TRACES( RDebug::Print( _L("CSysApAppUi::RunUnlockNotifierL MMC locked") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5277 |
RProperty::Set( KPSUidUikon, KUikMMCInserted, 0 ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5278 |
TInt callState = StateOfProperty( KPSUidCtsyCallInformation, KCTsyCallState ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5279 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5280 |
if ( (! ( iDeviceLockEnabled || iKeyLockEnabled ) ) && |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5281 |
callState != EPSCTsyCallStateRinging && // We don't want to see the MMC passwd query |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5282 |
callState != EPSCTsyCallStateAlerting ) // when the user is e.g. making an emergency call |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5283 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5284 |
if ( iSysApFeatureManager->MemoryCardLockSupported() ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5285 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5286 |
if ( ! iMemoryCardDialog ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5287 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5288 |
TRACES( RDebug::Print( _L("CSysApAppUi::RunUnlockNotifierL: ACTIVATE MMC passwd query") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5289 |
CAknMemoryCardDialog* mmcDialog = CAknMemoryCardDialog::NewLC( this ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5290 |
iMemoryCardDialog = mmcDialog; // temporary variable used for hiding codescanner error |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5291 |
iMemoryCardDialog->SetSelfPointer( &iMemoryCardDialog ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5292 |
iMemoryCardDialog->UnlockCardLD(); // when UnlockCardLD completes it calls UnlockComplete() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5293 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5294 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5295 |
else |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5296 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5297 |
// Since locked cards are not supported, notify user that card is locked. |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5298 |
ShowQueryL( ESysApMemoryCardLockedNote ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5299 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5300 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5301 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5302 |
break; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5303 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5304 |
case ESysApMemoryCardNotInserted: |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5305 |
default: |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5306 |
TRACES( RDebug::Print( _L("CSysApAppUi::RunUnlockNotifierL MMC not inserted") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5307 |
if ( aMemoryCardStatus == ESysApMemoryCardNotInserted ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5308 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5309 |
RProperty::Set( KPSUidUikon, KUikMMCInserted, 0 ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5310 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5311 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5312 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5313 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5314 |
TRACES( RDebug::Print( _L("CSysApAppUi::RunUnlockNotifierL: END") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5315 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5316 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5317 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5318 |
// CSysApAppUi::UnlockComplete() from MAknMemoryCardDialogObserver |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5319 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5320 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5321 |
void CSysApAppUi::UnlockComplete( TInt aResult ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5322 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5323 |
TRACES( RDebug::Print( _L("CSysApAppUi::UnlockComplete result: %d"), aResult ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5324 |
if ( aResult == KErrNone ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5325 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5326 |
RProperty::Set( KPSUidUikon, KUikMMCInserted, 1 ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5327 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5328 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5329 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5330 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5331 |
// CSysApAppUi::MMCStatusChangedL() from MSysApMemoryCardObserver |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5332 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5333 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5334 |
void CSysApAppUi::MMCStatusChangedL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5335 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5336 |
TRACES( RDebug::Print( _L( "CSysApAppUi::MMCStatusChangedL START: iMMCInserted: %d, iMMCEjectUsed: %d, iHideFirstBeep: %d, iHideNextBeep: %d" ), iMMCInserted, iMMCEjectUsed, iHideFirstBeep, iHideNextBeep ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5337 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5338 |
if ( iSysApFeatureManager->MmcSupported() && !iShutdownStarted ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5339 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5340 |
TSysApMemoryCardStatus memoryCardStatus = iSysApMMCObserver->MemoryCardStatus(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5341 |
TRACES( RDebug::Print( _L( "CSysApAppUi::MMCStatusChangedL memoryCardStatus=%d" ), memoryCardStatus ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5342 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5343 |
switch ( memoryCardStatus ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5344 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5345 |
case ESysApMemoryCardInserted: |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5346 |
case ESysApMemoryCardLocked: |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5347 |
TRACES( RDebug::Print( _L( "CSysApAppUi::MMCStatusChangedL: MMC drive mounted" ) ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5348 |
if ( ! iMMCInserted ) // MMC was not inserted before |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5349 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5350 |
TRACES( RDebug::Print( _L( "CSysApAppUi::MMCStatusChangedL: MMC newly inserted" ) ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5351 |
CancelWaitNote(); // just to be sure, the user might keep on closing and opening the MMC latch |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5352 |
// An MMC has been newly inserted, so play a sound and check if its password protected |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5353 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5354 |
if ( UiReady() ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5355 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5356 |
if ( !iHideFirstBeep && !iHideNextBeep ) // starting up |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5357 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5358 |
Beep(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5359 |
// Switch lights on |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5360 |
iSysApLightsController->MemoryCardInsertedL(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5361 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5362 |
iHideNextBeep = EFalse; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5363 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5364 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5365 |
iMMCPowerMenuEjectUsed = EFalse; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5366 |
iMMCEjectUsed = EFalse; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5367 |
iMMCInserted = ETrue; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5368 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5369 |
// No need to show ESysApRemoveMmcNote after MMC already mounted |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5370 |
if ( iSysApConfirmationQuery ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5371 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5372 |
if ( iSysApConfirmationQuery->CurrentQuery() == ESysApRemoveMmcNote ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5373 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5374 |
iSysApConfirmationQuery->Cancel(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5375 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5376 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5377 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5378 |
// Check if the MMC is locked and unlock it if necessary |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5379 |
RunUnlockNotifierL( memoryCardStatus ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5380 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5381 |
break; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5382 |
default: |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5383 |
TRACES( RDebug::Print( _L( "CSysApAppUi::MMCStatusChangedL: MMC drive not mounted" ) ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5384 |
delete iMemoryCardDialog; // sets itself to null |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5385 |
RProperty::Set( KPSUidUikon, KUikMMCInserted, 0 ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5386 |
if ( iMMCInserted ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5387 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5388 |
// No need to show ESysApEjectMmcQuery after MMC already removed |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5389 |
if ( iSysApConfirmationQuery ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5390 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5391 |
if ( iSysApConfirmationQuery->CurrentQuery() == ESysApEjectMmcQuery ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5392 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5393 |
iSysApConfirmationQuery->Cancel(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5394 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5395 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5396 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5397 |
iMMCInserted = EFalse; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5398 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5399 |
TInt propertyValue( StateOfProperty( KPSUidUsbWatcher, KUsbWatcherSelectedPersonality ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5400 |
if ( !iMMCEjectUsed && propertyValue != KUsbPersonalityIdMS ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5401 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5402 |
// if USB file transfer active, do not close applications |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5403 |
// if eject selected in MMC App, MMC App takes care of the following and |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5404 |
// if eject selected from powerkeymenu, applications have already been shutdown |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5405 |
iTimeToKill = EFalse; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5406 |
iApplicationScanningRoundNumber = 0; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5407 |
CloseUIAppsInHotSwapL(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5408 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5409 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5410 |
else |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5411 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5412 |
// If MMC was not previously inserted and eject was chosed from power key menu, attempt to remount. |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5413 |
if ( iMMCPowerMenuEjectUsed ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5414 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5415 |
TRACES( RDebug::Print( _L( "CSysApAppUi::MMCStatusChangedL: Attempt to remount" ) ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5416 |
MountMMC(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5417 |
// If mount was successful, unnecessary note will be canceled in insert notification handling. |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5418 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5419 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5420 |
break; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5421 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5422 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5423 |
// Update memory card indicator status |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5424 |
SetMemoryCardIndicatorL(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5425 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5426 |
TRACES( RDebug::Print( _L( "CSysApAppUi::MMCStatusChangedL END: iMMCInserted: %d, iMMCEjectUsed: %d, iHideFirstBeep: %d, iHideNextBeep: %d" ), iMMCInserted, iMMCEjectUsed, iHideFirstBeep, iHideNextBeep ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5427 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5428 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5429 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5430 |
// CSysApAppUi::ShowMMCDismountedDialogL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5431 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5432 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5433 |
void CSysApAppUi::ShowMMCDismountedDialogL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5434 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5435 |
TInt propertyValue( StateOfProperty( KPSUidUsbWatcher, KUsbWatcherSelectedPersonality ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5436 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5437 |
// Do not show any note if USB file transfer is active. |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5438 |
if ( propertyValue != KUsbPersonalityIdMS ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5439 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5440 |
if ( iSysApFeatureManager->MemoryCardHatchSupported() ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5441 |
{ // MMC hatch has been opened and MMC has been dismounted |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5442 |
TRACES( RDebug::Print( _L( "CSysApAppUi::ShowMMCDismountedDialogL: Show note: Remove MMC and press OK." ) ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5443 |
ShowQueryL( ESysApRemoveMmcNote ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5444 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5445 |
else |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5446 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5447 |
// MMC has been removed and dismounted |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5448 |
TRACES( RDebug::Print( _L( "CSysApAppUi::ShowMMCDismountedDialogL: Show note: You might have lost some data." ) ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5449 |
// No confirmation but let's set this true to enable MMC passwd query |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5450 |
ShowUiNoteL( EMemoryCardRemovedWithoutEjectNote ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5451 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5452 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5453 |
else |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5454 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5455 |
TRACES( RDebug::Print( _L( "CSysApAppUi::ShowMMCDismountedDialogL: No note shown, USB file transfer caused dismount." ) ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5456 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5457 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5458 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5459 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5460 |
// CSysApAppUi::MMCDismountedDialogConfirmed |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5461 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5462 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5463 |
void CSysApAppUi::MMCDismountedDialogConfirmed() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5464 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5465 |
TRACES( RDebug::Print( _L( "CSysApAppUi::MMCDismountedDialogConfirmed") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5466 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5467 |
// Try to remount just in case when eject was chosen from power key menu |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5468 |
if ( iMMCPowerMenuEjectUsed ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5469 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5470 |
iMMCPowerMenuEjectUsed = EFalse; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5471 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5472 |
if ( MountMMC() == KErrLocked ) // In case a locked card was not removed after all |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5473 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5474 |
TRAPD( err, MMCStatusChangedL() ); // This will update power menu and memory card icon. Also memory card password is requeried. |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5475 |
if ( err != KErrNone ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5476 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5477 |
TRACES( RDebug::Print( _L( "CSysApAppUi::MMCDismountedDialogConfirmed: MMCStatusChangedL failed, err=%d"), err ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5478 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5479 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5480 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5481 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5482 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5483 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5484 |
#else // RD_MULTIPLE_DRIVE |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5485 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5486 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5487 |
// CSysApAppUi::MMCInsertedL |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5488 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5489 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5490 |
void CSysApAppUi::MMCInsertedL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5491 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5492 |
TRACES( RDebug::Print( _L( "CSysApAppUi::MMCInsertedL") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5493 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5494 |
if ( iSysApFeatureManager->MmcSupported() && !iShutdownStarted ) |
63 | 5495 |
{ |
5496 |
TBool normalState( UiReady() ); |
|
5497 |
||
5498 |
if ( normalState ) |
|
5499 |
{ |
|
5500 |
TInt defaultMemoryCard( iSysApDriveList->DefaultMemoryCard() ); |
|
5501 |
TSysApMemoryCardStatus memoryCardStatus( iSysApDriveList->MemoryCardStatus( defaultMemoryCard ) ); |
|
5502 |
||
5503 |
TRACES( RDebug::Print( |
|
5504 |
_L( "CSysApAppUi::MMCInsertedL: drive: %d, memoryCardStatus: %d" ), defaultMemoryCard, memoryCardStatus ) ); |
|
5505 |
||
5506 |
switch ( memoryCardStatus ) |
|
5507 |
{ |
|
5508 |
case ESysApMemoryCardInserted: // Fall through |
|
5509 |
case ESysApMemoryCardLocked: |
|
5510 |
{ |
|
5511 |
// Reset eject and unlock of inserted memory card |
|
5512 |
iSysApDriveList->ResetDriveToEject( defaultMemoryCard ); |
|
5513 |
iSysApDriveList->ResetDriveUnlockQueryShown( defaultMemoryCard ); |
|
5514 |
||
5515 |
CancelWaitNote(); |
|
5516 |
||
5517 |
if ( memoryCardStatus == ESysApMemoryCardInserted ) |
|
5518 |
{ |
|
5519 |
TRACES( RDebug::Print( |
|
5520 |
_L( "CSysApAppUi::MMCInsertedL: memoryCardStatus ESysApMemoryCardInserted: %d" ), memoryCardStatus ) ); |
|
5521 |
RProperty::Set( KPSUidUikon, KUikMMCInserted, 1 ); |
|
5522 |
} |
|
5523 |
else |
|
5524 |
{ |
|
5525 |
TRACES( RDebug::Print( |
|
5526 |
_L( "CSysApAppUi::MMCInsertedL: memoryCardStatus ESysApMemoryCardLocked: %d" ), memoryCardStatus ) ); |
|
5527 |
RProperty::Set( KPSUidUikon, KUikMMCInserted, 0 ); |
|
5528 |
} |
|
5529 |
break; |
|
5530 |
} |
|
5531 |
case ESysApMemoryCardNotInserted: |
|
5532 |
{ |
|
5533 |
// Always reset eject and unlock of removed memory card |
|
5534 |
TBool isEject( iSysApDriveList->IsDriveToEject( defaultMemoryCard ) ); |
|
5535 |
||
5536 |
TRACES( RDebug::Print( |
|
5537 |
_L( "CSysApAppUi::MMCInsertedL: isEject: %d, drive: %d" ), |
|
5538 |
isEject, defaultMemoryCard ) ); |
|
5539 |
||
5540 |
iSysApDriveList->ResetDriveToEject( defaultMemoryCard ); |
|
5541 |
iSysApDriveList->ResetDriveUnlockQueryShown( defaultMemoryCard ); |
|
5542 |
||
5543 |
TRACES( RDebug::Print( |
|
5544 |
_L( "SysApAppUi::MMCInsertedL: memoryCardStatus ESysApMemoryCardNotInserted: %d" ), memoryCardStatus ) ); |
|
5545 |
||
5546 |
RProperty::Set( KPSUidUikon, KUikMMCInserted, 0 ); |
|
5547 |
break; |
|
5548 |
} |
|
5549 |
case ESysApMemoryCardStatusNotKnown: // Fall through |
|
5550 |
default: |
|
5551 |
{ |
|
5552 |
break; |
|
5553 |
} |
|
5554 |
} |
|
5555 |
RunUnlockNotifierL(); |
|
5556 |
} |
|
5557 |
} |
|
5558 |
} |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5559 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5560 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5561 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5562 |
// CSysApAppUi::RunUnlockNotifierL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5563 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5564 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5565 |
void CSysApAppUi::RunUnlockNotifierL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5566 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5567 |
TRACES( RDebug::Print( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5568 |
_L("CSysApAppUi::RunUnlockNotifierL: START iDeviceLockEnabled: %d, iKeyLockEnabled: %d" ), |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5569 |
iDeviceLockEnabled, iKeyLockEnabled ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5570 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5571 |
if ( !iSysApFeatureManager->MmcSupported() || |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5572 |
iDeviceLockEnabled || |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5573 |
iKeyLockEnabled || |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5574 |
!UiReady() ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5575 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5576 |
TRACES( RDebug::Print( _L("CSysApAppUi::RunUnlockNotifierL: END") ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5577 |
return; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5578 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5579 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5580 |
// We don't want to see the MMC passwd query |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5581 |
// when the user is e.g. making an emergency call |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5582 |
TInt callState( StateOfProperty( KPSUidCtsyCallInformation, KCTsyCallState ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5583 |
if ( callState != EPSCTsyCallStateRinging && |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5584 |
callState != EPSCTsyCallStateAlerting ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5585 |
{ |
63 | 5586 |
iSysApDriveUnlockHandler->StartUnlock(); |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5587 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5588 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5589 |
TRACES( RDebug::Print( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5590 |
_L("CSysApAppUi::RunUnlockNotifierL: END callState: %d"), callState ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5591 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5592 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5593 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5594 |
// CSysApAppUi::MMCStatusChangedL() from MSysApMemoryCardObserver |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5595 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5596 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5597 |
void CSysApAppUi::MMCStatusChangedL( TInt aDrive ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5598 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5599 |
TRACES( RDebug::Print( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5600 |
_L( "CSysApAppUi::MMCStatusChangedL START: MMCCount: %d, iMMCEjectUsed: %d" ), |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5601 |
iInsertedMemoryCards.Count(), iMMCEjectUsed ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5602 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5603 |
if ( iShutdownStarted || !iSysApFeatureManager->MmcSupported() ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5604 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5605 |
TRACES( RDebug::Print( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5606 |
_L( "CSysApAppUi::MMCStatusChangedL iShutdownStarted: %d END" ), |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5607 |
iShutdownStarted ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5608 |
return; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5609 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5610 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5611 |
TBool normalState( UiReady() ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5612 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5613 |
TInt defaultMemoryCard( iSysApDriveList->DefaultMemoryCard() ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5614 |
TSysApMemoryCardStatus memoryCardStatus( iSysApDriveList->MemoryCardStatus( aDrive ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5615 |
TInt insertedIndex( CSysApDriveList::Find( iInsertedMemoryCards, aDrive ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5616 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5617 |
TRACES( RDebug::Print( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5618 |
_L( "CSysApAppUi::MMCStatusChangedL: normalState: %d, index: %d, drive: %d, memoryCardStatus: %d" ), |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5619 |
normalState, insertedIndex, aDrive, memoryCardStatus ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5620 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5621 |
switch ( memoryCardStatus ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5622 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5623 |
case ESysApMemoryCardInserted: // Fall through |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5624 |
case ESysApMemoryCardLocked: |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5625 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5626 |
if ( insertedIndex == KErrNotFound ) // Not inserted before |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5627 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5628 |
// Reset eject and unlock of inserted memory card |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5629 |
iSysApDriveList->ResetDriveToEject( aDrive ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5630 |
iSysApDriveList->ResetDriveUnlockQueryShown( aDrive ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5631 |
|
63 | 5632 |
CancelWaitNote(); |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5633 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5634 |
if ( aDrive == defaultMemoryCard ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5635 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5636 |
if ( memoryCardStatus == ESysApMemoryCardInserted ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5637 |
{ |
63 | 5638 |
RProperty::Set( KPSUidUikon, KUikMMCInserted, 1 ); |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5639 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5640 |
else |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5641 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5642 |
RProperty::Set( KPSUidUikon, KUikMMCInserted, 0 ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5643 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5644 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5645 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5646 |
if ( normalState ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5647 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5648 |
// Ignore extra beep from USB file transfer |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5649 |
TBool ignoreBeep( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5650 |
iSysApDriveList->IsDriveInsertBeepIgnored( aDrive ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5651 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5652 |
TRACES( RDebug::Print( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5653 |
_L( "CSysApAppUi::MMCStatusChangedL: ignoreBeep: %d, drive: %d" ), |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5654 |
ignoreBeep, aDrive ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5655 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5656 |
if ( !ignoreBeep ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5657 |
{ |
63 | 5658 |
Beep(); |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5659 |
iSysApLightsController->MemoryCardInsertedL(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5660 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5661 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5662 |
iSysApDriveList->ResetDriveInsertBeepIgnored( aDrive ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5663 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5664 |
// Keep ignoring extra beep if USB file transfer is active |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5665 |
TInt propertyValue( StateOfProperty( KPSUidUsbWatcher, KUsbWatcherSelectedPersonality ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5666 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5667 |
TRACES( RDebug::Print( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5668 |
_L( "CSysApAppUi::MMCStatusChangedL: usbState: %d" ), propertyValue ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5669 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5670 |
if ( propertyValue == KUsbPersonalityIdMS ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5671 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5672 |
iSysApDriveList->MarkDriveInsertBeepIgnored( aDrive ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5673 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5674 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5675 |
|
63 | 5676 |
if ( iDriveToDismount == aDrive && iSysApConfirmationQuery ) |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5677 |
{ |
63 | 5678 |
if ( iSysApConfirmationQuery->CurrentQuery() == ESysApRemoveMmcNote ) |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5679 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5680 |
// User put back ejected memory card or did not remove it |
63 | 5681 |
iSysApConfirmationQuery->Cancel(); |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5682 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5683 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5684 |
RunUnlockNotifierL(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5685 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5686 |
break; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5687 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5688 |
case ESysApMemoryCardNotInserted: |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5689 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5690 |
// Always reset eject and unlock of removed memory card |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5691 |
TBool isEject( iSysApDriveList->IsDriveToEject( aDrive ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5692 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5693 |
TRACES( RDebug::Print( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5694 |
_L( "CSysApAppUi::MMCStatusChangedL: isEject: %d, drive: %d" ), |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5695 |
isEject, aDrive ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5696 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5697 |
iSysApDriveList->ResetDriveToEject( aDrive ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5698 |
iSysApDriveList->ResetDriveUnlockQueryShown( aDrive ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5699 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5700 |
if ( insertedIndex != KErrNotFound ) // Inserted before |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5701 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5702 |
if ( memoryCardStatus == ESysApMemoryCardNotInserted ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5703 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5704 |
// Reset extra beep ignore if memory card was removed without eject |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5705 |
iSysApDriveList->ResetDriveInsertBeepIgnored( aDrive ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5706 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5707 |
|
63 | 5708 |
CancelGlobalListQuery(); // Cancel power menu |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5709 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5710 |
if ( aDrive == defaultMemoryCard ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5711 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5712 |
RProperty::Set( KPSUidUikon, KUikMMCInserted, 0 ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5713 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5714 |
|
63 | 5715 |
if ( iSysApConfirmationQuery ) |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5716 |
{ |
63 | 5717 |
if ( iSysApConfirmationQuery->CurrentQuery() == ESysApEjectMmcQuery ) |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5718 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5719 |
// User removed memory card too early |
63 | 5720 |
iSysApConfirmationQuery->Cancel(); |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5721 |
// Allow application closing to execute. |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5722 |
// Also FileManager is closed in this case, regardless where the eject was initiated from. |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5723 |
iMMCEjectUsed = EFalse; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5724 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5725 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5726 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5727 |
// Stop unlock of removed memory card |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5728 |
iSysApDriveUnlockHandler->StopUnlock( aDrive ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5729 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5730 |
if ( !iMMCEjectUsed && !isEject ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5731 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5732 |
TInt propertyValue( StateOfProperty( KPSUidUsbWatcher, KUsbWatcherSelectedPersonality ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5733 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5734 |
TRACES( RDebug::Print( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5735 |
_L( "CSysApAppUi::MMCStatusChangedL: usbState: %d" ), propertyValue ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5736 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5737 |
if ( propertyValue != KUsbPersonalityIdMS ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5738 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5739 |
if ( iSysApFeatureManager->MemoryCardHatchSupported() ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5740 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5741 |
// Store drive removed without eject and start eject handling |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5742 |
iSysApDriveList->MarkDriveToEject( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5743 |
aDrive, CSysApDriveList::EEjectRemovedWithoutEject ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5744 |
iSysApDriveEjectHandler->StartEject(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5745 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5746 |
else |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5747 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5748 |
// Just show the note |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5749 |
ShowUiNoteL( EMemoryCardRemovedWithoutEjectNote ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5750 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5751 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5752 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5753 |
iMMCEjectUsed = EFalse; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5754 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5755 |
break; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5756 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5757 |
case ESysApMemoryCardStatusNotKnown: // Fall through |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5758 |
default: |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5759 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5760 |
break; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5761 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5762 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5763 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5764 |
// Update inserted memory cards |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5765 |
iSysApDriveList->GetMemoryCardsL( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5766 |
iInsertedMemoryCards, CSysApDriveList::EIncludeInserted ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5767 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5768 |
// Update memory card indicator status |
63 | 5769 |
SetMemoryCardIndicatorL(); |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5770 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5771 |
TRACES( RDebug::Print( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5772 |
_L( "CSysApAppUi::MMCStatusChangedL END: MMCCount: %d, iMMCEjectUsed: %d" ), |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5773 |
iInsertedMemoryCards.Count(), iMMCEjectUsed ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5774 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5775 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5776 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5777 |
// CSysApAppUi::ShowMMCDismountedDialogL() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5778 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5779 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5780 |
TBool CSysApAppUi::ShowMMCDismountedDialogL( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5781 |
TInt aDrive, CSysApDriveList::TDriveEjectType aEjectType ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5782 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5783 |
TRACES( RDebug::Print( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5784 |
_L( "CSysApAppUi::ShowMMCDismountedDialogL: aDrive: %d, aEjectType: %d" ), |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5785 |
aDrive, aEjectType ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5786 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5787 |
TBool ret( EFalse ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5788 |
iDriveToDismount = aDrive; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5789 |
HBufC* driveName = iSysApDriveList->GetFormattedDriveNameLC( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5790 |
aDrive, |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5791 |
R_QTN_EJECT_REMOVE_MEMORY_INFO ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5792 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5793 |
if ( aEjectType == CSysApDriveList::EEjectFromMenu ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5794 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5795 |
TRACES( RDebug::Print( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5796 |
_L( "CSysApAppUi::ShowMMCDismountedDialogL: Show note: Remove MMC and press OK...." ) ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5797 |
ShowQueryL( ESysApRemoveMmcNote, *driveName ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5798 |
ret = ETrue; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5799 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5800 |
else |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5801 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5802 |
// Memory card was removed without eject |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5803 |
TInt propertyValue( StateOfProperty( KPSUidUsbWatcher, KUsbWatcherSelectedPersonality ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5804 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5805 |
// Do not show any note if USB file transfer is active. |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5806 |
if ( propertyValue != KUsbPersonalityIdMS ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5807 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5808 |
if ( iSysApFeatureManager->MemoryCardHatchSupported() ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5809 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5810 |
// MMC hatch has been opened and MMC has been dismounted |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5811 |
TRACES( RDebug::Print( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5812 |
_L( "CSysApAppUi::ShowMMCDismountedDialogL: Show note: Remove MMC and press OK." ) ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5813 |
ShowQueryL( ESysApRemoveMmcNote, *driveName ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5814 |
ret = ETrue; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5815 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5816 |
else |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5817 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5818 |
iSysApDriveList->ResetDrivesToEject(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5819 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5820 |
// MMC has been removed and dismounted |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5821 |
TRACES( RDebug::Print( _L( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5822 |
"CSysApAppUi::ShowMMCDismountedDialogL: Show note: You might have lost some data." ) ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5823 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5824 |
// No confirmation but let's set this true to enable MMC passwd query |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5825 |
ShowUiNoteL( EMemoryCardRemovedWithoutEjectNote ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5826 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5827 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5828 |
else |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5829 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5830 |
iSysApDriveList->ResetDrivesToEject(); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5831 |
TRACES( RDebug::Print( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5832 |
_L( "CSysApAppUi::ShowMMCDismountedDialogL: No note shown, USB file transfer caused dismount." ) ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5833 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5834 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5835 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5836 |
CleanupStack::PopAndDestroy( driveName ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5837 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5838 |
TRACES( RDebug::Print( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5839 |
_L( "CSysApAppUi::ShowMMCDismountedDialogL: ret: %d" ), ret ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5840 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5841 |
return ret; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5842 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5843 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5844 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5845 |
// CSysApAppUi::MMCDismountedDialogConfirmed |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5846 |
// ---------------------------------------------------------------------------- |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5847 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5848 |
void CSysApAppUi::MMCDismountedDialogConfirmed() |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5849 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5850 |
TRACES( RDebug::Print( |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5851 |
_L( "CSysApAppUi::MMCDismountedDialogConfirmed: iDriveToDismount: %d" ), |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5852 |
iDriveToDismount ) ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5853 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5854 |
// Try remount to check if drive was put back |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5855 |
iSysApDriveList->MountDrive( iDriveToDismount ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5856 |
if ( !iSysApDriveEjectHandler->CompleteDismount( iDriveToDismount ) ) |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5857 |
{ |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5858 |
// When ready, check for locked memory cards and update indicators |
63 | 5859 |
TRAP_IGNORE( SetMemoryCardIndicatorL() ); |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5860 |
TRAP_IGNORE( RunUnlockNotifierL() ); |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5861 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5862 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5863 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5864 |
#endif // RD_MULTIPLE_DRIVE |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5865 |
|
63 | 5866 |
// ---------------------------------------------------------------------------- |
5867 |
// CSysApAppUi::EjectStarted() |
|
5868 |
// ---------------------------------------------------------------------------- |
|
5869 |
||
5870 |
void CSysApAppUi::EjectStarted( TBool ejectStarted ) |
|
5871 |
{ |
|
5872 |
TRACES( RDebug::Print( _L( "CSysApAppUi::EjectStarted" ) ) ); |
|
5873 |
iMMCEjectUsed = ejectStarted; |
|
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
5874 |
|
63 | 5875 |
#ifndef RD_MULTIPLE_DRIVE |
5876 |
iFileManagerCloseDisabled = ejectStarted; |
|
5877 |
#endif // RD_MULTIPLE_DRIVE |
|
5878 |
} |
|
5879 |
||
5880 |
// ---------------------------------------------------------------------------- |
|
5881 |
// CSysApAppUi::DoLightsTimeoutChangedL |
|
5882 |
// ---------------------------------------------------------------------------- |
|
5883 |
void CSysApAppUi::DoLightsTimeoutChangedL( const TInt aTimeout ) |
|
5884 |
{ |
|
5885 |
iSysApLightsController->DoLightsTimeoutChangedL( aTimeout ); |
|
5886 |
} |
|
5887 |
||
5888 |
#ifdef __SYSAP_MODULE_TEST |
|
5889 |
||
5890 |
// ---------------------------------------------------------------------------- |
|
5891 |
// CSysApAppUi::ModuleTestShowUiNoteL() |
|
5892 |
// ---------------------------------------------------------------------------- |
|
5893 |
||
5894 |
void CSysApAppUi::ModuleTestShowUiNoteL( const TDesC& noteText ) const |
|
5895 |
{ |
|
5896 |
CAknGlobalNote* note = CAknGlobalNote::NewLC(); |
|
5897 |
note->SetTone( EAvkonSIDNoSound ); |
|
5898 |
note->ShowNoteL( EAknGlobalInformationNote, noteText ); |
|
5899 |
CleanupStack::PopAndDestroy(); // note |
|
5900 |
} |
|
5901 |
||
5902 |
#endif |
|
5903 |
||
5904 |
// ---------------------------------------------------------------------------- |
|
5905 |
// CSysApAppUi::ShowShutdownNoteL() |
|
5906 |
// ---------------------------------------------------------------------------- |
|
5907 |
void CSysApAppUi::ShowShutdownNoteL() |
|
5908 |
{ |
|
5909 |
TRACES( RDebug::Print( _L( "CSysApAppUi::ShowShutdownNoteL") ) ); |
|
5910 |
ShowUiNoteL( EShutdownNote ); |
|
5911 |
User::After( KTimeToShowShutdownNote ); |
|
5912 |
} |
|
5913 |
||
5914 |
// ---------------------------------------------------------------------------- |
|
5915 |
// CSysApAppUi::Beep() |
|
5916 |
// ---------------------------------------------------------------------------- |
|
5917 |
void CSysApAppUi::Beep() |
|
5918 |
{ |
|
5919 |
static_cast<CAknAppUi*>(iEikonEnv->EikAppUi())->KeySounds()->PlaySound( EAvkonSIDInformationTone ); |
|
5920 |
} |
|
5921 |
||
5922 |
// ---------------------------------------------------------------------------- |
|
5923 |
// CSysApAppUi::SimSupported() |
|
5924 |
// ---------------------------------------------------------------------------- |
|
5925 |
TBool CSysApAppUi::SimSupported() |
|
5926 |
{ |
|
5927 |
return iSysApFeatureManager->SimSupported(); |
|
5928 |
} |
|
5929 |
||
5930 |
// ---------------------------------------------------------------------------- |
|
5931 |
// CSysApAppUi::IsStateNormal() |
|
5932 |
// |
|
5933 |
// ---------------------------------------------------------------------------- |
|
5934 |
TBool CSysApAppUi::IsStateNormal() const |
|
5935 |
{ |
|
5936 |
TInt state; |
|
5937 |
TInt errorCode = |
|
5938 |
RProperty::Get( KPSUidStartup, KPSGlobalSystemState, state ); |
|
5939 |
if ( errorCode == KErrNone ) |
|
5940 |
{ |
|
5941 |
return state == ESwStateNormalRfOn || |
|
5942 |
state == ESwStateNormalRfOff || |
|
5943 |
state == ESwStateNormalBTSap; |
|
5944 |
} |
|
5945 |
else |
|
5946 |
{ |
|
5947 |
TRACES( RDebug::Print( _L( "CSysApAppUi::IsStateNormal: Failed to read global system state, error code %d." ), errorCode ) ); |
|
5948 |
return EFalse; |
|
5949 |
} |
|
5950 |
} |
|
5951 |
||
5952 |
// ---------------------------------------------------------------------------- |
|
5953 |
// CSysApAppUi::BatteryEmptyL() |
|
5954 |
// ---------------------------------------------------------------------------- |
|
5955 |
||
5956 |
void CSysApAppUi::BatteryEmptyL() |
|
5957 |
{ |
|
5958 |
iSysApLightsController->BatteryEmptyL( ETrue ); |
|
5959 |
// Do not reactivate keyguard in the next startup |
|
5960 |
iSysApCenRepController->SetInt( KCRUidCoreApplicationUIsSysAp, KSysApKeyguardActive, 0 ); |
|
5961 |
} |
|
5962 |
||
5963 |
// ---------------------------------------------------------------------------- |
|
5964 |
// CSysApAppUi::Max() |
|
5965 |
// ---------------------------------------------------------------------------- |
|
5966 |
||
5967 |
TInt CSysApAppUi::Max( const TInt aA, const TInt aB, const TInt aC ) |
|
5968 |
{ |
|
5969 |
TInt max( aA ); |
|
5970 |
if ( aB > max ) |
|
5971 |
{ |
|
5972 |
max = aB; |
|
5973 |
} |
|
5974 |
if ( aC > max ) |
|
5975 |
{ |
|
5976 |
max = aC; |
|
5977 |
} |
|
5978 |
return max; |
|
5979 |
} |
|
5980 |
||
5981 |
// ---------------------------------------------------------------------------- |
|
5982 |
// CSysApAppUi::SetStarterState() |
|
5983 |
// ---------------------------------------------------------------------------- |
|
5984 |
||
5985 |
TInt CSysApAppUi::SetStarterState( const RStarterSession::TGlobalState aState ) |
|
5986 |
{ |
|
5987 |
if ( iSysApStartupController->GlobalStateChangeAllowed( aState ) ) |
|
5988 |
{ |
|
5989 |
TRACES( RDebug::Print( _L("CSysApAppUi::SetStarterState: aState=%d" ), aState ) ); |
|
5990 |
return StarterSession().SetState( aState ); |
|
5991 |
} |
|
5992 |
else |
|
5993 |
{ |
|
5994 |
TRACES( RDebug::Print( _L("CSysApAppUi::SetStarterState: aState=%d - not allowed" ), aState ) ); |
|
5995 |
return KErrNone; |
|
5996 |
} |
|
5997 |
} |
|
5998 |
||
5999 |
// ---------------------------------------------------------------------------- |
|
6000 |
// CSysApAppUi::GetBtSapDeviceNameL() |
|
6001 |
// ---------------------------------------------------------------------------- |
|
6002 |
||
6003 |
HBufC* CSysApAppUi::GetBtSapDeviceNameL() |
|
6004 |
{ |
|
6005 |
return iSysApBtSapController->GetBtSapDeviceNameL(); |
|
6006 |
} |
|
6007 |
||
6008 |
// ---------------------------------------------------------------------------- |
|
6009 |
// CSysApAppUi::ShowAlarmIndicatorL() |
|
6010 |
// ---------------------------------------------------------------------------- |
|
6011 |
||
6012 |
void CSysApAppUi::ShowAlarmIndicatorL( TBool aShowIndicator ) |
|
6013 |
{ |
|
6014 |
if ( aShowIndicator) |
|
6015 |
{ |
|
6016 |
SetIndicatorStateL( EAknIndicatorAlarmClock, EAknIndicatorStateOn ); |
|
6017 |
} |
|
6018 |
else |
|
6019 |
{ |
|
6020 |
SetIndicatorStateL( EAknIndicatorAlarmClock, EAknIndicatorStateOff ); |
|
6021 |
} |
|
6022 |
} |
|
6023 |
||
6024 |
// ---------------------------------------------------------------------------- |
|
6025 |
// CSysApAppUi::SimulateFlipKeyEventL() |
|
6026 |
// ---------------------------------------------------------------------------- |
|
6027 |
||
6028 |
void CSysApAppUi::SimulateFlipKeyEventL( TBool aFlipOpen ) |
|
6029 |
{ |
|
6030 |
TRACES( RDebug::Print( _L("CSysApAppUi::SimulateFlipKeyEventL: aFlipOpen: %d" ), aFlipOpen ) ); |
|
6031 |
||
6032 |
/* |
|
6033 |
Flip key is constructed when a flip notification via Pub&Sub is received. The reason behind |
|
6034 |
providing this as a key event is to enable unified handling of keys also with flip, and because |
|
6035 |
flip is captured&consumed by Avkon it is not possible to capture flip key events directly |
|
6036 |
from default handler/plugins. |
|
6037 |
*/ |
|
6038 |
||
6039 |
TKeyEvent flipEvent; |
|
6040 |
flipEvent.iCode = aFlipOpen ? EKeyFlipOpen : EKeyFlipClose; |
|
6041 |
flipEvent.iScanCode = 0; |
|
6042 |
flipEvent.iModifiers = 0; |
|
6043 |
flipEvent.iRepeats = 0; |
|
6044 |
||
6045 |
HandleKeyEventL( flipEvent, EEventKey ); |
|
6046 |
} |
|
6047 |
||
6048 |
// ---------------------------------------------------------------------------- |
|
6049 |
// CSysApAppUi::SetFlipOpenL() |
|
6050 |
// ---------------------------------------------------------------------------- |
|
6051 |
||
6052 |
void CSysApAppUi::SetFlipOpenL( TBool aFlipOpen ) |
|
6053 |
{ |
|
6054 |
iSysApLightsController->SetFlipOpenL( aFlipOpen ); |
|
6055 |
} |
|
6056 |
||
6057 |
// ---------------------------------------------------------------------------- |
|
6058 |
// CSysApAppUi::SetGripOpenL() |
|
6059 |
// ---------------------------------------------------------------------------- |
|
6060 |
void CSysApAppUi::SetGripOpenL( TBool aGripOpen ) |
|
6061 |
{ |
|
6062 |
iSysApLightsController->SetGripOpenL( aGripOpen ); |
|
6063 |
} |
|
6064 |
||
6065 |
// ---------------------------------------------------------------------------- |
|
6066 |
// CSysApAppUi::SetNetworkConnectionAllowed() |
|
6067 |
// ---------------------------------------------------------------------------- |
|
6068 |
||
6069 |
void CSysApAppUi::SetNetworkConnectionAllowed( TCoreAppUIsNetworkConnectionAllowed aNetworkConnectionAllowed ) |
|
6070 |
{ |
|
6071 |
TRACES( RDebug::Print( _L("CSysApAppUi::SetNetworkConnectionAllowed: status: %d" ), aNetworkConnectionAllowed ) ); |
|
6072 |
||
6073 |
iSysApCenRepController->SetInt( KCRUidCoreApplicationUIs, KCoreAppUIsNetworkConnectionAllowed, (TInt) aNetworkConnectionAllowed ); |
|
6074 |
||
6075 |
// Also set the Symbian PS key used for the same purpose: |
|
6076 |
RProperty::Set(KUidSystemCategory, KUidPhonePwr.iUid, aNetworkConnectionAllowed ? ESAPhoneOn : ESAPhoneOff); |
|
6077 |
} |
|
6078 |
||
6079 |
// ---------------------------------------------------------------------------- |
|
6080 |
// CSysApAppUi::GetTelServerL() |
|
6081 |
// ---------------------------------------------------------------------------- |
|
6082 |
||
6083 |
RTelServer* CSysApAppUi::GetTelServer() |
|
6084 |
{ |
|
6085 |
if ( iSysApEtelConnector ) |
|
6086 |
{ |
|
6087 |
return iSysApEtelConnector->GetTelServer(); |
|
6088 |
} |
|
6089 |
else |
|
6090 |
{ |
|
6091 |
return NULL; |
|
6092 |
} |
|
6093 |
} |
|
6094 |
||
6095 |
// ---------------------------------------------------------------------------- |
|
6096 |
// CSysApAppUi::CoverDisplaySupported() |
|
6097 |
// ---------------------------------------------------------------------------- |
|
6098 |
||
6099 |
TBool CSysApAppUi::CoverDisplaySupported() |
|
6100 |
{ |
|
6101 |
return iSysApFeatureManager->CoverDisplaySupported(); |
|
6102 |
} |
|
6103 |
||
6104 |
// ---------------------------------------------------------------------------- |
|
6105 |
// CSysApAppUi::StarterSession() |
|
6106 |
// ---------------------------------------------------------------------------- |
|
6107 |
||
6108 |
RStarterSession& CSysApAppUi::StarterSession() |
|
6109 |
{ |
|
6110 |
if ( !iStarterSession.Handle() ) |
|
6111 |
{ |
|
6112 |
// All server connections are tried to be made KTriesToConnectServer times because occasional |
|
6113 |
// fails on connections are possible at least on some servers |
|
6114 |
TRACES( RDebug::Print( _L("CSysApAppUi::StarterSession: trying RStarterSession::Connect()") ) ); |
|
6115 |
TInt thisTry = 0; |
|
6116 |
TInt err; |
|
6117 |
while ( ( err = iStarterSession.Connect() ) != KErrNone && ( thisTry++ ) <= KTriesToConnectServer ) |
|
6118 |
{ |
|
6119 |
User::After( KTimeBeforeRetryingServerConnection ); |
|
6120 |
} |
|
6121 |
||
6122 |
if ( err != KErrNone ) |
|
6123 |
{ |
|
6124 |
// What do in error case? |
|
6125 |
TRACES( RDebug::Print( _L("CSysApAppUi::StarterSession: RStarterSession::Connect() failed with %d"), err ) ); |
|
6126 |
} |
|
6127 |
} |
|
6128 |
||
6129 |
return iStarterSession; |
|
6130 |
} |
|
6131 |
||
6132 |
// ---------------------------------------------------------------------------- |
|
6133 |
// CSysApAppUi::KeyLock() |
|
6134 |
// ---------------------------------------------------------------------------- |
|
6135 |
||
6136 |
RAknKeylock2& CSysApAppUi::KeyLock() |
|
6137 |
{ |
|
6138 |
if ( !iKeyLock.Handle() ) |
|
6139 |
{ |
|
6140 |
// All server connections are tried to be made KTriesToConnectServer times because occasional |
|
6141 |
// fails on connections are possible at least on some servers |
|
6142 |
TInt thisTry = 0; |
|
6143 |
TInt err; |
|
6144 |
||
6145 |
TRACES( RDebug::Print( _L("CSysApAppUi::KeyLock: trying RAknKeylock2::Connect()") ) ); |
|
6146 |
thisTry = 0; |
|
6147 |
while ( ( err = iKeyLock.Connect() ) != KErrNone && ( thisTry++ ) <= KTriesToConnectServer ) |
|
6148 |
{ |
|
6149 |
User::After( KTimeBeforeRetryingServerConnection ); |
|
6150 |
} |
|
6151 |
||
6152 |
if ( err != KErrNone ) |
|
6153 |
{ |
|
6154 |
// What do in error case? |
|
6155 |
TRACES( RDebug::Print( _L("CSysApAppUi::KeyLock: RAknKeylock2::Connect() failed with %d"), err ) ); |
|
6156 |
} |
|
6157 |
} |
|
6158 |
||
6159 |
return iKeyLock; |
|
6160 |
} |
|
6161 |
||
6162 |
// ---------------------------------------------------------------------------- |
|
6163 |
// CSysApAppUi::CenRepController() |
|
6164 |
// ---------------------------------------------------------------------------- |
|
6165 |
||
6166 |
CSysApCenRepController& CSysApAppUi::CenRepController() |
|
6167 |
{ |
|
6168 |
__ASSERT_ALWAYS( iSysApCenRepController, User::Panic( _L("CSysApAppUi::CenRepController"), KErrBadHandle ) ); |
|
6169 |
||
6170 |
return *iSysApCenRepController; |
|
6171 |
} |
|
6172 |
||
6173 |
// ---------------------------------------------------------------------------- |
|
6174 |
// CSysApAppUi::ExecCommandL |
|
6175 |
// ---------------------------------------------------------------------------- |
|
6176 |
// |
|
6177 |
void CSysApAppUi::ExecCommandL( TSysapCommand aCommand ) |
|
6178 |
{ |
|
6179 |
ExecCommandL( aCommand, KNullDesC8 ); |
|
6180 |
} |
|
6181 |
||
6182 |
// ---------------------------------------------------------------------------- |
|
6183 |
// CSysApAppUi::ExecCommandL |
|
6184 |
// ---------------------------------------------------------------------------- |
|
6185 |
// |
|
6186 |
void CSysApAppUi::ExecCommandL( TSysapCommand aCommand, const TDesC8& aParam ) |
|
6187 |
{ |
|
6188 |
TRACES( RDebug::Print(_L("CSysApAppUi::ExecCommandL: aCommand=%d"), aCommand ) ); |
|
6189 |
||
6190 |
switch ( aCommand ) |
|
6191 |
{ |
|
6192 |
case EResetKeyguardState: // reset the internal keyguard flags of the SysAp, except for iKeyLockOnBeforeCradle |
|
6193 |
iKeyLockOnBeforeCall = EFalse; |
|
6194 |
iKeyLockOnBeforeAlarm = EFalse; |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6195 |
break; |
63 | 6196 |
|
6197 |
case ECancelPowermenu: // hide power menu if it is visible |
|
6198 |
if( iPowerKeyPopupMenuActive ) |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6199 |
{ |
63 | 6200 |
CancelGlobalListQuery(); |
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6201 |
} |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6202 |
break; |
63 | 6203 |
|
6204 |
case EUpdateLights: // apply key specific light handling |
|
6205 |
{ |
|
6206 |
TUpdateLightsBuf lightBuf; |
|
6207 |
lightBuf.Copy( aParam ); |
|
6208 |
||
6209 |
switch ( lightBuf() ) |
|
6210 |
{ |
|
6211 |
case EKeyGripClose: |
|
6212 |
SetGripOpenL( EFalse ); |
|
6213 |
break; |
|
6214 |
||
6215 |
case EKeyGripOpen: |
|
6216 |
SetGripOpenL( ETrue ); |
|
6217 |
break; |
|
6218 |
||
6219 |
case EKeyFlipClose: |
|
6220 |
SetFlipOpenL( EFalse ); |
|
6221 |
break; |
|
6222 |
||
6223 |
case EKeyFlipOpen: |
|
6224 |
SetFlipOpenL( ETrue ); |
|
6225 |
break; |
|
6226 |
||
6227 |
default: |
|
6228 |
// No specific light handling for other keys. |
|
6229 |
break; |
|
6230 |
} |
|
6231 |
} |
|
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
6232 |
break; |
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
6233 |
|
63 | 6234 |
default: |
6235 |
// do nothing in release builds since no harm is done |
|
6236 |
__ASSERT_DEBUG( EFalse, User::Panic( _L("CSysApAppUi::ExecCommandL: Invalid command"), KErrArgument ) ); |
|
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
6237 |
break; |
63 | 6238 |
} |
6239 |
} |
|
6240 |
||
6241 |
// ---------------------------------------------------------------------------- |
|
6242 |
// CSysApAppUi::ExecQueryL |
|
6243 |
// ---------------------------------------------------------------------------- |
|
6244 |
// |
|
6245 |
void CSysApAppUi::ExecQueryL( TSysapQuery aQuery, TDes8& aReturn ) |
|
6246 |
{ |
|
6247 |
ExecQueryL( aQuery, aReturn, KNullDesC8 ); |
|
6248 |
} |
|
6249 |
||
6250 |
// ---------------------------------------------------------------------------- |
|
6251 |
// CSysApAppUi::ExecQueryL |
|
6252 |
// ---------------------------------------------------------------------------- |
|
6253 |
// |
|
6254 |
void CSysApAppUi::ExecQueryL( TSysapQuery aQuery, TDes8& aReturn, const TDesC8& /*aParam*/ ) |
|
6255 |
{ |
|
6256 |
TRACES( RDebug::Print(_L("CSysApAppUi::ExecQueryL: aQuery=%d"), aQuery ) ); |
|
6257 |
||
6258 |
switch ( aQuery ) |
|
6259 |
{ |
|
6260 |
case EGetHwrmLight: // get handle to HWRM client session. Returns CHWRMLight*. |
|
6261 |
{ |
|
6262 |
THwrmLightBuf retBuf( iSysApLightsController->GetHwrmLight() ); |
|
6263 |
aReturn.Copy( retBuf ); |
|
6264 |
} |
|
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
6265 |
break; |
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
6266 |
|
63 | 6267 |
case EGetKeylock: // get handle to keylock client session. Returns RAknKeylock2*. |
6268 |
{ |
|
6269 |
TKeyLockBuf retBuf( &(KeyLock()) ); |
|
6270 |
aReturn.Copy( retBuf ); |
|
6271 |
} |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6272 |
break; |
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6273 |
|
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6274 |
default: |
63 | 6275 |
__ASSERT_DEBUG( EFalse, User::Panic( _L("CSysApAppUi::ExecQueryL: Invalid query"), KErrArgument ) ); |
6276 |
User::Leave( KErrArgument ); |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6277 |
break; |
63 | 6278 |
} |
6279 |
} |
|
6280 |
||
6281 |
// ---------------------------------------------------------------------------- |
|
6282 |
// CSysApAppUi::ShowShutdownImage |
|
6283 |
// ---------------------------------------------------------------------------- |
|
6284 |
// |
|
6285 |
TInt CSysApAppUi::ShowShutdownImage( TInt aBitmapId ) |
|
6286 |
{ |
|
6287 |
TRACES( RDebug::Print(_L("CSysApAppUi::ShowShutdownImage") ) ); |
|
6288 |
||
6289 |
TRAPD( err, ShowShutdownImageL( aBitmapId ) ); |
|
6290 |
||
6291 |
if ( err != KErrNone ) |
|
6292 |
{ |
|
6293 |
TRACES( RDebug::Print(_L("CSysApAppUi::ShowShutdownImageL failed, err=%d"), err ) ); |
|
6294 |
} |
|
6295 |
||
6296 |
return err; |
|
6297 |
} |
|
6298 |
||
6299 |
// ---------------------------------------------------------------------------- |
|
6300 |
// CSysApAppUi::ShowShutdownImageL |
|
6301 |
// ---------------------------------------------------------------------------- |
|
6302 |
// |
|
6303 |
void CSysApAppUi::ShowShutdownImageL( TInt aBitmapId ) |
|
6304 |
{ |
|
6305 |
TRACES( RDebug::Print(_L("CSysApAppUi::ShowShutdownImageL") ) ); |
|
6306 |
||
6307 |
if ( !iSysApShutdownImage ) // Shutdown image may be shown without entering normal state (e.g. charging), so construct here |
|
6308 |
{ |
|
6309 |
TRACES( RDebug::Print( _L("CSysApAppUi::ShowShutdownImageL: trying CSysApShutdownImage::NewL()") ) ); |
|
6310 |
iSysApShutdownImage = CSysApShutdownImage::NewL(); |
|
6311 |
} |
|
6312 |
||
6313 |
TRACES( RDebug::Print( _L("CSysApAppUi::ShowShutdownImageL: trying CSysApShutdownImage::ShowShutdownImageL()") ) ); |
|
6314 |
iSysApShutdownImage->ShowShutdownImageL( aBitmapId ); |
|
6315 |
} |
|
6316 |
||
6317 |
// ---------------------------------------------------------------------------- |
|
6318 |
// CSysApAppUi::IgnoreZeroNetworkBarNotifications |
|
6319 |
// ---------------------------------------------------------------------------- |
|
6320 |
// |
|
6321 |
void CSysApAppUi::IgnoreZeroNetworkBarNotifications(TBool aIgnore) |
|
6322 |
{ |
|
6323 |
iIgnoreZeroNetworkBarNotifications = aIgnore; |
|
6324 |
} |
|
6325 |
||
6326 |
// ---------------------------------------------------------------------------- |
|
6327 |
// CSysApAppUi::BtSapEnabled() |
|
6328 |
// ---------------------------------------------------------------------------- |
|
6329 |
||
6330 |
TBool CSysApAppUi::BtSapEnabled() |
|
6331 |
{ |
|
6332 |
if ( iSysApBtSapController ) |
|
6333 |
{ |
|
6334 |
return iSysApBtSapController->BtSapEnabled(); |
|
6335 |
} |
|
6336 |
||
6337 |
return EFalse; |
|
6338 |
} |
|
6339 |
||
6340 |
// ---------------------------------------------------------------------------- |
|
6341 |
// CSysApAppUi::DeactivateBT |
|
6342 |
// ---------------------------------------------------------------------------- |
|
6343 |
// |
|
6344 |
void CSysApAppUi::DeactivateBT() |
|
6345 |
{ |
|
6346 |
// Will deactivate BT when changing to normal mode |
|
6347 |
iDeactivateBt = ETrue; |
|
6348 |
} |
|
6349 |
||
6350 |
// ---------------------------------------------------------------------------- |
|
6351 |
// CSysApAppUi::SetHacIndicatorL() |
|
6352 |
// ---------------------------------------------------------------------------- |
|
6353 |
void CSysApAppUi::SetHacIndicatorL() |
|
6354 |
{ |
|
6355 |
||
6356 |
if ( !iSysApCenRepHacSettingObserver ) |
|
6357 |
{ |
|
6358 |
// Do nothing if HAC setting observer has not been created yet |
|
6359 |
// This occurs in case some party is trying to set HAC indicator during |
|
6360 |
// ConstructL(), e.g. when switching from offline to online during startup |
|
6361 |
TRACES( RDebug::Print( _L("CSysApAppUi::SetHacIndicatorL: do nothing, HAC observer does not exist yet") ) ); |
|
6362 |
return; |
|
6363 |
} |
|
6364 |
||
6365 |
if ( iSysApCenRepHacSettingObserver->HacMode() ) |
|
6366 |
{ |
|
6367 |
TBool accessoryConnected ( EFalse ); |
|
6368 |
||
6369 |
TAccMode accMode(EAccModeHandPortable); |
|
6370 |
||
6371 |
if ( iSysApAccessoryObserver ) |
|
6372 |
{ |
|
6373 |
accMode = iSysApAccessoryObserver->GetAccessoryMode(); |
|
6374 |
||
6375 |
if ( accMode != EAccModeHandPortable ) |
|
6376 |
{ |
|
6377 |
accessoryConnected = ETrue; |
|
6378 |
} |
|
6379 |
} |
|
6380 |
||
6381 |
TInt indicatorState = EAknIndicatorStateOn; |
|
6382 |
||
6383 |
if ( !accessoryConnected ) // When accessory is not connected, check offline and call state |
|
6384 |
{ |
|
6385 |
if ( OfflineModeActive() ) // HAC indicator is not shown in offline mode |
|
6386 |
{ |
|
6387 |
indicatorState = EAknIndicatorStateOff; |
|
6388 |
} |
|
6389 |
else |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6390 |
{ |
63 | 6391 |
// during active call with IHF activated HAC indicator is not shown |
6392 |
TInt callState( StateOfProperty( KPSUidCtsyCallInformation, KCTsyCallState ) ); |
|
6393 |
if ( callState < KErrNone ) |
|
6394 |
{ |
|
6395 |
callState = EPSCTsyCallStateNone; |
|
6396 |
} |
|
6397 |
||
6398 |
if ( callState != EPSCTsyCallStateNone && IhfEnabledL() ) |
|
6399 |
{ |
|
6400 |
indicatorState = EAknIndicatorStateOff; |
|
6401 |
} |
|
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
6402 |
} |
63 | 6403 |
|
6404 |
} |
|
6405 |
else |
|
6406 |
{ |
|
6407 |
// If an accessory is connected, HAC indicator should not be shown |
|
6408 |
indicatorState = EAknIndicatorStateOff; |
|
6409 |
} |
|
6410 |
||
6411 |
SetIndicatorStateL( EAknIndicatorHAC, indicatorState ); |
|
6412 |
||
6413 |
} |
|
6414 |
else |
|
6415 |
{ |
|
6416 |
// If HAC is not active, always disable indicator regardless of accessory state |
|
6417 |
SetIndicatorStateL( EAknIndicatorHAC, EAknIndicatorStateOff ); |
|
6418 |
} |
|
6419 |
||
6420 |
||
6421 |
} |
|
6422 |
||
6423 |
// ---------------------------------------------------------------------------- |
|
6424 |
// CSysApAppUi::HandleResourceChangeL() |
|
6425 |
// ---------------------------------------------------------------------------- |
|
6426 |
||
6427 |
void CSysApAppUi::HandleResourceChangeL( TInt aType ) |
|
6428 |
{ |
|
6429 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleResourceChangeL aType: %d"), aType ) ); |
|
6430 |
CAknAppUi::HandleResourceChangeL(aType); |
|
6431 |
||
6432 |
if ( aType == KEikDynamicLayoutVariantSwitch ) |
|
6433 |
{ |
|
6434 |
#ifdef RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
6435 |
iSysApShutdownImage->SetRect( ApplicationRect() ); |
|
6436 |
#endif // RD_STARTUP_ANIMATION_CUSTOMIZATION |
|
6437 |
||
6438 |
TInt mode; |
|
6439 |
User::LeaveIfError( RProperty::Get( KPSUidStartup, KPSGlobalStartupMode, mode ) ); |
|
6440 |
||
6441 |
if ( mode == EStartupModeAlarm ) |
|
6442 |
{ |
|
6443 |
SetStatusPaneLayoutL( ESysApAlarm ); |
|
6444 |
} |
|
6445 |
} |
|
6446 |
} |
|
6447 |
||
6448 |
// ---------------------------------------------------------------------------- |
|
6449 |
// CSysApAppUi::SetMemoryCardIndicatorL |
|
6450 |
// ---------------------------------------------------------------------------- |
|
6451 |
||
6452 |
void CSysApAppUi::SetMemoryCardIndicatorL() |
|
6453 |
{ |
|
6454 |
if ( iSysApFeatureManager->Supported( KSysApFeatureIdMemoryCardIcon ) ) |
|
6455 |
{ |
|
6456 |
#ifndef RD_MULTIPLE_DRIVE |
|
6457 |
TSysApMemoryCardStatus memoryCardStatus = iSysApMMCObserver->MemoryCardStatus(); |
|
6458 |
||
6459 |
TRACES( RDebug::Print( _L("CSysApAppUi::SetMemoryCardIndicatorL: memoryCardStatus=%d"), memoryCardStatus ) ); |
|
6460 |
||
6461 |
if ( memoryCardStatus == ESysApMemoryCardInserted || memoryCardStatus == ESysApMemoryCardLocked ) |
|
6462 |
#else // RD_MULTIPLE_DRIVE |
|
6463 |
TInt insertedCount( CSysApDriveList::NonUsbDriveCount( iInsertedMemoryCards ) ); |
|
6464 |
||
6465 |
TRACES( RDebug::Print( _L("CSysApAppUi::SetMemoryCardIndicatorL: insertedCount=%d"), insertedCount ) ); |
|
6466 |
||
6467 |
if ( insertedCount > 0 ) |
|
6468 |
#endif // RD_MULTIPLE_DRIVE |
|
6469 |
{ |
|
6470 |
SetIndicatorStateL( EAknIndicatorMemoryCard, EAknIndicatorStateOn ); |
|
6471 |
} |
|
6472 |
else |
|
6473 |
{ |
|
6474 |
SetIndicatorStateL( EAknIndicatorMemoryCard, EAknIndicatorStateOff ); |
|
6475 |
} |
|
6476 |
} |
|
6477 |
} |
|
6478 |
||
6479 |
// ---------------------------------------------------------------------------- |
|
6480 |
// CSysApAppUi::SysApFeatureManager |
|
6481 |
// ---------------------------------------------------------------------------- |
|
6482 |
||
6483 |
CSysApFeatureManager& CSysApAppUi::SysApFeatureManager() |
|
6484 |
{ |
|
6485 |
__ASSERT_DEBUG( iSysApFeatureManager, User::Panic( _L("iSysApFeatureManager == NULL"), KErrBadHandle ) ); |
|
6486 |
||
6487 |
return *iSysApFeatureManager; |
|
6488 |
} |
|
6489 |
||
6490 |
// ---------------------------------------------------------------------------- |
|
6491 |
// CSysApAppUi::SetUsbAttachStatus |
|
6492 |
// ---------------------------------------------------------------------------- |
|
6493 |
#ifndef RD_MULTIPLE_DRIVE |
|
6494 |
void CSysApAppUi::SetUsbAttachStatus( const TBool aUsbAttached ) |
|
6495 |
{ |
|
6496 |
// Prevent double beep when USB file transfer gets activated but |
|
6497 |
// allow MMC inserted beep when: |
|
6498 |
// a) USB file transfer is active |
|
6499 |
// b) MMC is not inserted when USB cable is attached |
|
6500 |
iHideNextBeep = ( iMMCInserted && aUsbAttached ); |
|
6501 |
} |
|
6502 |
#else // RD_MULTIPLE_DRIVE |
|
6503 |
void CSysApAppUi::SetUsbAttachStatus( const TBool aUsbAttached ) |
|
6504 |
{ |
|
6505 |
TRACES( RDebug::Print( |
|
6506 |
_L( "CSysApAppUi::SetUsbAttachStatus: aUsbAttached: %d" ), |
|
6507 |
aUsbAttached ) ); |
|
6508 |
||
6509 |
if ( aUsbAttached ) |
|
6510 |
{ |
|
6511 |
// For ignoring extra beeps caused by USB file transfer |
|
6512 |
iSysApDriveList->ResetDrivesInsertBeepIgnored(); |
|
6513 |
iSysApDriveList->MarkDrivesInsertBeepIgnored( iInsertedMemoryCards ); |
|
6514 |
} |
|
6515 |
} |
|
6516 |
#endif // RD_MULTIPLE_DRIVE |
|
6517 |
||
6518 |
// ---------------------------------------------------------------------------- |
|
6519 |
// CSysApAppUi::IhfEnabledL |
|
6520 |
// ---------------------------------------------------------------------------- |
|
6521 |
||
6522 |
TBool CSysApAppUi::IhfEnabledL() |
|
6523 |
{ |
|
6524 |
TRACES( RDebug::Print( _L("CSysApAppUi::IhfEnabledL(): iSysApAudioRoutingObserver=0x%x"), iSysApAudioRoutingObserver ) ); |
|
6525 |
||
6526 |
if ( !iSysApAudioRoutingObserver ) // create observer if needed |
|
6527 |
{ |
|
6528 |
iSysApAudioRoutingObserver = CSysApAudioRoutingObserver::NewL( *this ); |
|
6529 |
} |
|
6530 |
||
6531 |
return iSysApAudioRoutingObserver->IhfEnabled(); |
|
6532 |
} |
|
6533 |
||
6534 |
// ---------------------------------------------------------------------------- |
|
6535 |
// CSysApAppUi::IsDeviceModeKey |
|
6536 |
// ---------------------------------------------------------------------------- |
|
6537 |
||
6538 |
TBool CSysApAppUi::IsDeviceModeKey( const TKeyEvent& aKeyEvent ) const |
|
6539 |
{ |
|
6540 |
return CSysApDefaultKeyHandler::IsDeviceModeKey( aKeyEvent ); |
|
6541 |
} |
|
6542 |
||
6543 |
// ---------------------------------------------------------------------------- |
|
6544 |
// CSysApAppUi::ResourcesFreed |
|
6545 |
// ---------------------------------------------------------------------------- |
|
6546 |
||
6547 |
TBool CSysApAppUi::ResourcesFreed() const |
|
6548 |
{ |
|
6549 |
return iResourcesFreed; |
|
6550 |
} |
|
6551 |
||
6552 |
/* |
|
6553 |
---------------------------------------------------------------------------- |
|
6554 |
CSysApAppUi::IsEncryptionOperationOngoingL() |
|
6555 |
Introduced the code as a part of Sub : 405-3362 - Power Management SUB for ES |
|
6556 |
recapture functionalities in platform which support multidrive as well. |
|
6557 |
------------------------------------------------------------------------------- |
|
6558 |
*/ |
|
6559 |
TBool CSysApAppUi::IsEncryptionOperationOngoingL() const |
|
6560 |
{ |
|
6561 |
TBool deFeatureSupported(EFalse); |
|
6562 |
FeatureManager::InitializeLibL(); |
|
6563 |
deFeatureSupported = FeatureManager::FeatureSupported( KFeatureIdFfDeviceEncryptionFeature); |
|
6564 |
FeatureManager::UnInitializeLib(); |
|
6565 |
||
6566 |
if(deFeatureSupported) |
|
6567 |
{ |
|
6568 |
/** |
|
6569 |
* Store the last memory status changed |
|
6570 |
* 0: Idle. It can be Encrypted or Decrypted |
|
6571 |
* 1: Encrypting |
|
6572 |
* 2: Decrypting |
|
6573 |
**/ |
|
6574 |
||
6575 |
RProperty deProperty; |
|
6576 |
User::LeaveIfError(deProperty.Attach(KDevEncProtectedUid, KDevEncOperationKey,EOwnerThread)); |
|
6577 |
TInt deValue = 0; |
|
6578 |
if((deProperty.Get(deValue)== KErrNone)&&( deValue == EOpEncrypting || deValue == EOpDecrypting)) |
|
6579 |
{ |
|
6580 |
deProperty.Close(); |
|
6581 |
return ETrue; |
|
6582 |
} |
|
6583 |
else |
|
6584 |
{ |
|
6585 |
deProperty.Close(); |
|
6586 |
return EFalse; |
|
6587 |
} |
|
6588 |
} |
|
6589 |
else |
|
6590 |
{ |
|
6591 |
return EFalse; |
|
6592 |
} |
|
6593 |
} |
|
6594 |
// ---------------------------------------------------------------------------- |
|
6595 |
// CSysApAppUi::EtelConnector |
|
6596 |
// ---------------------------------------------------------------------------- |
|
6597 |
||
6598 |
CSysApEtelConnector* CSysApAppUi::EtelConnector() const |
|
6599 |
{ |
|
6600 |
return iSysApEtelConnector; |
|
6601 |
} |
|
6602 |
||
6603 |
#ifndef RD_MULTIPLE_DRIVE |
|
6604 |
||
6605 |
// ---------------------------------------------------------------------------- |
|
6606 |
// CSysApAppUi::EjectUsed |
|
6607 |
// ---------------------------------------------------------------------------- |
|
6608 |
||
6609 |
void CSysApAppUi::EjectUsed( TInt /*aDrive*/ ) |
|
6610 |
{ |
|
6611 |
} |
|
6612 |
||
6613 |
#else // RD_MULTIPLE_DRIVE |
|
6614 |
||
6615 |
// ---------------------------------------------------------------------------- |
|
6616 |
// CSysApAppUi::ShowEjectWaitNoteL |
|
6617 |
// ---------------------------------------------------------------------------- |
|
6618 |
||
6619 |
void CSysApAppUi::ShowEjectWaitNoteL( TInt aDriveToEject ) |
|
6620 |
{ |
|
6621 |
if ( iSysApWaitNote ) |
|
6622 |
{ |
|
6623 |
return; |
|
6624 |
} |
|
6625 |
HBufC* text = iSysApDriveList->GetFormattedDriveNameLC( |
|
6626 |
aDriveToEject, |
|
6627 |
0, // Not used |
|
6628 |
R_QTN_EJECTING_MEMORY_NAME_WAIT ); |
|
6629 |
iSysApWaitNote = CSysApWaitNote::NewL( |
|
6630 |
iSysApFeatureManager->CoverDisplaySupported() ); |
|
6631 |
iSysApWaitNote->ShowNoteL( EClosingApplicationsNote, text ); |
|
6632 |
CleanupStack::PopAndDestroy( text ); |
|
6633 |
} |
|
6634 |
||
6635 |
// ---------------------------------------------------------------------------- |
|
6636 |
// CSysApAppUi::IsEjectQueryVisible |
|
6637 |
// ---------------------------------------------------------------------------- |
|
6638 |
||
6639 |
TBool CSysApAppUi::IsEjectQueryVisible() |
|
6640 |
{ |
|
6641 |
if ( !iSysApConfirmationQuery ) |
|
6642 |
{ |
|
6643 |
return EFalse; |
|
6644 |
} |
|
6645 |
TInt queryId( iSysApConfirmationQuery->CurrentQuery() ); |
|
6646 |
return ( queryId == ESysApEjectMmcQuery || queryId == ESysApRemoveMmcNote ); |
|
6647 |
} |
|
6648 |
||
6649 |
// ---------------------------------------------------------------------------- |
|
6650 |
// CSysApAppUi::UpdateInsertedMemoryCardsL |
|
6651 |
// ---------------------------------------------------------------------------- |
|
6652 |
||
6653 |
void CSysApAppUi::UpdateInsertedMemoryCardsL() |
|
6654 |
{ |
|
6655 |
// Update inserted memory cards |
|
6656 |
iSysApDriveList->GetMemoryCardsL( |
|
6657 |
iInsertedMemoryCards, CSysApDriveList::EIncludeInserted ); |
|
6658 |
||
6659 |
// Update memory card indicator status |
|
6660 |
SetMemoryCardIndicatorL(); |
|
6661 |
||
6662 |
// Handle unlock |
|
6663 |
RunUnlockNotifierL(); |
|
6664 |
} |
|
6665 |
||
6666 |
// ---------------------------------------------------------------------------- |
|
6667 |
// CSysApAppUi::EjectUsed |
|
6668 |
// ---------------------------------------------------------------------------- |
|
6669 |
||
6670 |
void CSysApAppUi::EjectUsed( TInt aDrive ) |
|
6671 |
{ |
|
6672 |
// Check drive inserted before starting eject confirm query |
|
6673 |
TInt insertedIndex( CSysApDriveList::Find( iInsertedMemoryCards, aDrive ) ); |
|
6674 |
||
6675 |
TRACES( RDebug::Print( |
|
6676 |
_L( "CSysApAppUi::EjectUsed: drive: %d, index: %d" ), |
|
6677 |
aDrive, insertedIndex ) ); |
|
6678 |
||
6679 |
if ( insertedIndex == KErrNotFound ) |
|
6680 |
{ |
|
6681 |
return; |
|
6682 |
} |
|
6683 |
||
6684 |
iMMCEjectUsed = ETrue; |
|
6685 |
iDriveToEject = aDrive; |
|
6686 |
iSysApDriveList->ResetDrivesToEject(); |
|
6687 |
TRAPD( err, EjectMMCL() ); |
|
6688 |
if ( err != KErrNone ) |
|
6689 |
{ |
|
6690 |
TRACES( RDebug::Print( |
|
6691 |
_L( "CSysApAppUi::EjectUsed: err: %d" ), err ) ); |
|
6692 |
iMMCEjectUsed = EFalse; |
|
6693 |
} |
|
6694 |
} |
|
6695 |
||
6696 |
#endif // RD_MULTIPLE_DRIVE |
|
6697 |
||
6698 |
// ---------------------------------------------------------------------------- |
|
6699 |
// CSysApAppUi::EjectMMCCanceled |
|
6700 |
// ---------------------------------------------------------------------------- |
|
6701 |
||
6702 |
void CSysApAppUi::EjectMMCCanceled() |
|
6703 |
{ |
|
6704 |
// Called from eject confirm query, reset eject status |
|
6705 |
#ifdef RD_MULTIPLE_DRIVE |
|
6706 |
iMMCEjectUsed = EFalse; |
|
6707 |
#endif // RD_MULTIPLE_DRIVE |
|
6708 |
} |
|
6709 |
||
6710 |
// ---------------------------------------------------------------------------- |
|
6711 |
// CSysApAppUi::UsbChargerDetector |
|
6712 |
// ---------------------------------------------------------------------------- |
|
6713 |
// |
|
6714 |
TSysApUsbChargerDetector& CSysApAppUi::UsbChargerDetector() |
|
6715 |
{ |
|
6716 |
return iSysApUsbChargerDetector; |
|
6717 |
} |
|
6718 |
||
6719 |
// ---------------------------------------------------------------------------- |
|
6720 |
// CSysApAppUi::HandleUsbCharger |
|
6721 |
// ---------------------------------------------------------------------------- |
|
6722 |
// |
|
6723 |
void CSysApAppUi::HandleUsbCharger( const TInt aValue ) |
|
6724 |
{ |
|
6725 |
if ( aValue == EChargingStatusCharging || |
|
6726 |
aValue == EChargingStatusChargingContinued || |
|
6727 |
aValue == EChargingStatusAlmostComplete ) |
|
6728 |
{ |
|
6729 |
iSysApUsbChargerDetector.SetChargingUsed( ETrue ); |
|
6730 |
if ( !iSysApUsbIndicatorController && |
|
6731 |
iSysApFeatureManager->Supported( KSysApFeatureIdChargerReminderNotes ) && |
|
6732 |
iSysApFeatureManager->Supported( KSysApFeatureIdUsbChargingWithoutReminderNotes ) ) |
|
6733 |
{ |
|
6734 |
// Start observing USB state for the reminder note |
|
6735 |
TRAPD ( usbErr, iSysApUsbIndicatorController = CreateSysApUsbIndicatorL( *this ) ); |
|
6736 |
if ( usbErr ) |
|
62
924385140d98
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
6737 |
{ |
63 | 6738 |
TRACES( RDebug::Print( |
6739 |
_L("CSysApAppUi::HandleUsbCharger: error in constructing USB ind. controller %d" ), |
|
6740 |
usbErr ) ); |
|
6741 |
} |
|
6742 |
} |
|
6743 |
} |
|
6744 |
} |
|
6745 |
||
6746 |
// ---------------------------------------------------------------------------- |
|
6747 |
// CSysApAppUi::SetEnvelopeIndicatorL |
|
6748 |
// ---------------------------------------------------------------------------- |
|
6749 |
// |
|
6750 |
void CSysApAppUi::SetEnvelopeIndicatorL() |
|
6751 |
{ |
|
6752 |
TInt phoneStoreStatus( StateOfProperty( KUidPSSMSStackCategory, KUidPSSMSStackDiskSpaceMonitorKey ) ); |
|
6753 |
TInt inboxStatus( StateOfProperty( KUidSystemCategory, KUidInboxStatusValue ) ); |
|
6754 |
TBool simStoreFull( iSysApEtelConnector && iSysApEtelConnector->IsSimSmsStoreFull() ); |
|
6755 |
||
6756 |
TRACES( RDebug::Print( |
|
6757 |
_L("CSysApAppUi::SetEnvelopeIndicatorL() phoneStoreStatus %d, simStoreFull %d, inboxStatus %d"), |
|
6758 |
phoneStoreStatus, simStoreFull, inboxStatus ) ); |
|
6759 |
||
6760 |
if ( phoneStoreStatus == ESmsDiskSpaceFull || simStoreFull ) |
|
6761 |
{ |
|
6762 |
// Blink the Envelope indicator |
|
6763 |
SetIndicatorStateL( EAknIndicatorEnvelope, EAknIndicatorStateAnimate ); |
|
6764 |
} |
|
6765 |
else if ( inboxStatus == ESADocumentsInInbox ) |
|
6766 |
{ |
|
6767 |
// Show the Envelope indicator. |
|
6768 |
SetIndicatorStateL( EAknIndicatorEnvelope, EAknIndicatorStateOn ); |
|
6769 |
} |
|
6770 |
else |
|
6771 |
{ |
|
6772 |
// Hide the Envelope indicator. |
|
6773 |
SetIndicatorStateL( EAknIndicatorEnvelope, EAknIndicatorStateOff ); |
|
6774 |
} |
|
6775 |
} |
|
6776 |
||
6777 |
// ---------------------------------------------------------------------------- |
|
6778 |
// CSysApAppUi::LogsObserverL |
|
6779 |
// ---------------------------------------------------------------------------- |
|
6780 |
// |
|
6781 |
CSysApCenRepLogsObserver& CSysApAppUi::LogsObserverL() |
|
6782 |
{ |
|
6783 |
TRACES( RDebug::Print( _L("CSysApAppUi::LogsObserverL()") ) ); |
|
6784 |
||
6785 |
// Create Logs observer when it is needed for the first time |
|
6786 |
if ( !iSysApCenRepLogsObserver ) |
|
6787 |
{ |
|
6788 |
iSysApCenRepLogsObserver = CSysApCenRepLogsObserver::NewL( *this ); |
|
6789 |
} |
|
6790 |
||
6791 |
return *iSysApCenRepLogsObserver; |
|
6792 |
} |
|
6793 |
||
6794 |
// ---------------------------------------------------------------------------- |
|
6795 |
// CSysApAppUi::NotifyPowerSaveModeL |
|
6796 |
// ---------------------------------------------------------------------------- |
|
6797 |
// |
|
6798 |
void CSysApAppUi::NotifyPowerSaveModeL( TSysApPsmStatus aStatus ) |
|
6799 |
{ |
|
6800 |
TRACES( RDebug::Print( _L("CSysApAppUi::NotifyPowerSaveModeL aStatus: %d"), aStatus ) ); |
|
6801 |
||
6802 |
// cancel any active power saving query because user has changed the state manually |
|
6803 |
CancelQuery( ESysApBattChargingPowerSavingQuery ); |
|
6804 |
CancelQuery( ESysApBattLowPowerSavingQuery ); |
|
6805 |
||
6806 |
switch ( aStatus ) |
|
6807 |
{ |
|
6808 |
case MSysApPsmControllerNotifyCallback::EPsmActivationComplete: |
|
6809 |
UpdateBatteryBarsL( StateOfProperty( KPSUidHWRMPowerState, KHWRMBatteryLevel ) ); |
|
6810 |
ShowUiNoteL( EPowerSaveModeActivated ); |
|
6811 |
break; |
|
6812 |
||
6813 |
case MSysApPsmControllerNotifyCallback::EPsmDeactivationComplete: |
|
6814 |
UpdateBatteryBarsL( StateOfProperty( KPSUidHWRMPowerState, KHWRMBatteryLevel ) ); |
|
6815 |
ShowUiNoteL( EPowerSaveModeDeactivated ); |
|
6816 |
break; |
|
6817 |
||
6818 |
case MSysApPsmControllerNotifyCallback::EPsmActivationFailed: |
|
6819 |
ShowUiNoteL( ECannotActivatePowerSaveMode ); |
|
6820 |
break; |
|
6821 |
||
6822 |
case MSysApPsmControllerNotifyCallback::EPsmDeactivationFailed: |
|
6823 |
ShowUiNoteL( ECannotDeactivatePowerSaveMode ); |
|
6824 |
break; |
|
6825 |
||
6826 |
default: |
|
6827 |
break; |
|
6828 |
} |
|
6829 |
} |
|
6830 |
||
6831 |
// ---------------------------------------------------------------------------- |
|
6832 |
// CSysApAppUi::HandleBatteryStatusL |
|
6833 |
// ---------------------------------------------------------------------------- |
|
6834 |
// |
|
6835 |
void CSysApAppUi::HandleBatteryStatusL( const TInt aValue ) |
|
6836 |
{ |
|
6837 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleBatteryStatusL aValue: %d"), aValue ) ); |
|
6838 |
||
6839 |
if ( aValue == EBatteryStatusEmpty ) |
|
6840 |
{ |
|
6841 |
//Display Recharge Battery note |
|
6842 |
ShowUiNoteL( ERechargeBatteryNote ); |
|
6843 |
BatteryEmptyL(); |
|
6844 |
} |
|
6845 |
else if ( aValue == EBatteryStatusLow ) |
|
6846 |
{ |
|
6847 |
if ( iSysApPsmController && UiReady() ) |
|
6848 |
{ |
|
6849 |
iSysApPsmController->BatteryLow( ETrue ); |
|
6850 |
||
6851 |
if ( iSysApPsmController->ShowActivateQuery()) |
|
6852 |
{ |
|
6853 |
// show activation query, replaces the first battery low query |
|
6854 |
ShowQueryL( ESysApBattLowPowerSavingQuery ); |
|
0
2e3d3ce01487
Revision: 201002
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6855 |
} |
63 | 6856 |
else // default low warning note must be shown |
6857 |
{ |
|
6858 |
// activate partial power save mode on first low warning |
|
6859 |
iSysApPsmController->DoEnablePartialPsm( ETrue ); // activated on first warning note |
|
6860 |
//Display Battery Low note. |
|
6861 |
ShowUiNoteL( EBatteryLowNote ); |
|
6862 |
} |
|
6863 |
} |
|
6864 |
else |
|
6865 |
{ |
|
6866 |
//Display Battery Low note. |
|
6867 |
ShowUiNoteL( EBatteryLowNote ); |
|
6868 |
} |
|
6869 |
} |
|
6870 |
||
6871 |
if ( iSysApBatteryInfoController ) |
|
6872 |
{ |
|
6873 |
iSysApBatteryInfoController->BatteryStatusUpdated( aValue ); |
|
6874 |
} |
|
6875 |
||
6876 |
} |
|
6877 |
||
6878 |
// ---------------------------------------------------------------------------- |
|
6879 |
// CSysApAppUi::HandleChargingStatusL |
|
6880 |
// ---------------------------------------------------------------------------- |
|
6881 |
// |
|
6882 |
void CSysApAppUi::HandleChargingStatusL( const TInt aValue ) |
|
6883 |
{ |
|
6884 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleChargingStatusL aValue: %d"), aValue ) ); |
|
6885 |
||
6886 |
TBool showNote( ETrue ); |
|
6887 |
||
6888 |
UpdateBatteryBarsL( StateOfProperty( KPSUidHWRMPowerState, KHWRMBatteryLevel ) ); |
|
6889 |
||
6890 |
if ( iSysApPsmController && UiReady() ) |
|
6891 |
{ |
|
6892 |
if ( iCharging ) // iCharging updated in UpdateBatteryBarsL |
|
6893 |
{ |
|
6894 |
// cancel activation query if charger is connected while query is on display |
|
6895 |
CancelQuery( ESysApBattLowPowerSavingQuery ); |
|
6896 |
} |
|
6897 |
||
6898 |
if ( iCharging && !iSysApPsmController->ChargerConnected() ) // first time after charger connection |
|
6899 |
{ |
|
6900 |
iSysApPsmController->ConnectCharger( ETrue ); |
|
6901 |
||
6902 |
if ( iSysApPsmController->ShowDeactivateQuery() ) |
|
6903 |
{ |
|
6904 |
ShowQueryL( ESysApBattChargingPowerSavingQuery ); |
|
6905 |
// Query is on the display. Don't show the note. |
|
6906 |
showNote = EFalse; |
|
6907 |
} |
|
6908 |
else |
|
6909 |
{ |
|
6910 |
iSysApPsmController->DoEnablePartialPsm( EFalse ); |
|
6911 |
} |
|
6912 |
} |
|
6913 |
else if ( aValue == EChargingStatusNotConnected ) |
|
6914 |
{ |
|
6915 |
iSysApPsmController->ConnectCharger( EFalse ); |
|
6916 |
||
6917 |
// cancel deactivation query if charger is disconnected while query is on display |
|
6918 |
CancelQuery( ESysApBattChargingPowerSavingQuery ); |
|
6919 |
} |
|
6920 |
} |
|
6921 |
if( showNote ) |
|
6922 |
{ |
|
6923 |
HandleChargerNotesL( aValue ); |
|
6924 |
} |
|
6925 |
} |
|
6926 |
||
6927 |
// ---------------------------------------------------------------------------- |
|
6928 |
// CSysApAppUi::HandleActivatePsmQueryResponse |
|
6929 |
// ---------------------------------------------------------------------------- |
|
6930 |
// |
|
6931 |
void CSysApAppUi::HandleActivatePsmQueryResponse( TBool aEnable ) |
|
6932 |
{ |
|
6933 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleActivatePsmQueryResponse aEnable: %d"), |
|
6934 |
aEnable ) ); |
|
6935 |
||
6936 |
__ASSERT_DEBUG( iSysApPsmController, User::Invariant() ); |
|
6937 |
||
6938 |
if ( aEnable ) |
|
6939 |
{ |
|
6940 |
iSysApPsmController->DoEnableFullPsm( ETrue ); |
|
6941 |
} |
|
6942 |
else |
|
6943 |
{ |
|
6944 |
iSysApPsmController->DoEnablePartialPsm( ETrue ); |
|
6945 |
} |
|
6946 |
} |
|
6947 |
||
6948 |
// ---------------------------------------------------------------------------- |
|
6949 |
// CSysApAppUi::HandleDeactivatePsmQueryResponse |
|
6950 |
// ---------------------------------------------------------------------------- |
|
6951 |
// |
|
6952 |
void CSysApAppUi::HandleDeactivatePsmQueryResponse( TBool aDisable ) |
|
6953 |
{ |
|
6954 |
TRACES( RDebug::Print( _L("CSysApAppUi::HandleDeactivatePsmQueryResponse aDisable: %d"), |
|
6955 |
aDisable ) ); |
|
6956 |
||
6957 |
__ASSERT_DEBUG( iSysApPsmController, User::Invariant() ); |
|
6958 |
||
6959 |
if ( aDisable ) |
|
6960 |
{ |
|
6961 |
iSysApPsmController->DoEnableFullPsm( EFalse ); |
|
6962 |
} |
|
6963 |
} |
|
6964 |
||
6965 |
// ---------------------------------------------------------------------------- |
|
6966 |
// CSysApAppUi::CancelQuery |
|
6967 |
// ---------------------------------------------------------------------------- |
|
6968 |
// |
|
6969 |
void CSysApAppUi::CancelQuery( TSysApConfirmationQueryIds aQueryId ) |
|
6970 |
{ |
|
6971 |
TRACES( RDebug::Print( _L("CSysApAppUi::CancelQuery aQueryId: %d"), aQueryId ) ); |
|
6972 |
||
6973 |
if ( iSysApConfirmationQuery ) |
|
6974 |
{ |
|
6975 |
if ( aQueryId == iSysApConfirmationQuery->CurrentQuery() || aQueryId == ESysApNoQuery ) |
|
6976 |
{ |
|
6977 |
iSysApConfirmationQuery->Cancel(); |
|
6978 |
} |
|
6979 |
} |
|
6980 |
} |
|
6981 |
||
6982 |
TBool CSysApAppUi::IsDefaultPowerKeyBehavior() |
|
6983 |
{ |
|
6984 |
TRACES( RDebug::Print( _L("CSysApAppUi::IsDefaultPowerKeyBehavior" ) ) ); |
|
6985 |
TBool powerKeyIsLockKey = iSysApFeatureManager->PowerKeyIsLockKey(); |
|
6986 |
if ( !powerKeyIsLockKey ) |
|
6987 |
return ETrue; //no need for further processing |
|
6988 |
TInt securityDialogStatus = StateOfProperty( KPSUidStartup, KStartupSecurityCodeQueryStatus ); |
|
6989 |
TRACES( RDebug::Printf( "CSysApAppUi::IsDefaultPowerKeyBehavior: securityDialogStatus = %d", securityDialogStatus ) ); |
|
6990 |
if ( securityDialogStatus == ESecurityQueryActive ) |
|
6991 |
{ |
|
6992 |
// handle the exception from the exception. Currently used only when a long power key press is detected |
|
6993 |
return ETrue; |
|
6994 |
} |
|
6995 |
//make sure we can turn off device when 'sim invalid' dlg is displayed |
|
6996 |
TInt simStatus = StateOfProperty( KPSUidStartup, KStartupSimSecurityStatus ); |
|
6997 |
TBool simBogus = ( simStatus == ESimRejected ) || ( simStatus == ESimUnaccepted ) || (simStatus == ESimInvalid ); |
|
6998 |
||
6999 |
// check if the phone has fully booted into idle |
|
7000 |
TInt startupPhase = StateOfProperty ( KPSUidStartup, KPSStartupUiPhase ); |
|
7001 |
TBool bootCompleted = (EStartupUiPhaseAllDone == startupPhase); |
|
7002 |
||
7003 |
// Another exception from the exception: |
|
7004 |
// check if we're in charging or alert mode (only then we have a status pane instance) |
|
7005 |
TBool haveStatusPane = ( StatusPane()== NULL ) ? EFalse : StatusPane()->IsVisible(); |
|
7006 |
TBool defaultPowerKeyBehaviour = !bootCompleted || simBogus || haveStatusPane || iPowerKeyPopupMenuActive || !powerKeyIsLockKey; |
|
7007 |
||
7008 |
TRACES( RDebug::Printf( "CSysApAppUi::IsDefaultPowerKeyBehavior: Sim Status = %d, haveStatusPane = %d, power key menu active? %d" , simStatus, haveStatusPane, iPowerKeyPopupMenuActive ) ); |
|
7009 |
TRACES( RDebug::Printf( "CSysApAppUi::IsDefaultPowerKeyBehavior returns %d", defaultPowerKeyBehaviour ) ); |
|
7010 |
TRACES( RDebug::Printf( "CSysApAppUi::IsDefaultPowerKeyBehavior: startupPhase = %d", startupPhase ) ); |
|
7011 |
return defaultPowerKeyBehaviour; |
|
7012 |
} |
|
7013 |
||
7014 |
// ---------------------------------------------------------------------------- |
|
7015 |
// CSysApAppUi::StartChargingBatteryL |
|
7016 |
// ---------------------------------------------------------------------------- |
|
7017 |
// |
|
7018 |
void CSysApAppUi::StartChargingBatteryL() |
|
7019 |
{ |
|
7020 |
TRACES( RDebug::Print( _L("CSysApAppUi::StartChargingBatteryL") ) ); |
|
7021 |
iBatteryNotify->StartChargingL(); |
|
7022 |
} |
|
7023 |
||
7024 |
// ---------------------------------------------------------------------------- |
|
7025 |
// CSysApAppUi::StopChargingBatteryL |
|
7026 |
// ---------------------------------------------------------------------------- |
|
7027 |
// |
|
7028 |
void CSysApAppUi::StopChargingBatteryL() |
|
7029 |
{ |
|
7030 |
TRACES( RDebug::Print( _L("CSysApAppUi::StopChargingBatteryL") ) ); |
|
7031 |
iBatteryNotify->StopChargingL(); |
|
7032 |
} |
|
7033 |
||
7034 |
// End of File |