diff --git a/app/build.gradle b/app/build.gradle index f4c70416..140b0da5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -45,7 +45,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:3.18.17' + implementation 'com.simplemobiletools:commons:3.18.23' implementation 'joda-time:joda-time:2.9.9' implementation 'com.facebook.stetho:stetho:1.5.0' diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/activities/EditContactActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/activities/EditContactActivity.kt index 2a666f60..8a77a161 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/activities/EditContactActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/activities/EditContactActivity.kt @@ -148,11 +148,11 @@ class EditContactActivity : ContactActivity() { } if (contact!!.id == 0 && intent.extras?.containsKey(KEY_PHONE) == true && (action == Intent.ACTION_INSERT_OR_EDIT || action == Intent.ACTION_INSERT)) { - val phoneNumber = intent.extras.get(KEY_PHONE).toString() + val phoneNumber = intent.extras.get(KEY_PHONE).toString() ?: "" contact!!.phoneNumbers.add(PhoneNumber(phoneNumber, DEFAULT_PHONE_NUMBER_TYPE)) setupPhoneNumbers() - val contactFullName = intent.extras.get(KEY_NAME).toString() + val contactFullName = intent.extras.get(KEY_NAME)?.toString() ?: "" contact_first_name.setText(contactFullName) } diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt index c7130a79..397a5937 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt @@ -442,7 +442,7 @@ class ContactsHelper(val activity: BaseSimpleActivity) { if (cursor?.moveToFirst() == true) { do { val id = cursor.getLongValue(ContactsContract.Groups._ID) - val title = cursor.getStringValue(ContactsContract.Groups.TITLE) + val title = cursor.getStringValue(ContactsContract.Groups.TITLE) ?: continue val systemId = cursor.getStringValue(ContactsContract.Groups.SYSTEM_ID) if (groups.map { it.title }.contains(title) && systemId != null) {