Skip to content

fix(manifest): add SyncAdapter package visibility for Android 11+#1091

Open
goldnetcoding wants to merge 4 commits intoFossifyOrg:mainfrom
goldnetcoding:fix/sync-adapter-visibility
Open

fix(manifest): add SyncAdapter package visibility for Android 11+#1091
goldnetcoding wants to merge 4 commits intoFossifyOrg:mainfrom
goldnetcoding:fix/sync-adapter-visibility

Conversation

@goldnetcoding
Copy link

@goldnetcoding goldnetcoding commented Mar 1, 2026

Type of change(s)

  • Bug fix
  • Feature / enhancement
  • Infrastructure / tooling (CI, build, deps, tests)
  • Documentation

What changed and why

  • Added a <queries> entry for the android.content.SyncAdapter intent in AndroidManifest.xml.

Starting with Android 11 (API 30), package visibility restrictions require apps to explicitly declare external components that are not automatically visible using the <queries> element. This change adds the required SyncAdapter intent signature.

This follows the Android package visibility requirements introduced in API 30:
https://developer.android.com/training/package-visibility/declaring#intent-filter-signature

Before the fix, Logcat showed AppsFilter blocking interaction with at.bitfire.davdroid (DAVx⁵) on a Pixel 9 (GrapheneOS), a Samsung A54 (One UI 8.0) and an Android 16 emulator, indicating a package visibility restriction. After adding the required <queries> declaration, synchronization works consistently.

Tests performed

  • Temporarily added the READ_SYNC_SETTINGS permission to allow inspection of sync state.
  • Verified that ContentResolver.getIsSyncable() returns 0 for the account and calendar authority while the package visibility restriction was present.
  • Added a <queries> entry for the android.content.SyncAdapter intent in AndroidManifest.xml.
  • Confirmed that ContentResolver.getIsSyncable() returns 1 for the same account and calendar authority after the change.
  • Observed that ContentResolver.getIsSyncable() can also return 0 due to account access restrictions (see Can't trigger CalDAV update on sync (endless loading) #270), which is unrelated to the package visibility issue addressed here.
  • Confirmed that synchronization worked correctly on an Android 10 emulator (API 29) without the fix.
  • Verified on the same Android 10 emulator (API 29) that behavior remains unchanged after applying the fix, as expected, since package visibility restrictions were introduced only in API 30.

Closes the following issue(s)

Checklist

  • I read the contribution guidelines.
  • I manually tested my changes on device/emulator (if applicable).
  • I updated the "Unreleased" section in CHANGELOG.md (if applicable).
  • I have self-reviewed my pull request (no typos, formatting errors, etc.).
  • I understand every change in this pull request.

@goldnetcoding goldnetcoding force-pushed the fix/sync-adapter-visibility branch from 618ad8c to 09686cb Compare March 2, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In-App refresh does not synchronize changes

1 participant