From 2d42d22df47f5db368a0de1bf2ebca0befba17be Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Wed, 14 Apr 2021 10:49:19 +1000 Subject: [PATCH] Don't close cursor prematurely --- .../org/thoughtcrime/securesms/MediaPreviewActivity.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/MediaPreviewActivity.java b/app/src/main/java/org/thoughtcrime/securesms/MediaPreviewActivity.java index 60b5cbeb25..908943f5a8 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/MediaPreviewActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/MediaPreviewActivity.java @@ -311,11 +311,6 @@ public class MediaPreviewActivity extends PassphraseRequiredActionBarActivity im private int cleanupMedia() { int restartItem = mediaPager.getCurrentItem(); - PagerAdapter adapter = mediaPager.getAdapter(); - if (adapter instanceof CursorPagerAdapter) { - ((CursorPagerAdapter)adapter).cursor.close(); - } - mediaPager.removeAllViews(); mediaPager.setAdapter(null);