adding a crashfix at launching contact details intent

This commit is contained in:
tibbi 2020-12-06 17:02:07 +01:00
parent c346b82ff2
commit 7968eb4c85
2 changed files with 6 additions and 2 deletions

View file

@ -6,7 +6,7 @@ buildscript {
propMinSdkVersion = 21
propTargetSdkVersion = propCompileSdkVersion
propVersionCode = 1
propVersionName = '5.32.5'
propVersionName = '5.32.6'
kotlin_version = '1.4.20'
}

View file

@ -382,7 +382,11 @@ fun Activity.launchViewContactIntent(uri: Uri) {
action = ContactsContract.QuickContact.ACTION_QUICK_CONTACT
data = uri
if (resolveActivity(packageManager) != null) {
startActivity(this)
try {
startActivity(this)
} catch (e: Exception) {
showErrorToast(e)
}
} else {
toast(R.string.no_app_found)
}