javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/CheckDiskSpace.java
branchRCL_3
changeset 83 26b2b12093af
parent 77 7cee158cb8cd
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/CheckDiskSpace.java	Wed Sep 15 12:05:25 2010 +0300
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/CheckDiskSpace.java	Wed Oct 13 14:23:59 2010 +0300
@@ -42,8 +42,15 @@
     public void execute(ExeBall aBall)
     {
         InstallBall ball = (InstallBall)aBall;
+
         int initialSize = ball.iSuite.calculateInitialSize();
-        int requiredSize = getRequiredSize(ball);
+        if (initialSize == 0 && ball.iJarFilename != null)
+        {
+            // Get initialSize from jar file size.
+            initialSize = (int)FileUtils.getSize(ball.iJarFilename);
+
+        }
+        int requiredSize = initialSize + (100 * 1024); // +100kB
 
         if (ball.iUserConfirmation == null)
         {
@@ -96,25 +103,6 @@
     }
 
     /**
-     * Returns amount of disk space this application requires.
-     */
-    static int getRequiredSize(InstallBall aBall)
-    {
-        int initialSize = aBall.iSuite.getInitialSize();
-        if (initialSize <= 0)
-        {
-            initialSize = aBall.iSuite.calculateInitialSize();
-        }
-        if (initialSize == 0 && aBall.iJarFilename != null)
-        {
-            // Get initialSize from jar file size.
-            initialSize = (int)FileUtils.getSize(aBall.iJarFilename);
-
-        }
-        return initialSize + (100 * 1024); // +100kB
-    }
-
-    /**
      * Checks if given drive has enough free disk space. Throws
      * InstallerException if there is not enough free disk space.
      */
@@ -151,9 +139,9 @@
             int driveId = drive.getNumber();
             if (SysUtil.isDiskSpaceBelowCriticalLevel(aSizeInBytes, driveId))
             {
-                Log.log("Drive " + driveId +
-                        " space below critical level, required space " +
-                        aSizeInBytes + " bytes");
+                Log.logWarning("Drive " + driveId +
+                               " space below critical level, required space " +
+                               aSizeInBytes + " bytes");
             }
             else
             {