avoid ActivityNotFoundException at opening the contact editor

This commit is contained in:
tibbi 2018-08-21 11:12:24 +02:00
parent 6f9668d520
commit 57263cce15
1 changed files with 5 additions and 1 deletions

View File

@ -165,7 +165,11 @@ class ViewContactActivity : ContactActivity() {
Intent().apply { Intent().apply {
action = ContactsContract.QuickContact.ACTION_QUICK_CONTACT action = ContactsContract.QuickContact.ACTION_QUICK_CONTACT
data = getContactPublicUri(contact!!) data = getContactPublicUri(contact!!)
if (resolveActivity(packageManager) != null) {
startActivity(this) startActivity(this)
} else {
toast(R.string.no_app_found)
}
} }
} }