v0.3.2 - New features for disabling validation checks in read/write APIs, improvements for Insert API, bug fixes, and a small breaking change
LatestThis 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
- Implement a new
Insert
API function (commitInChunks
) that allows users to insert large numbers of new RawContacts much faster thancommit
#329, documentation - Add option to disable Account validation checks in
Insert
andProfileInsert
APIs #318, documentation - Add option to disable Account validation checks in
MoveRawContactsAcrossAccounts
API #319, documentation - Add option to disable GroupMembership validation checks in
Insert
andProfileInsert
APIs #320, documentation - Add option to disable included field validation checks in all insert, update, and query APIs #321, documentation
🛠️ Improvements
- The
Insert
API now only queries Groups internally at most once regardless of the quantity of RawContacts being inserted #330 - The
Insert
API now only queries Accounts internally at most once regardless of the quantity of RawContacts being inserted #332 - The
Insert
API now skips processing GroupMemberships of RawContacts that specified no GroupMemberships #331 - The
Insert
API no longer adds an update Options operation for RawContacts that has null Options #333 - Allow
SimContactsInsert
andSimContactsUpdate
to be cancelled during calculation of max character limits #327
🐞 Bug fixes
Insert
API includesRawContactsFields
(AccountName, AccountType, SourceId) even when not included #325AccountQuery
API returns all available/visible accounts ifandroid.permission.GET_ACCOUNTS
is NOT explicitly granted, regardless of values passed towithTypes
#338
💣 Breaking changes
- Included custom data field sets are now nullable #324
Refactors
- Refactor
Contacts.insertSimContact
function inSimContactsInsert.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
🗣️ Discuss this release
Head on over to the v0.3.2 Release Checklist and leave a comment and/or some reactions 🙏 😄