mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
catch exceptions thrown at creating shortcuts
This commit is contained in:
@ -258,8 +258,11 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
|
|||||||
val createNewContact = getCreateNewContactShortcut(appIconColor)
|
val createNewContact = getCreateNewContactShortcut(appIconColor)
|
||||||
|
|
||||||
val manager = getSystemService(ShortcutManager::class.java)
|
val manager = getSystemService(ShortcutManager::class.java)
|
||||||
manager.dynamicShortcuts = Arrays.asList(launchDialpad, createNewContact)
|
try {
|
||||||
config.lastHandledShortcutColor = appIconColor
|
manager.dynamicShortcuts = Arrays.asList(launchDialpad, createNewContact)
|
||||||
|
config.lastHandledShortcutColor = appIconColor
|
||||||
|
} catch (ignored: Exception) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user