mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00
#issue2787 #issue2592 both fixed by same changes
This commit is contained in:
parent
6b61cf02f6
commit
d25929a78a
@ -33,7 +33,7 @@ object StorageDeviceUtils {
|
||||
@JvmStatic
|
||||
fun getReadableStorage(context: Context): List<StorageDevice> {
|
||||
val storageDevices = ArrayList<StorageDevice>().apply {
|
||||
add(environmentDevices())
|
||||
add(environmentDevices(context))
|
||||
addAll(externalMountPointDevices())
|
||||
addAll(externalFilesDirsDevices(context, false))
|
||||
}
|
||||
@ -63,9 +63,9 @@ object StorageDeviceUtils {
|
||||
?.map { dir -> StorageDevice(dir, false) }
|
||||
.orEmpty()
|
||||
|
||||
private fun environmentDevices() =
|
||||
private fun environmentDevices(context: Context) =
|
||||
StorageDevice(
|
||||
generalisePath(Environment.getExternalStorageDirectory().path, false),
|
||||
generalisePath(context.getExternalFilesDir("").toString(), true),
|
||||
Environment.isExternalStorageEmulated()
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user