fotaapplication/fotaserver/FotaServer/src/FotaServer.cpp
branchRCL_3
changeset 65 5cc2995847ea
parent 62 19bba8228ff0
child 76 3cdbd92ee07b
--- a/fotaapplication/fotaserver/FotaServer/src/FotaServer.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/fotaapplication/fotaserver/FotaServer/src/FotaServer.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -31,6 +31,7 @@
 #include <nsmlconstants.h>
 #include <centralrepository.h>
 #include <sysversioninfo.h>
+#include <featdiscovery.h>
 #include "FotaSrvApp.h"
 #include "FotaServer.h"
 #include "FotaSrvDebug.h"
@@ -2415,6 +2416,14 @@
             __LEAVE_IF_ERROR(err);
             }
         }
+    
+    if(!IsFOTANeedToDecryptL())
+       {
+       iDEController->CheckIfDeviceMemoryBusyL();
+       return EFalse;
+       }
+    
+        
     TRAPD(err, ret = iDEController->NeedToDecryptL(drive));
     
     delete iDEController; iDEController = NULL;
@@ -2590,3 +2599,21 @@
     return ret;
     }
 
+// --------------------------------------------------------------------------
+// CFotaServer::IsFOTANeedToDecryptL
+// This method returns the device encryption operation.
+// 
+// --------------------------------------------------------------------------
+// 
+TBool CFotaServer::IsFOTANeedToDecryptL()
+    {
+    FLOG(_L("CFotaServer::IsFOTANeedToDecryptL >>"));
+
+    TBool ret(EFalse);
+    ret = CFeatureDiscovery::IsFeatureSupportedL(TUid::Uid(KFeatureIdFfFotaDecryptMemBeforeUpdate));
+    
+    FLOG(_L("CFotaServer::IsFOTANeedToDecryptL, ret = %d <<"), ret);
+    return ret;
+    }
+
+