mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-12-01 12:31:45 +00:00
Updated getFreeSpaceAvailable() method
This commit is contained in:
@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user