Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

check external storage size even if its read only #368

Merged
merged 2 commits into from
Apr 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,9 @@ private int getAvailableBlocksDep(final @NotNull StatFs stat) {
}

private boolean isExternalStorageMounted() {
return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)
final String storageState = Environment.getExternalStorageState();
return (Environment.MEDIA_MOUNTED.equals(storageState)
|| Environment.MEDIA_MOUNTED_READ_ONLY.equals(storageState))
&& !Environment.isExternalStorageEmulated();
}

Expand Down