AndroidBackend: API 30 compatibility#582
Merged
Merged
Conversation
Member
Member
|
The code changes look logical too. Basically same logic, but different source for density and basically polyfilling the one function for older versions. Only question I have: Is there a benefit to using the function on the newer API version instead of the division / do we know what the function does internally? if the function just does a division too, it might be nicer to use it for both. Otherwise, if the function is cheaper it undoubtedly makes sense to do it like that |
Member
Author
|
Yes, starting with API 34 the relationship between SP and PX is no longer guaranteed to be linear, so a simple division is not necessarily correct. |
stackotter
approved these changes
May 24, 2026
Collaborator
stackotter
left a comment
There was a problem hiding this comment.
Thanks for resolving these compatibility issues 🙏
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.

This PR updates the helpers so that
AndroidBackendHelpersdoesn't use any functionality introduced in API 34, partially resolving #579. It still requires API 30 and crashes instantly on API 28 or 29. I also didn't touch the AlertFragment since I already did that in #581.