diff options
author | Stefan Niedermann <info@niedermann.it> | 2022-12-29 16:14:32 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2022-12-29 16:14:32 +0300 |
commit | a2f0efb16ae92431ea765aa59a87451bc9555a20 (patch) | |
tree | 5ecbd630430f761e23615c0c5fae77d1f443cfdc /app/src/main/java/it/niedermann/nextcloud/deck/ui | |
parent | 323cdcd205545dc53469456632f667bd6c89553c (diff) |
Fix picture attachment picker for Android 13
Signed-off-by: Stefan Niedermann <info@niedermann.it>
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/ui')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/picker/AbstractCursorPickerAdapter.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/picker/AbstractCursorPickerAdapter.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/picker/AbstractCursorPickerAdapter.java index a2ea6dd37..ab05e1c2e 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/picker/AbstractCursorPickerAdapter.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/picker/AbstractCursorPickerAdapter.java @@ -1,5 +1,10 @@ package it.niedermann.nextcloud.deck.ui.card.attachments.picker; +import static android.database.Cursor.FIELD_TYPE_INTEGER; +import static android.database.Cursor.FIELD_TYPE_NULL; +import static androidx.recyclerview.widget.RecyclerView.NO_ID; +import static java.util.Objects.requireNonNull; + import android.content.ContentResolver; import android.content.Context; import android.database.Cursor; @@ -16,11 +21,6 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.function.BiConsumer; -import static android.database.Cursor.FIELD_TYPE_INTEGER; -import static android.database.Cursor.FIELD_TYPE_NULL; -import static androidx.recyclerview.widget.RecyclerView.NO_ID; -import static java.util.Objects.requireNonNull; - /** * An {@link RecyclerView.Adapter} which provides previews of one type of files and also an option to open a native dialog. * <p> @@ -45,7 +45,7 @@ public abstract class AbstractCursorPickerAdapter<T extends RecyclerView.ViewHol * This must only be one {@link Thread} because otherwise the cursor might change while fetching data from it. */ @NonNull - protected final ExecutorService bindExecutor = Executors.newFixedThreadPool(1); + protected final ExecutorService bindExecutor = Executors.newSingleThreadExecutor(); public AbstractCursorPickerAdapter(@NonNull Context context, @NonNull BiConsumer<Uri, Pair<String, RequestBuilder<?>>> onSelect, @NonNull Runnable openNativePicker, Uri subject, String idColumn, String sortOrder) { this(context, onSelect, openNativePicker, subject, idColumn, new String[]{idColumn}, sortOrder); |