adding some crashfixes

This commit is contained in:
tibbi 2020-11-03 19:39:59 +01:00
parent 953d521e47
commit d1fe3531e1
5 changed files with 28 additions and 9 deletions

View file

@ -475,7 +475,11 @@ fun Context.deleteConversation(threadId: Int) {
var uri = Sms.CONTENT_URI
val selection = "${Sms.THREAD_ID} = ?"
val selectionArgs = arrayOf(threadId.toString())
contentResolver.delete(uri, selection, selectionArgs)
try {
contentResolver.delete(uri, selection, selectionArgs)
} catch (e: Exception) {
showErrorToast(e)
}
uri = Mms.CONTENT_URI
contentResolver.delete(uri, selection, selectionArgs)