From 9b98f1d9ad30455377d0ce37e7453cc285697b49 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 11 Mar 2019 12:18:00 +0100 Subject: [PATCH] catch exceptions thrown at setting shortcuts --- .../calendar/pro/activities/MainActivity.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt index 759aecf85..489e81dcf 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt @@ -284,8 +284,11 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener { .setIntent(intent) .build() - manager.dynamicShortcuts = Arrays.asList(shortcut) - config.lastHandledShortcutColor = appIconColor + try { + manager.dynamicShortcuts = Arrays.asList(shortcut) + config.lastHandledShortcutColor = appIconColor + } catch (ignored: Exception) { + } } }