voicerecorder/AppSrc/CVRAppUI.cpp
branchRCL_3
changeset 7 6aee962f6139
parent 5 35a9006a7fc7
child 8 49233e24b2ab
--- a/voicerecorder/AppSrc/CVRAppUI.cpp	Fri Feb 19 22:53:07 2010 +0200
+++ b/voicerecorder/AppSrc/CVRAppUI.cpp	Fri Mar 12 15:43:04 2010 +0200
@@ -28,6 +28,8 @@
 #include "CVRRecView.h"
 #include "MVRSelectionProvider.h"
 #include "CVRAppUi.h"
+#include <sysutil.h>
+#include <StringLoader.h>
 #include "CVRDocument.h"
 #include <featmgr.h>
 #include "VRConsts.h"
@@ -206,6 +208,17 @@
 			}
 
 
+    /***** check if memory is below min value, if yes, close app*****/	
+		RFs& fs( CEikonEnv::Static()->FsSession() );
+		if (SysUtil::DiskSpaceBelowCriticalLevelL( &fs, 0, VRUtils::MemoDriveL()))
+		{			
+	        HBufC* errorText = StringLoader::LoadLC( R_VR_MEMORY_LOW_STOP_WARNING );
+	        CAknErrorNote* dlg = new( ELeave ) CAknErrorNote( ETrue );
+	        dlg->ExecuteLD( *errorText );
+	        CleanupStack::PopAndDestroy( errorText );
+			Exit();
+		}
+	 // check memory size end
 #endif
 
 		}