diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt index c51ccaeeb..e808b6ac2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt @@ -2,14 +2,12 @@ package com.simplemobiletools.gallery.pro.extensions import android.appwidget.AppWidgetManager import android.content.ComponentName -import android.content.ContentUris import android.content.Context import android.content.Intent import android.database.Cursor import android.graphics.Bitmap import android.graphics.drawable.PictureDrawable import android.media.AudioManager -import android.net.Uri import android.os.Process import android.provider.MediaStore.Files import android.provider.MediaStore.Images @@ -29,7 +27,6 @@ import com.bumptech.glide.request.target.Target import com.bumptech.glide.signature.ObjectKey import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.* -import com.simplemobiletools.commons.models.FileDirItem import com.simplemobiletools.gallery.pro.R import com.simplemobiletools.gallery.pro.activities.SettingsActivity import com.simplemobiletools.gallery.pro.asynctasks.GetMediaAsynctask @@ -403,7 +400,7 @@ fun Context.storeDirectoryItems(items: ArrayList) { fun Context.checkAppendingHidden(path: String, hidden: String, includedFolders: MutableSet, noMediaFolders: ArrayList): String { val dirName = getFolderNameFromPath(path) - val folderNoMediaStatuses = java.util.HashMap() + val folderNoMediaStatuses = HashMap() noMediaFolders.forEach { folder -> folderNoMediaStatuses["$folder/$NOMEDIA"] = true } @@ -646,7 +643,7 @@ fun Context.getCachedDirectories( val directories = try { directoryDao.getAll() as ArrayList } catch (e: Exception) { - ArrayList() + ArrayList() } if (!config.showRecycleBinAtFolders) { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt index 0022171b0..8de8a3ef9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt @@ -46,7 +46,7 @@ class MediaFetcher(val context: Context) { if (isRPlus() && curPath != FAVORITES && curPath != RECYCLE_BIN) { if (android11Files?.containsKey(curPath.toLowerCase()) == true) { curMedia.addAll(android11Files[curPath.toLowerCase()]!!) - } else { + } else if (android11Files == null) { val files = getAndroid11FolderMedia(isPickImage, isPickVideo, favoritePaths) if (files.containsKey(curPath.toLowerCase())) { curMedia.addAll(files[curPath.toLowerCase()]!!)