avoid ActivityNotFoundException at opening the contact editor
This commit is contained in:
parent
6f9668d520
commit
57263cce15
|
@ -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)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue