From 70ef61e0acc587696df19527ac9286a9554a1c43 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 10 Aug 2019 19:59:46 +0200 Subject: [PATCH] catch exceptions thrown at updating widgets --- .../gallery/pro/helpers/MyWidgetProvider.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt index 5ba0e3811..199d90952 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt @@ -74,7 +74,11 @@ class MyWidgetProvider : AppWidgetProvider() { } setupAppOpenIntent(context, views, R.id.widget_holder, it) - appWidgetManager.updateAppWidget(it.widgetId, views) + + try { + appWidgetManager.updateAppWidget(it.widgetId, views) + } catch (ignored: Exception) { + } } } }