mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-21 18:42:35 +01:00
Ignore all errors when getting free storage space
It's not a critical check that needs to be perfomed, so in case something does not work on some device/version, let's just ignore the error.
This commit is contained in:
parent
c3c39a7b24
commit
caa3812e13
@ -11,7 +11,6 @@ import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
import android.provider.DocumentsContract;
|
||||
import android.system.ErrnoException;
|
||||
import android.system.Os;
|
||||
import android.system.StructStatVfs;
|
||||
import android.util.Log;
|
||||
@ -207,7 +206,9 @@ public class StoredDirectoryHelper {
|
||||
|
||||
// this is the same formula used inside the FsStat class
|
||||
return stat.f_bavail * stat.f_frsize;
|
||||
} catch (final IOException | ErrnoException e) {
|
||||
} catch (final Throwable e) {
|
||||
// ignore any error
|
||||
Log.e(TAG, "Could not get free storage space", e);
|
||||
return Long.MAX_VALUE;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user