Clean up base classes

Should be able to throw away some of the search controller stuff after Global Search is migrated
This commit is contained in:
arkon
2022-09-18 17:22:54 -04:00
parent 7ec822503a
commit 0225711f6f
11 changed files with 42 additions and 137 deletions

View File

@@ -43,9 +43,8 @@ object DiskUtil {
/**
* Returns the root folders of all the available external storages.
*/
fun getExternalStorages(context: Context): Collection<File> {
val directories = mutableSetOf<File>()
directories += ContextCompat.getExternalFilesDirs(context, null)
fun getExternalStorages(context: Context): List<File> {
return ContextCompat.getExternalFilesDirs(context, null)
.filterNotNull()
.mapNotNull {
val file = File(it.absolutePath.substringBefore("/Android/"))
@@ -56,8 +55,6 @@ object DiskUtil {
null
}
}
return directories
}
/**