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 edge-to-edge enforcement check in ShadowCompatibility #9035

Closed
wants to merge 0 commits into from

Conversation

copybara-service[bot]
Copy link

Fix edge-to-edge enforcement check in ShadowCompatibility

Apps that target Android V and above will be required to support edge-to-edge
content, where apps will be responsible for drawing content under the status
and navigation bars:
https://developer.android.com/about/versions/15/behavior-changes-15#edge-to-edge

In framework code, this is primarily detected using
CompatChanges.isChangeEnabled(ENFORCE_EDGE_TO_EDGE). However, this previously
always returned true because CompatChanges.isChangeEnabled returns true by
default in Robolectric.

In real Android, CompatChanges.isChangeEnabled(ENFORCE_EDGE_TO_EDGE) only
returns true when the target SDK is V or above.

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.

None yet

0 participants