diff --git a/src/net/sf/briar/util/FileUtils.java b/src/net/sf/briar/util/FileUtils.java index 3a726a798b21b664f070fd40ec4800601070e607..c94e50a50be5885dd75786948838ddc74bbf9399 100644 --- a/src/net/sf/briar/util/FileUtils.java +++ b/src/net/sf/briar/util/FileUtils.java @@ -9,8 +9,6 @@ import java.security.CodeSource; import org.apache.commons.io.FileSystemUtils; -import android.annotation.SuppressLint; -import android.os.Build; import android.os.StatFs; public class FileUtils { @@ -88,15 +86,10 @@ public class FileUtils { f.delete(); } - @SuppressLint("NewApi") public static long getFreeSpace(File f) throws IOException { if(OsUtils.isAndroid()) { - if(Build.VERSION.SDK_INT >= 9) { - return f.getUsableSpace(); - } else { - StatFs s = new StatFs(f.getAbsolutePath()); - return (long) s.getAvailableBlocks() * s.getBlockSize(); - } + StatFs s = new StatFs(f.getAbsolutePath()); + return (long) s.getAvailableBlocks() * s.getBlockSize(); } else { return FileSystemUtils.freeSpaceKb(f.getAbsolutePath()) * 1024L; }