catch and show exceptions thrown at saving contacts

This commit is contained in:
tibbi 2018-07-30 19:13:39 +02:00
parent 3c095463f0
commit 1e38cd8037

View File

@ -993,7 +993,12 @@ class ContactsHelper(val activity: Activity) {
operations.clear()
}
}
activity.contentResolver.applyBatch(ContactsContract.AUTHORITY, operations)
try {
activity.contentResolver.applyBatch(ContactsContract.AUTHORITY, operations)
} catch (e: Exception) {
activity.showErrorToast(e)
}
}
fun removeContactsFromGroup(contacts: ArrayList<Contact>, groupId: Long) {