From 9870a80e8753ae78f3840acc8580e70856b3fbdf Mon Sep 17 00:00:00 2001 From: Alper Ozturk Date: Tue, 3 Oct 2023 14:51:46 +0200 Subject: [PATCH] Remove duplicated default folder icon func from MimeTypeUtil Signed-off-by: Alper Ozturk Signed-off-by: alperozturk --- .../owncloud/android/datamodel/ThumbnailsCacheManager.java | 4 ++-- .../com/owncloud/android/ui/adapter/ActivityListAdapter.java | 4 ++-- .../owncloud/android/ui/adapter/LocalFileListAdapter.java | 3 ++- .../com/owncloud/android/ui/adapter/TrashbinListAdapter.java | 4 ++-- .../main/java/com/owncloud/android/utils/MimeTypeUtil.java | 5 ----- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/datamodel/ThumbnailsCacheManager.java b/app/src/main/java/com/owncloud/android/datamodel/ThumbnailsCacheManager.java index a5d34b7d08..717937f3ab 100644 --- a/app/src/main/java/com/owncloud/android/datamodel/ThumbnailsCacheManager.java +++ b/app/src/main/java/com/owncloud/android/datamodel/ThumbnailsCacheManager.java @@ -83,6 +83,7 @@ import java.util.List; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; +import androidx.core.content.ContextCompat; import androidx.core.content.res.ResourcesCompat; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import kotlin.text.Charsets; @@ -899,8 +900,7 @@ public final class ThumbnailsCacheManager { } else { if (mFile != null) { if (mFile.isDirectory()) { - imageView.setImageDrawable(MimeTypeUtil.getDefaultFolderIcon(mContext, - viewThemeUtils)); + imageView.setImageDrawable(ContextCompat.getDrawable(mContext, R.drawable.folder)); } else { if (MimeTypeUtil.isVideo(mFile)) { imageView.setImageBitmap(ThumbnailsCacheManager.mDefaultVideo); diff --git a/app/src/main/java/com/owncloud/android/ui/adapter/ActivityListAdapter.java b/app/src/main/java/com/owncloud/android/ui/adapter/ActivityListAdapter.java index f14024737c..0a3c0e82da 100644 --- a/app/src/main/java/com/owncloud/android/ui/adapter/ActivityListAdapter.java +++ b/app/src/main/java/com/owncloud/android/ui/adapter/ActivityListAdapter.java @@ -80,6 +80,7 @@ import java.util.List; import java.util.Locale; import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; import androidx.recyclerview.widget.RecyclerView; /** @@ -271,8 +272,7 @@ public class ActivityListAdapter extends RecyclerView.Adapter