mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 20:48:00 +01:00
scan OTG paths only if there is an OTG device connected
This commit is contained in:
parent
0a481e5d57
commit
293d8a7390
1 changed files with 5 additions and 3 deletions
|
@ -26,9 +26,11 @@ class MediaFetcher(val context: Context) {
|
|||
}
|
||||
|
||||
val curMedia = ArrayList<Medium>()
|
||||
if (curPath.startsWith(OTG_PATH)) {
|
||||
val newMedia = getMediaOnOTG(curPath, isPickImage, isPickVideo, filterMedia, favoritePaths, getVideoDurations)
|
||||
curMedia.addAll(newMedia)
|
||||
if (curPath.startsWith(OTG_PATH, true)) {
|
||||
if (context.hasOTGConnected()) {
|
||||
val newMedia = getMediaOnOTG(curPath, isPickImage, isPickVideo, filterMedia, favoritePaths, getVideoDurations)
|
||||
curMedia.addAll(newMedia)
|
||||
}
|
||||
} else {
|
||||
val newMedia = getMediaInFolder(curPath, isPickImage, isPickVideo, filterMedia, getProperDateTaken, favoritePaths, getVideoDurations)
|
||||
curMedia.addAll(newMedia)
|
||||
|
|
Loading…
Reference in a new issue