LocalAddressBook.renameAccount()
doesn't prepare accounts the same way as create()
does
#1111
Closed
3 tasks done
Labels
bug
Something isn't working
During a rename address book operation (
renameAccount()
),LocalAddressBook
doesn't callupdateSyncFrameworkSettings()
when creating address books. This may cause one or two extra unnecessary syncs from the sync framework. It fixes itself anyway because sooner or laterLocalAddressBook.update()
will be called, which in turn callsupdateSyncFrameworkSettings
.LocalAddressBook.create()
does callupdateSyncFrameworkSettings
, butcreate()
is not used byrenameAccount()
. Shared code should be in a separate method.addressBook.settings
(ContactsContract.Settings.SHOULD_SYNC
andUNGROUPED_VISIBLE
) are also not set when address books are created during renaming or when address books are updated.addressBook.readOnly
is also not set when renamed, but at least when updated.It should be exactly documented in which state an address book account should be and how and when it gets into that state.
LocalAddressBook
: callupdateSyncFrameworkSettings
when address books are renamed #1112LocalAddressBook
: set/updateContactsContract.Settings.*
when address books are renamed and updated #1113LocalAddressBook
: set/updatereadOnly
when address books are renamed #1114readOnly
is only updated whenforceReadOnly != null
. HoweverreadOnly
should always be calculated and thenowReadOnly != readOnly
block executed, if applicable.The text was updated successfully, but these errors were encountered: