fix(manifest): add SyncAdapter package visibility for Android 11+#1091
Open
goldnetcoding wants to merge 4 commits intoFossifyOrg:mainfrom
Open
fix(manifest): add SyncAdapter package visibility for Android 11+#1091goldnetcoding wants to merge 4 commits intoFossifyOrg:mainfrom
goldnetcoding wants to merge 4 commits intoFossifyOrg:mainfrom
Conversation
618ad8c to
09686cb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change(s)
What changed and why
<queries>entry for theandroid.content.SyncAdapterintent inAndroidManifest.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
AppsFilterblocking interaction withat.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
READ_SYNC_SETTINGSpermission to allow inspection of sync state.ContentResolver.getIsSyncable()returns0for the account and calendar authority while the package visibility restriction was present.<queries>entry for theandroid.content.SyncAdapterintent inAndroidManifest.xml.ContentResolver.getIsSyncable()returns1for the same account and calendar authority after the change.ContentResolver.getIsSyncable()can also return0due 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.Closes the following issue(s)
Checklist
CHANGELOG.md(if applicable).