Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set contacts provider settings when address books are renamed or update #1123

Conversation

sunkup
Copy link
Member

@sunkup sunkup commented Nov 6, 2024

Purpose

Currently renameAccount() creates a new address book directly without setting ContactsContract.Settings.* settings (are only set in create()).

Since renameAccount() happens inside update() and we want to set the contacts provider for both rename and update it will suffice to do so in update after renameAccount()

Short description

  • extract Contacts Provider Settings to companion object to enable re-use
  • Set contacts provider settings of LocalAddressBook in update()

Checklist

  • The PR has a proper title, description and label.
  • I have self-reviewed the PR.
  • I have added documentation to complex functions and functions that can be used by other modules.
  • I have added reasonable tests or consciously decided to not add tests.

@sunkup sunkup added the bug Something isn't working label Nov 6, 2024
@sunkup sunkup self-assigned this Nov 6, 2024
@sunkup sunkup requested a review from rfc2822 November 6, 2024 13:55
Copy link
Member

@rfc2822 rfc2822 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@rfc2822 rfc2822 merged commit cf15dd3 into main-ose Nov 6, 2024
10 checks passed
@rfc2822 rfc2822 deleted the 1113-2-localaddressbook-setupdate-contactscontractsettings-when-address-books-are-renamed-and-updated-1 branch November 6, 2024 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LocalAddressBook: set/update ContactsContract.Settings.* when address books are renamed and updated
2 participants