From f19615820410529872571c34700f2a0595b012a8 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 17 Oct 2018 11:48:44 +0200 Subject: [PATCH] catch exceptions thrown at clearing the recycle bin --- .../com/simplemobiletools/gallery/activities/MainActivity.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt index ce4c12e27..280f51940 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -992,7 +992,10 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { config.lastBinCheck = System.currentTimeMillis() Handler().postDelayed({ Thread { - mMediumDao.deleteOldRecycleBinItems(System.currentTimeMillis() - MONTH_MILLISECONDS) + try { + mMediumDao.deleteOldRecycleBinItems(System.currentTimeMillis() - MONTH_MILLISECONDS) + } catch (e: Exception) { + } }.start() }, 3000L) }