catch exceptions thrown at creating shortcuts

This commit is contained in:
tibbi 2019-03-11 12:18:46 +01:00
parent abed38ddd9
commit ea73d4a403

View File

@ -258,8 +258,11 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
val createNewContact = getCreateNewContactShortcut(appIconColor)
val manager = getSystemService(ShortcutManager::class.java)
manager.dynamicShortcuts = Arrays.asList(launchDialpad, createNewContact)
config.lastHandledShortcutColor = appIconColor
try {
manager.dynamicShortcuts = Arrays.asList(launchDialpad, createNewContact)
config.lastHandledShortcutColor = appIconColor
} catch (ignored: Exception) {
}
}
}