catch exceptions thrown at creating shortcuts
This commit is contained in:
parent
abed38ddd9
commit
ea73d4a403
1 changed files with 5 additions and 2 deletions
|
|
@ -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) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue