add an extra check to avoid saving null contact
This commit is contained in:
parent
aa8186af56
commit
1dd37336f7
|
@ -33,10 +33,10 @@ import org.joda.time.format.DateTimeFormat
|
|||
import java.util.*
|
||||
|
||||
class EditContactActivity : ContactActivity() {
|
||||
val DEFAULT_EMAIL_TYPE = CommonDataKinds.Email.TYPE_HOME
|
||||
val DEFAULT_PHONE_NUMBER_TYPE = CommonDataKinds.Phone.TYPE_MOBILE
|
||||
val DEFAULT_ADDRESS_TYPE = CommonDataKinds.StructuredPostal.TYPE_HOME
|
||||
val DEFAULT_EVENT_TYPE = CommonDataKinds.Event.TYPE_BIRTHDAY
|
||||
private val DEFAULT_EMAIL_TYPE = CommonDataKinds.Email.TYPE_HOME
|
||||
private val DEFAULT_PHONE_NUMBER_TYPE = CommonDataKinds.Phone.TYPE_MOBILE
|
||||
private val DEFAULT_ADDRESS_TYPE = CommonDataKinds.StructuredPostal.TYPE_HOME
|
||||
private val DEFAULT_EVENT_TYPE = CommonDataKinds.Event.TYPE_BIRTHDAY
|
||||
|
||||
private val INTENT_TAKE_PHOTO = 1
|
||||
private val INTENT_CHOOSE_PHOTO = 2
|
||||
|
@ -490,7 +490,7 @@ class EditContactActivity : ContactActivity() {
|
|||
}
|
||||
|
||||
private fun saveContact() {
|
||||
if (isSaving) {
|
||||
if (isSaving || contact == null) {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue