mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-08 06:42:21 -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
|
@JvmStatic
|
||||||
fun getReadableStorage(context: Context): List<StorageDevice> {
|
fun getReadableStorage(context: Context): List<StorageDevice> {
|
||||||
val storageDevices = ArrayList<StorageDevice>().apply {
|
val storageDevices = ArrayList<StorageDevice>().apply {
|
||||||
add(environmentDevices())
|
add(environmentDevices(context))
|
||||||
addAll(externalMountPointDevices())
|
addAll(externalMountPointDevices())
|
||||||
addAll(externalFilesDirsDevices(context, false))
|
addAll(externalFilesDirsDevices(context, false))
|
||||||
}
|
}
|
||||||
@ -63,9 +63,9 @@ object StorageDeviceUtils {
|
|||||||
?.map { dir -> StorageDevice(dir, false) }
|
?.map { dir -> StorageDevice(dir, false) }
|
||||||
.orEmpty()
|
.orEmpty()
|
||||||
|
|
||||||
private fun environmentDevices() =
|
private fun environmentDevices(context: Context) =
|
||||||
StorageDevice(
|
StorageDevice(
|
||||||
generalisePath(Environment.getExternalStorageDirectory().path, false),
|
generalisePath(context.getExternalFilesDir("").toString(), true),
|
||||||
Environment.isExternalStorageEmulated()
|
Environment.isExternalStorageEmulated()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user