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

Fix Android app permissions for SDK levels earlier than 28 #98230

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

and-rad
Copy link
Contributor

@and-rad and-rad commented Oct 16, 2024

Fixes #98229

The root of the problem is a change introduced in PermissionInfo in Android P. Before, the protection level consisted of the level itself and a set of flags. From Android P onwards, protection level and flags are queried separately. This is what Godot relies on currently to query what permissions the app needs and if they're currently granted. It fails for earlier Android versions because it doesn't separate the flags from the protection level before doing these checks.

This PR is backwards compatible and if accepted, I'd like it to be backported to Godot 4.3.

@and-rad and-rad requested a review from a team as a code owner October 16, 2024 10:47
@AThousandShips AThousandShips added bug platform:android topic:export cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Oct 16, 2024
@AThousandShips AThousandShips added this to the 4.4 milestone Oct 16, 2024
Copy link
Contributor

@m4gr3d m4gr3d 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, thanks for the fix!

@clayjohn clayjohn merged commit 14fc9a5 into godotengine:master Oct 18, 2024
20 checks passed
@clayjohn
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release platform:android topic:export
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Requesting app permissions doesn't work on some Android versions
4 participants