make sure we handle phone number at some intents properly on older devices too

This commit is contained in:
tibbi 2018-04-06 18:29:48 +02:00
parent 4cbe122672
commit 764de9c858

View File

@ -139,7 +139,7 @@ class EditContactActivity : ContactActivity() {
}
if (contact!!.id == 0 && intent.extras?.containsKey(KEY_PHONE) == true && (intent.action == Intent.ACTION_INSERT_OR_EDIT || intent.action == Intent.ACTION_INSERT)) {
val phoneNumber = intent.getStringExtra(KEY_PHONE)
val phoneNumber = intent.extras.get(KEY_PHONE).toString()
contact!!.phoneNumbers.add(PhoneNumber(phoneNumber, DEFAULT_PHONE_NUMBER_TYPE))
setupPhoneNumbers()
}