catch exceptions thrown at getting contacts
This commit is contained in:
parent
c045b53728
commit
7d0a12f2e3
1 changed files with 7 additions and 1 deletions
|
|
@ -141,7 +141,13 @@ class ViewContactActivity : ContactActivity() {
|
|||
|
||||
private fun initContact() {
|
||||
var wasLookupKeyUsed = false
|
||||
var contactId = intent.getIntExtra(CONTACT_ID, 0)
|
||||
var contactId: Int
|
||||
try {
|
||||
contactId = intent.getIntExtra(CONTACT_ID, 0)
|
||||
} catch (e: Exception) {
|
||||
return
|
||||
}
|
||||
|
||||
if (contactId == 0 && isViewIntent) {
|
||||
val data = intent.data
|
||||
if (data != null) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue