mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-03-10 00:00:09 +01:00
catch exceptions thrown at getting contacts
This commit is contained in:
parent
c045b53728
commit
7d0a12f2e3
@ -141,7 +141,13 @@ class ViewContactActivity : ContactActivity() {
|
|||||||
|
|
||||||
private fun initContact() {
|
private fun initContact() {
|
||||||
var wasLookupKeyUsed = false
|
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) {
|
if (contactId == 0 && isViewIntent) {
|
||||||
val data = intent.data
|
val data = intent.data
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user