summaryrefslogtreecommitdiff
path: root/src/de/danoeh/antennapod/service/download
diff options
context:
space:
mode:
authordaniel oeh <daniel.oeh@gmail.com>2012-08-25 22:36:52 +0200
committerdaniel oeh <daniel.oeh@gmail.com>2012-08-25 22:36:52 +0200
commit625a0436441d688dfb525c3c7860a92c4e57c3ce (patch)
treeb770163a3ccb8db6a3783ca881e0ca7d436d6e62 /src/de/danoeh/antennapod/service/download
parentd30bcfff79e7027762e89053d9c934a9358b746f (diff)
downloadAntennaPod-625a0436441d688dfb525c3c7860a92c4e57c3ce.zip
Fixed bug in calculation of free space
Diffstat (limited to 'src/de/danoeh/antennapod/service/download')
-rw-r--r--src/de/danoeh/antennapod/service/download/HttpDownloader.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/de/danoeh/antennapod/service/download/HttpDownloader.java b/src/de/danoeh/antennapod/service/download/HttpDownloader.java
index 14ca0000f..a12cf3e48 100644
--- a/src/de/danoeh/antennapod/service/download/HttpDownloader.java
+++ b/src/de/danoeh/antennapod/service/download/HttpDownloader.java
@@ -57,9 +57,10 @@ public class HttpDownloader extends Downloader {
status.setSize(connection.getContentLength());
if (AppConfig.DEBUG)
Log.d(TAG, "Size is " + status.getSize());
- if (status.getSize() == -1
- || status.getSize() <= StorageUtils
- .getFreeSpaceAvailable()) {
+ long freeSpace = StorageUtils.getFreeSpaceAvailable();
+ if (AppConfig.DEBUG)
+ Log.d(TAG, "Free space is " + freeSpace);
+ if (status.getSize() == -1 || status.getSize() <= freeSpace) {
if (AppConfig.DEBUG)
Log.d(TAG, "Size is " + status.getSize());
publishProgress();