author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 14 Sep 2010 22:54:36 +0300 | |
branch | RCL_3 |
changeset 65 | 5cc2995847ea |
parent 62 | 19bba8228ff0 |
child 76 | 3cdbd92ee07b |
permissions | -rw-r--r-- |
62 | 1 |
/* |
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 |
* All rights reserved. |
|
4 |
* This component and the accompanying materials are made available |
|
5 |
* under the terms of "Eclipse Public License v1.0" |
|
6 |
* which accompanies this distribution, and is available |
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 |
* |
|
9 |
* Initial Contributors: |
|
10 |
* Nokia Corporation - initial contribution. |
|
11 |
* |
|
12 |
* Contributors: |
|
13 |
* |
|
14 |
* Description: CDevEncController definitions Part of ES System Application |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
//System Include |
|
19 |
#include <apgcli.h> // for RApaLsSession |
|
20 |
#include <apacmdln.h> // for CApaCommandLine |
|
21 |
#include <centralrepository.h> |
|
22 |
#include <featmgr.h> // for checking DE feature |
|
23 |
#include <DevEncEngineConstants.h> |
|
24 |
#include <DevEncSessionBase.h> //for device encryption |
|
25 |
#include <DevEncProtectedPSKey.h> //for device encryption |
|
26 |
#include <fotaserver.rsg> |
|
27 |
||
28 |
//User Include |
|
29 |
#include "DevEncController.h" |
|
30 |
#include "FotaServer.h" |
|
31 |
#include "DevEncProgressObserver.h" |
|
32 |
#include "FotaSrvDebug.h" |
|
33 |
||
34 |
#define __LEAVE_IF_ERROR(x) if(KErrNone!=x) {FLOG(_L("LEAVE in %s: %d"), __FILE__, __LINE__); User::Leave(x); } |
|
35 |
||
36 |
// ================= MEMBER FUNCTIONS ======================= |
|
37 |
// |
|
38 |
// ---------------------------------------------------------- |
|
39 |
// CDevEncController::NewL |
|
40 |
// Instancies CDevEncController object |
|
41 |
// ---------------------------------------------------------- |
|
42 |
// |
|
43 |
CDevEncController* CDevEncController::NewL(CFotaServer* aCallback ) |
|
44 |
{ |
|
45 |
FLOG(_L("CDevEncController::NewL >>")); |
|
46 |
||
47 |
CDevEncController* self = CDevEncController::NewLC(aCallback); |
|
48 |
CleanupStack::Pop(); |
|
49 |
||
50 |
FLOG(_L("CDevEncController::NewL <<")); |
|
51 |
return self; |
|
52 |
} |
|
53 |
||
54 |
||
55 |
// ---------------------------------------------------------- |
|
56 |
// CDevEncController::NewL |
|
57 |
// Instancies CDevEncController object |
|
58 |
// ---------------------------------------------------------- |
|
59 |
// |
|
60 |
CDevEncController* CDevEncController::NewLC(CFotaServer* aCallback ) |
|
61 |
{ |
|
62 |
FLOG(_L("CDevEncController::NewLC >>")); |
|
63 |
||
64 |
CDevEncController* self = new ( ELeave ) CDevEncController(aCallback); |
|
65 |
CleanupStack::PushL ( self ); |
|
66 |
self->ConstructL(); |
|
67 |
||
68 |
FLOG(_L("CDevEncController::NewC <<")); |
|
69 |
return self; |
|
70 |
} |
|
71 |
||
72 |
// ---------------------------------------------------------- |
|
73 |
// CDevEncController::ConstructL() |
|
74 |
// Initializes data objects |
|
75 |
// ---------------------------------------------------------- |
|
76 |
// |
|
77 |
void CDevEncController::ConstructL() |
|
78 |
{ |
|
79 |
FLOG(_L("CDevEncController::ConstructL >>")); |
|
80 |
||
81 |
if (IsDeviceEncryptionSupportedL()) |
|
82 |
{ |
|
83 |
LoadDevEncSessionL(); |
|
84 |
} |
|
85 |
else |
|
86 |
{ |
|
87 |
FLOG(_L("Device doesn't support encryption!!")); |
|
88 |
User::Leave(KErrNotSupported); |
|
89 |
} |
|
90 |
||
91 |
FLOG(_L("CDevEncController::ConstructL <<")); |
|
92 |
} |
|
93 |
||
94 |
||
95 |
TBool CDevEncController::IsDeviceEncryptionSupportedL() |
|
96 |
{ |
|
97 |
FLOG(_L("CDevEncController::IsDeviceEncryptionSupportedL >>")); |
|
98 |
||
99 |
TBool ret(EFalse); |
|
100 |
||
101 |
FeatureManager::InitializeLibL(); |
|
102 |
ret = FeatureManager::FeatureSupported( KFeatureIdFfDeviceEncryptionFeature); |
|
103 |
FeatureManager::UnInitializeLib(); |
|
104 |
||
105 |
FLOG(_L("CDevEncController::IsDeviceEncryptionSupportedL, ret = %d <<"), ret); |
|
106 |
return ret; |
|
107 |
} |
|
108 |
// ---------------------------------------------------------- |
|
109 |
// CDevEncController::CDevEncController() |
|
110 |
// Constructor |
|
111 |
// ---------------------------------------------------------- |
|
112 |
// |
|
113 |
CDevEncController::CDevEncController(CFotaServer* aCallback): iCallback (aCallback), |
|
114 |
iEncMemorySession(NULL), |
|
115 |
iDevEncObserver (NULL), |
|
116 |
iDevEncOperation(EIdle) |
|
117 |
{ |
|
118 |
||
119 |
} |
|
120 |
||
121 |
// ---------------------------------------------------------- |
|
122 |
// CDevEncController::CDevEncController() |
|
123 |
// Destructor |
|
124 |
// ---------------------------------------------------------- |
|
125 |
// |
|
126 |
CDevEncController::~CDevEncController() |
|
127 |
{ |
|
128 |
FLOG(_L("CDevEncController::~CDevEncController >>")); |
|
129 |
||
130 |
UnloadDevEncSession(); |
|
131 |
||
132 |
if (iDevEncObserver) |
|
133 |
{ |
|
134 |
delete iDevEncObserver; |
|
135 |
iDevEncObserver = NULL; |
|
136 |
} |
|
137 |
||
138 |
FLOG(_L("CDevEncController::~CDevEncController <<")); |
|
139 |
} |
|
140 |
||
141 |
// ---------------------------------------------------------- |
|
142 |
// CDevEncController::LoadDevEncSessionL() |
|
143 |
// Loads the devenc library |
|
144 |
// ---------------------------------------------------------- |
|
145 |
// |
|
146 |
void CDevEncController::LoadDevEncSessionL() |
|
147 |
{ |
|
148 |
FLOG(_L("CDevEncController::LoadDevEncSessionL >> ")); |
|
149 |
||
150 |
if (!iEncMemorySession) |
|
151 |
{ |
|
152 |
TInt err = iLibrary.Load(KDevEncCommonUtils); |
|
153 |
if (err != KErrNone) |
|
154 |
{ |
|
155 |
FLOG(_L("Error in finding the library... %d"), err); |
|
156 |
} |
|
157 |
else |
|
158 |
{ |
|
159 |
TLibraryFunction entry = iLibrary.Lookup(1); |
|
160 |
||
161 |
if (!entry) |
|
162 |
{ |
|
163 |
FLOG(_L("Error in loading the library...")); |
|
164 |
User::Leave(KErrBadLibraryEntryPoint); |
|
165 |
} |
|
166 |
iEncMemorySession = (CDevEncSessionBase*) entry(); |
|
167 |
FLOG(_L("Library is found and loaded successfully...")); |
|
168 |
} |
|
169 |
} |
|
170 |
FLOG(_L("CDevEncController::LoadDevEncSessionL << ")); |
|
171 |
} |
|
172 |
||
173 |
// ---------------------------------------------------------- |
|
174 |
// CDevEncController::UnloadDevEncSessionL() |
|
175 |
// Unloads the devenc library |
|
176 |
// ---------------------------------------------------------- |
|
177 |
// |
|
178 |
void CDevEncController::UnloadDevEncSession() |
|
179 |
{ |
|
180 |
FLOG(_L("CDevEncController::UnloadDevEncSession >> ")); |
|
181 |
||
182 |
if (iEncMemorySession) |
|
183 |
{ |
|
184 |
delete iEncMemorySession; |
|
185 |
iEncMemorySession = NULL; |
|
186 |
} |
|
187 |
||
188 |
if (iLibrary.Handle()) |
|
189 |
{ |
|
190 |
iLibrary.Close(); |
|
191 |
} |
|
192 |
FLOG(_L("CDevEncController::UnloadDevEncSession << ")); |
|
193 |
} |
|
194 |
||
195 |
TBool CDevEncController::NeedToDecryptL(const TDriveNumber &aDrive) |
|
196 |
{ |
|
197 |
FLOG(_L("CDevEncController::NeedToDecryptL, drive = %d >>"), (TInt) aDrive); |
|
198 |
||
199 |
TBool ret (EFalse); |
|
200 |
TInt err (KErrNone); |
|
201 |
TInt status (KErrNone); |
|
202 |
||
65
5cc2995847ea
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
203 |
CheckIfDeviceMemoryBusyL(); |
5cc2995847ea
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
204 |
|
62 | 205 |
iEncMemorySession->SetDrive( aDrive); |
206 |
||
207 |
err = iEncMemorySession->Connect(); |
|
208 |
if (err != KErrNone) |
|
209 |
{ |
|
210 |
FLOG(_L("Error in connecting to devencdisk session = %d"), err); |
|
211 |
User::Leave(err); |
|
212 |
} |
|
213 |
||
214 |
err = iEncMemorySession->DiskStatus(status); |
|
215 |
||
216 |
if (!err && (status == EEncrypted || status == EEncrypting)) |
|
217 |
{ |
|
218 |
FLOG(_L("Drive %d is encrypted"), (TInt) aDrive); |
|
219 |
ret = ETrue; |
|
220 |
} |
|
221 |
else |
|
222 |
{ |
|
223 |
CRepository *centrep = CRepository::NewL( KCRUidFotaServer ); |
|
224 |
err = centrep->Set( KDriveToEncrypt, KErrNotFound ); |
|
225 |
delete centrep; centrep = NULL; |
|
226 |
} |
|
227 |
||
228 |
#if defined(__WINS__) |
|
229 |
ret = ETrue; |
|
230 |
#endif |
|
231 |
||
232 |
iEncMemorySession->Close(); |
|
233 |
||
234 |
FLOG(_L("CDevEncController::NeedToDecrypt, ret = %d <<"), ret); |
|
235 |
return ret; |
|
236 |
} |
|
237 |
||
238 |
void CDevEncController::DoStartDecryptionL(const TDriveNumber &aDrive) |
|
239 |
{ |
|
240 |
FLOG(_L("CDevEncController::DoStartDecryptionL >>")); |
|
241 |
||
242 |
TInt deoperation (EOpIdle); |
|
243 |
||
244 |
RProperty::Get(KDevEncProtectedUid, KDevEncOperationKey, deoperation ); |
|
245 |
||
246 |
if (deoperation != EOpIdle) |
|
247 |
{ |
|
248 |
FLOG(_L("Some disk operation is ongoing. Hence Fota is not possible.")); |
|
249 |
User::Leave(KErrNotReady); |
|
250 |
} |
|
251 |
||
252 |
iDevEncOperation = EDecryption; |
|
253 |
iStorageDrive = aDrive; |
|
254 |
||
255 |
||
256 |
StartDecryptionL(); |
|
257 |
||
258 |
FLOG(_L("CDevEncController::DoStartDecryptionL <<")); |
|
259 |
} |
|
260 |
||
261 |
||
262 |
void CDevEncController::StartDecryptionL() |
|
263 |
{ |
|
264 |
FLOG(_L("CDevEncController::StartDecryptionL >>")); |
|
265 |
||
266 |
TInt status (KErrNone); |
|
267 |
||
268 |
iEncMemorySession->SetDrive ( iStorageDrive ); |
|
269 |
||
270 |
__LEAVE_IF_ERROR(iEncMemorySession->Connect()); |
|
271 |
||
272 |
__LEAVE_IF_ERROR(iEncMemorySession->DiskStatus(status)); |
|
273 |
||
274 |
FLOG(_L("Status = %d"), status); |
|
275 |
||
276 |
if (status == EEncrypted) |
|
277 |
{ |
|
278 |
if (CheckBatteryL()) |
|
279 |
{ |
|
280 |
FLOG(_L("Started decryption of drive %d..."), iStorageDrive); |
|
281 |
||
282 |
if (!iDevEncObserver) |
|
283 |
iDevEncObserver = CDevEncProgressObserver::NewL(this, R_FOTASERVER_DECRYPTION_PROGRESS_DIALOG); |
|
284 |
||
285 |
__LEAVE_IF_ERROR(iEncMemorySession->StartDiskDecrypt()); |
|
286 |
||
287 |
FLOG(_L("Monitor for completion of the decryption operation...")); |
|
288 |
||
289 |
iDevEncObserver->StartMonitoringL(iEncMemorySession); |
|
290 |
} |
|
291 |
else |
|
292 |
{ |
|
293 |
FLOG(_L("Battery low for performing decryption!")); |
|
294 |
||
295 |
iDevEncOperation = EIdle; |
|
296 |
iEncMemorySession->Close(); |
|
297 |
||
298 |
iCallback->HandleDecryptionCompleteL(KErrBadPower, EBatteryLevelLevel4); |
|
299 |
} |
|
300 |
} |
|
301 |
else if(status == EDecrypted) |
|
302 |
{ |
|
303 |
FLOG(_L("Device is already decrypted")); |
|
304 |
||
305 |
iDevEncOperation = EIdle; |
|
306 |
iEncMemorySession->Close(); |
|
307 |
||
308 |
iCallback->HandleDecryptionCompleteL(KErrNone); |
|
309 |
} |
|
310 |
else |
|
311 |
{ |
|
312 |
// status is either unmounted, encrypting, decrypting, wiping or corrupted |
|
313 |
FLOG(_L("Can't proceed as disk status is %d"), status); |
|
314 |
||
315 |
iDevEncOperation = EIdle; |
|
316 |
iEncMemorySession->Close(); |
|
317 |
||
318 |
iCallback->HandleDecryptionCompleteL(KErrNotReady); |
|
319 |
} |
|
320 |
||
321 |
FLOG(_L("CDevEncController::StartDecryptionL <<")); |
|
322 |
} |
|
323 |
||
324 |
void CDevEncController::ReportDevEncOpnCompleteL(TInt aResult) |
|
325 |
{ |
|
326 |
FLOG(_L("CDevEncController::ReportDevEncOpnCompleteL, result = %d >>"), aResult); |
|
327 |
||
328 |
TInt err (KErrNone); |
|
329 |
||
330 |
if (iEncMemorySession) |
|
331 |
{ |
|
332 |
iEncMemorySession->Close(); |
|
333 |
} |
|
334 |
||
335 |
CRepository *centrep = CRepository::NewL( KCRUidFotaServer ); |
|
336 |
||
337 |
if (iDevEncOperation == EDecryption) |
|
338 |
{ |
|
339 |
err = centrep->Set( KDriveToEncrypt, iStorageDrive ); |
|
340 |
if (err != KErrNone) |
|
341 |
{ |
|
342 |
FLOG(_L("Setting drive to encrypt as %d after firmware update, error = %d"), (TInt) iStorageDrive, err); |
|
343 |
} |
|
344 |
} |
|
345 |
else if (iDevEncOperation == EEncryption) |
|
346 |
{ |
|
347 |
err = centrep->Set( KDriveToEncrypt, KErrNotFound ); |
|
348 |
if (err != KErrNone) |
|
349 |
{ |
|
350 |
FLOG(_L("Setting no drive, error = %d"), err); |
|
351 |
} |
|
352 |
} |
|
353 |
delete centrep; centrep = NULL; |
|
354 |
||
355 |
if (iDevEncOperation == EDecryption) |
|
356 |
{ |
|
357 |
FLOG(_L("Starting update...")); |
|
358 |
iCallback->HandleDecryptionCompleteL(KErrNone); |
|
359 |
iDevEncOperation = EIdle; |
|
360 |
} |
|
361 |
else if (iDevEncOperation == EEncryption) |
|
362 |
{ |
|
363 |
FLOG(_L("Encryption ended")); |
|
364 |
iCallback->HandleEncryptionCompleteL(KErrNone); |
|
365 |
iDevEncOperation = EIdle; |
|
366 |
} |
|
367 |
else |
|
368 |
{ |
|
369 |
//should not land here! |
|
370 |
} |
|
371 |
||
372 |
FLOG(_L("CDevEncController::ReportDevEncOpnCompleteL <<")); |
|
373 |
} |
|
374 |
||
375 |
TBool CDevEncController::NeedToEncryptL(TDriveNumber &aDrive) |
|
376 |
{ |
|
377 |
FLOG(_L("CDevEncController::NeedToEncryptL >> ")); |
|
378 |
TBool ret (EFalse); |
|
379 |
||
380 |
CRepository *centrep = CRepository::NewL( KCRUidFotaServer ); |
|
381 |
TInt drive (KErrNotFound); |
|
382 |
TInt err = centrep->Get( KDriveToEncrypt, drive ); |
|
383 |
if (drive != KErrNotFound) |
|
384 |
{ |
|
385 |
aDrive = (TDriveNumber) drive; |
|
386 |
ret = ETrue; |
|
387 |
} |
|
388 |
||
389 |
delete centrep; centrep = NULL; |
|
390 |
||
391 |
FLOG(_L("CDevEncController::NeedToEncryptL, ret = %d, err = %d << "), ret, err); |
|
392 |
return ret; |
|
393 |
} |
|
394 |
||
395 |
void CDevEncController::DoStartEncryptionL(const TDriveNumber &aDrive) |
|
396 |
{ |
|
397 |
FLOG(_L("CDevEncController::DoStartEncryptionL, drive = %d >>"), (TInt) aDrive); |
|
398 |
||
399 |
iDevEncOperation = EEncryption; |
|
400 |
iStorageDrive = aDrive; |
|
401 |
StartEncryptionL(); |
|
402 |
||
403 |
FLOG(_L("CDevEncController::DoStartEncryptionL <<")); |
|
404 |
} |
|
405 |
||
406 |
void CDevEncController::StartEncryptionL() |
|
407 |
{ |
|
408 |
FLOG(_L("CDevEncController::StartEncryptionL >>")); |
|
409 |
||
410 |
TInt status (KErrNone); |
|
411 |
||
412 |
iEncMemorySession->SetDrive( iStorageDrive ); |
|
413 |
||
414 |
__LEAVE_IF_ERROR(iEncMemorySession->Connect()); |
|
415 |
||
416 |
__LEAVE_IF_ERROR(iEncMemorySession->DiskStatus(status)); |
|
417 |
||
418 |
FLOG(_L("Status = %d"), status); |
|
419 |
||
420 |
if (status == EDecrypted) |
|
421 |
{ |
|
422 |
FLOG(_L("Started encryption of drive %d..."), iStorageDrive); |
|
423 |
||
424 |
if (CheckBatteryL()) |
|
425 |
{ |
|
426 |
if (!iDevEncObserver) |
|
427 |
iDevEncObserver = CDevEncProgressObserver::NewL(this, R_FOTASERVER_ENCRYPTION_PROGRESS_DIALOG); |
|
428 |
||
429 |
__LEAVE_IF_ERROR(iEncMemorySession->StartDiskEncrypt()); |
|
430 |
||
431 |
FLOG(_L("Monitor for completion of the decryption operation...")); |
|
432 |
||
433 |
iDevEncObserver->StartMonitoringL(iEncMemorySession); |
|
434 |
} |
|
435 |
else |
|
436 |
{ |
|
437 |
FLOG(_L("Battery low for performing encryption!")); |
|
438 |
||
439 |
iDevEncOperation = EIdle; |
|
440 |
iEncMemorySession->Close(); |
|
441 |
||
442 |
iCallback->HandleEncryptionCompleteL(KErrBadPower); |
|
443 |
} |
|
444 |
} |
|
445 |
else if (status == EEncrypted) |
|
446 |
{ |
|
447 |
FLOG(_L("Memory is already encrypted")); |
|
448 |
||
449 |
iDevEncOperation = EIdle; |
|
450 |
iEncMemorySession->Close(); |
|
451 |
||
452 |
iCallback->HandleEncryptionCompleteL(KErrNone); |
|
453 |
} |
|
454 |
else |
|
455 |
{ |
|
456 |
//status is either encrypting, decrypting, wiping, corrupted |
|
457 |
FLOG(_L("Can't proceed as disk status is %d"), status); |
|
458 |
||
459 |
iDevEncOperation = EIdle; |
|
460 |
iEncMemorySession->Close(); |
|
461 |
||
462 |
iCallback->HandleEncryptionCompleteL(KErrNotReady); |
|
463 |
} |
|
464 |
FLOG(_L("CDevEncController::StartEncryptionL <<")); |
|
465 |
} |
|
466 |
||
467 |
TBool CDevEncController::CheckBatteryL() |
|
468 |
{ |
|
469 |
FLOG(_L("CDevEncController::CheckBatteryL >>")); |
|
470 |
#ifdef __WINS__ |
|
471 |
||
472 |
// In the emulator, the battery level is always 0 and the charger is never |
|
473 |
// connected, so just return ETrue. |
|
474 |
return ETrue; |
|
475 |
||
476 |
#else // __WINS__ |
|
477 |
||
478 |
// Running on target. Check the real battery and charger status |
|
479 |
||
480 |
TInt chargingstatus( EChargingStatusError ); |
|
481 |
TInt batterylevel( 1 ); |
|
482 |
TBool enoughPower( EFalse ); |
|
483 |
||
484 |
// Read battery |
|
485 |
FLOG( _L("CDevEncUiEncryptionOperator::CheckBatteryL" )); |
|
486 |
RProperty pw; |
|
487 |
User::LeaveIfError( pw.Attach( KPSUidHWRMPowerState, KHWRMBatteryLevel ) ); |
|
488 |
User::LeaveIfError( pw.Get( batterylevel ) ); |
|
489 |
pw.Close(); |
|
490 |
||
491 |
User::LeaveIfError( pw.Attach( KPSUidHWRMPowerState, KHWRMChargingStatus ) ); |
|
492 |
User::LeaveIfError( pw.Get( chargingstatus )); |
|
493 |
pw.Close(); |
|
494 |
||
495 |
// Too low battery, power insufficient |
|
496 |
if ( batterylevel >= EBatteryLevelLevel4 ) |
|
497 |
{ |
|
498 |
enoughPower = ETrue; |
|
499 |
} |
|
500 |
// But charger is connected, power sufficient |
|
501 |
if ( ( chargingstatus != EChargingStatusError ) && |
|
502 |
( chargingstatus != EChargingStatusNotConnected ) ) |
|
503 |
{ |
|
504 |
enoughPower = ETrue; |
|
505 |
} |
|
506 |
||
507 |
FLOG( _L("Battery level: %d (0..7), chargingstatus %d"), |
|
508 |
batterylevel, chargingstatus ); |
|
509 |
FLOG( _L("CDevEncController::CheckBatteryL, ret=%d <<"), ( enoughPower ? 1 : 0 ) ); |
|
510 |
return enoughPower; |
|
511 |
||
512 |
#endif // __WINS__ |
|
513 |
} |
|
514 |
||
515 |
TInt CDevEncController::GetDEOperation() |
|
516 |
{ |
|
517 |
return iDevEncOperation; |
|
518 |
} |
|
519 |
||
65
5cc2995847ea
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
520 |
void CDevEncController::CheckIfDeviceMemoryBusyL() |
5cc2995847ea
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
521 |
{ |
5cc2995847ea
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
522 |
TInt deoperation (EOpIdle); |
5cc2995847ea
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
523 |
|
5cc2995847ea
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
524 |
RProperty::Get(KDevEncProtectedUid, KDevEncOperationKey, deoperation ); |
5cc2995847ea
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
525 |
|
5cc2995847ea
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
526 |
if (deoperation != EOpIdle) |
5cc2995847ea
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
527 |
{ |
5cc2995847ea
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
528 |
FLOG(_L("Some disk operation is ongoing. Hence Fota is not possible.")); |
5cc2995847ea
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
529 |
User::Leave(KErrNotReady); |
5cc2995847ea
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
530 |
} |
5cc2995847ea
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
531 |
|
5cc2995847ea
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
532 |
} |
5cc2995847ea
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
62
diff
changeset
|
533 |
|
62 | 534 |
// End of file |
535 |