Updated getFreeSpaceAvailable() method
This commit is contained in:
parent
0978fbacb1
commit
705693ea0c
|
@ -49,8 +49,8 @@ public class StorageUtils {
|
||||||
|
|
||||||
/** Get the number of free bytes that are available on the external storage. */
|
/** Get the number of free bytes that are available on the external storage. */
|
||||||
public static long getFreeSpaceAvailable() {
|
public static long getFreeSpaceAvailable() {
|
||||||
StatFs stat = new StatFs(Environment.getExternalStorageDirectory()
|
StatFs stat = new StatFs(PodcastApp.getDataFolder(
|
||||||
.getPath());
|
PodcastApp.getInstance(), null).getAbsolutePath());
|
||||||
long availableBlocks = stat.getAvailableBlocks();
|
long availableBlocks = stat.getAvailableBlocks();
|
||||||
long blockSize = stat.getBlockSize();
|
long blockSize = stat.getBlockSize();
|
||||||
return availableBlocks * blockSize;
|
return availableBlocks * blockSize;
|
||||||
|
|
Loading…
Reference in New Issue