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

Query APIs do not return local contacts in Samsung devices when passing null to accounts functions #257

Closed
6 tasks done
vestrel00 opened this issue Aug 29, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@vestrel00
Copy link
Owner

vestrel00 commented Aug 29, 2022

Problem

Using query APIs' accounts function to match local (Raw)Contacts (and groups), those that have a null Account and are not synced outside of the device, does not work for Samsung devices running OneUI.

The following will NOT return any contacts;

query.accounts(null).find()

This issue occurs because "Phone contacts" (local contacts and groups) in Samsung devices are assigned to the following accoun"; vnd.sec.contact.phone (the account name and type are the same). RawContacts that are inserted with a null account will, immediately or at a later time, be automatically associated to this local account. This account is not returned by the Android AccountManager. Either because 3rd party apps do not have access to it or it is not an actual real account.

Solution

Update the accounts function of all query APIs to also match the local account name and type of Samsung devices instead of just null when null is passed.

Apply this solution to all query APIs with an accounts function;

Other considerations

Given that Samsung is automatically assigning local RawContacts to the vnd.sec.contact.phone "account", there is no need to refactor insert and update APIs.

@vestrel00 vestrel00 added the bug Something isn't working label Aug 29, 2022
@vestrel00 vestrel00 self-assigned this Aug 29, 2022
@vestrel00 vestrel00 added this to In progress in Consumer issues Aug 29, 2022
@vestrel00 vestrel00 changed the title Query APIs do not return local contacts in Samsung devices when using accounts function Query APIs do not return local contacts in Samsung devices when using accounts functions Aug 29, 2022
@vestrel00 vestrel00 moved this from In progress to Done in Consumer issues Aug 29, 2022
@vestrel00 vestrel00 changed the title Query APIs do not return local contacts in Samsung devices when using accounts functions Query APIs do not return local contacts in Samsung devices when passing null to accounts functions Aug 30, 2022
@vestrel00
Copy link
Owner Author

This is included in 0.2.4!

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
Development

No branches or pull requests

1 participant