@@ -17,7 +17,7 @@ class InsertContactIntentBuilder : BaseActivityBuilder() {
1717 private var phone: String? = null
1818 private var phoneType: PhoneType ? = null
1919 private var customPhoneType: String? = null
20- private var phoneIsPrimary = false
20+ private var phoneIsPrimary: Boolean? = null
2121 private var secondaryPhone: String? = null
2222 private var secondaryPhoneType: PhoneType ? = null
2323 private var customSecondaryPhoneType: String? = null
@@ -27,7 +27,7 @@ class InsertContactIntentBuilder : BaseActivityBuilder() {
2727 private var email: String? = null
2828 private var emailType: EmailAddressType ? = null
2929 private var customEmailType: String? = null
30- private var emailIsPrimary = false
30+ private var emailIsPrimary: Boolean? = null
3131 private var secondaryEmail: String? = null
3232 private var secondaryEmailType: EmailAddressType ? = null
3333 private var customSecondaryEmailType: String? = null
@@ -36,7 +36,7 @@ class InsertContactIntentBuilder : BaseActivityBuilder() {
3636 private var customTertiaryEmailType: String? = null
3737 private var postal: String? = null
3838 private var postalType: String? = null
39- private var postalIsPrimary = false
39+ private var postalIsPrimary: Boolean? = null
4040
4141 /* *
4242 * Set the extra field for the contact name.
@@ -147,10 +147,11 @@ class InsertContactIntentBuilder : BaseActivityBuilder() {
147147 * Set the field for the phone isprimary flag.
148148 * <P>Type: boolean</P>
149149 *
150+ * @param phoneIsPrimary Boolean
150151 * @return This InsertContactIntentBuilder for method chaining
151152 */
152- fun phoneIsPrimary (): InsertContactIntentBuilder {
153- this .phoneIsPrimary = true
153+ fun phoneIsPrimary (phoneIsPrimary : Boolean ): InsertContactIntentBuilder {
154+ this .phoneIsPrimary = phoneIsPrimary
154155 return this
155156 }
156157
@@ -274,10 +275,11 @@ class InsertContactIntentBuilder : BaseActivityBuilder() {
274275 /* *
275276 * Set the field for the email isprimary flag.
276277 *
278+ * @param emailIsPrimary Boolean
277279 * @return This InsertContactIntentBuilder for method chaining
278280 */
279- fun emailIsPrimary (): InsertContactIntentBuilder {
280- this .emailIsPrimary = true
281+ fun emailIsPrimary (emailIsPrimary : Boolean ): InsertContactIntentBuilder {
282+ this .emailIsPrimary = emailIsPrimary
281283 return this
282284 }
283285
@@ -385,10 +387,11 @@ class InsertContactIntentBuilder : BaseActivityBuilder() {
385387 /* *
386388 * Set the extra field for the postal isprimary flag.
387389 *
390+ * @param postalIsPrimary Boolean
388391 * @return This InsertContactIntentBuilder for method chaining
389392 */
390- fun postalIsPrimary (): InsertContactIntentBuilder {
391- this .postalIsPrimary = true
393+ fun postalIsPrimary (postalIsPrimary : Boolean ): InsertContactIntentBuilder {
394+ this .postalIsPrimary = postalIsPrimary
392395 return this
393396 }
394397
@@ -432,7 +435,9 @@ class InsertContactIntentBuilder : BaseActivityBuilder() {
432435 }
433436 }
434437
435- putExtra(PHONE_ISPRIMARY , phoneIsPrimary)
438+ phoneIsPrimary?.let {
439+ putExtra(PHONE_ISPRIMARY , it)
440+ }
436441
437442 secondaryPhone?.let {
438443 putExtra(SECONDARY_PHONE , it)
@@ -470,7 +475,9 @@ class InsertContactIntentBuilder : BaseActivityBuilder() {
470475 }
471476 }
472477
473- putExtra(EMAIL_ISPRIMARY , emailIsPrimary)
478+ emailIsPrimary?.let {
479+ putExtra(EMAIL_ISPRIMARY , it)
480+ }
474481
475482 secondaryEmail?.let {
476483 putExtra(SECONDARY_EMAIL , it)
@@ -504,7 +511,9 @@ class InsertContactIntentBuilder : BaseActivityBuilder() {
504511 putExtra(POSTAL_TYPE , it)
505512 }
506513
507- putExtra(POSTAL_ISPRIMARY , postalIsPrimary)
514+ postalIsPrimary?.let {
515+ putExtra(POSTAL_ISPRIMARY , it)
516+ }
508517
509518 }
510519 }
0 commit comments