Skip to content

v0.3.2 - New features for disabling validation checks in read/write APIs, improvements for Insert API, bug fixes, and a small breaking change

Latest
Compare
Choose a tag to compare
@vestrel00 vestrel00 released this 21 Apr 06:27

This release contains functions that give you more control over Account, Group, and Include field validation checks in read/write APIs. Apart from that, this comes with related improvements and some bug fixes. There's a minor breaking change that might affect you if you have created your own custom data.

💡 New features

  1. Implement a new Insert API function (commitInChunks) that allows users to insert large numbers of new RawContacts much faster than commit #329, documentation
  2. Add option to disable Account validation checks in Insert and ProfileInsert APIs #318, documentation
  3. Add option to disable Account validation checks in MoveRawContactsAcrossAccounts API #319, documentation
  4. Add option to disable GroupMembership validation checks in Insert and ProfileInsert APIs #320, documentation
  5. Add option to disable included field validation checks in all insert, update, and query APIs #321, documentation

🛠️ Improvements

  1. The Insert API now only queries Groups internally at most once regardless of the quantity of RawContacts being inserted #330
  2. The Insert API now only queries Accounts internally at most once regardless of the quantity of RawContacts being inserted #332
  3. The Insert API now skips processing GroupMemberships of RawContacts that specified no GroupMemberships #331
  4. The Insert API no longer adds an update Options operation for RawContacts that has null Options #333
  5. Allow SimContactsInsert and SimContactsUpdate to be cancelled during calculation of max character limits #327

🐞 Bug fixes

  1. Insert API includes RawContactsFields (AccountName, AccountType, SourceId) even when not included #325
  2. AccountQuery API returns all available/visible accounts if android.permission.GET_ACCOUNTS is NOT explicitly granted, regardless of values passed to withTypes #338

💣 Breaking changes

  1. Included custom data field sets are now nullable #324

Refactors

  1. Refactor Contacts.insertSimContact function in SimContactsInsert.kt from public to internal #328

🧗 Migrating from 0.3.1 -> 0.3.2

Included custom data field sets are now nullable #324

Fix compile errors by making Set<AbstractCustomDataField> nullable -> Set<AbstractCustomDataField>?

For example, change this...

internal class HandleNameMapperFactory {
    override fun create(
        ... includeFields: Set<HandleNameField>
    ) = HandleNameMapper(HandleNameDataCursor(cursor, includeFields))
}

to this...

internal class HandleNameMapperFactory {
    override fun create(
        ... includeFields: Set<HandleNameField>?
    ) = HandleNameMapper(HandleNameDataCursor(cursor, includeFields))
}

🗒️ Full Changelog

0.3.1...0.3.2

🗣️ Discuss this release

Head on over to the v0.3.2 Release Checklist and leave a comment and/or some reactions 🙏 😄