omadm/omadmappui/src/NSmlDMSyncAppUi_fota.cpp
branchRCL_3
changeset 15 f6aa907032f4
parent 13 4eb398b07b07
child 17 7f4d10e92162
--- a/omadm/omadmappui/src/NSmlDMSyncAppUi_fota.cpp	Wed Apr 14 15:46:55 2010 +0300
+++ b/omadm/omadmappui/src/NSmlDMSyncAppUi_fota.cpp	Tue Apr 27 16:25:00 2010 +0300
@@ -46,12 +46,14 @@
 
 #include <aknmessagequerydialog.h>     // For CAknMessageQueryDialog
 
+#include <fotaconst.h>
 // For KCalenHoursInDay = 24 and other time-related constants.
 #include <calenconstants.h>           
 
 // Array granuality for displaying R_QTN_FOTA_NOTE_TIME_RESTRICTION note.
 const TInt KNSmlDMFotaNoteArrayGranuality = 3;
 
+
 // ============================ MEMBER FUNCTIONS ==============================
 //
 
@@ -236,15 +238,19 @@
 	    case EAknSoftkeyExit: //For independent .exe app launch from file browser
 		case EAknCmdExit:
         case EEikCmdExit:		// quit application
-			{
-			TApaTaskList taskList(CEikonEnv::Static()->WsSession());
-	        TApaTask task1(taskList.FindApp( KFotaServerAppUid));
+			{   
 			TInt value=-1;
             TInt r1=RProperty::Set(KPSUidNSmlDMSyncApp,KNSmlDMSyncUiLaunchKey,value);
-	        if(task1.Exists())
-	        	{
-	        	task1.EndTask();
-	        	}
+	        
+        	TBool val (EFalse);
+        	TInt err = RProperty::Get(TUid::Uid(KOmaDMAppUid), KFotaDownloadActive, val );
+        		if(val == 1)
+        			{
+        			TApaTaskList taskList(CEikonEnv::Static()->WsSession());
+        			TApaTask task1(taskList.FindApp( KFotaServerAppUid));
+        			if(task1.Exists())
+        				task1.EndTask();
+        			}	
 			Exit();
 			}
 		    break;