diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Context.kt index 718bc412..7e1a768a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Context.kt @@ -332,7 +332,11 @@ fun Context.getBlockedNumbers(): ArrayList { fun Context.addBlockedNumber(number: String) { ContentValues().apply { put(BlockedNumbers.COLUMN_ORIGINAL_NUMBER, number) - contentResolver.insert(BlockedNumbers.CONTENT_URI, this) + try { + contentResolver.insert(BlockedNumbers.CONTENT_URI, this) + } catch (e: Exception) { + showErrorToast(e) + } } }