mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
catch exceptions thrown at getting contacts
This commit is contained in:
@ -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) {
|
||||||
|
Reference in New Issue
Block a user