Skip to content

Fix insets on android 15 #18844

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

Merged
merged 3 commits into from
Jun 5, 2025
Merged

Fix insets on android 15 #18844

merged 3 commits into from
Jun 5, 2025

Conversation

emmauss
Copy link
Contributor

@emmauss emmauss commented May 12, 2025

What does the pull request do?

Disables updating any system bar properties when setting display edge to edge on Android 15. It is also not possible to change system bar color on android 15. This change only affects projects targeting net9 and above.

More information about the new behavior here #18835 .

What is the current behavior?

What is the updated/expected behavior with this PR?

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

IInsetsManager has a new property DisplayEdgeToEdgePreference and DisplaysEdgeToEdge.

Obsoletions / Deprecations

IInsetsManager.DisplayEdgeToEdge is deprecated for IInsetsManager.DisplayEdgeToEdgePreference

Fixed issues

Fixes #18835

@MrJul MrJul added the backport-candidate-11.3.x Consider this PR for backporting to 11.3 branch label May 12, 2025
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 12.0.999-cibuild0056468-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

Copy link
Member

@kekekeks kekekeks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignoring values in property setters is technically a huge hack since it breaks expectations about properties.

Consider changing IInsetsManager to reflect this.

  • Add DisplayEdgeToEdgePreference property for setting application's preference
  • Add read-only DisplaysEdgeToEdge property that reflects the actual value
  • Mark the old DisplayEdgeToEdge property as obsolete, setter would control DisplayEdgeToEdgePreference, getter would read DisplaysEdgeToEdge
  • (optional) Add SupportedEdgeToEdgeModes property

@maxkatz6 maxkatz6 added the bug label May 16, 2025
@emmauss
Copy link
Contributor Author

emmauss commented May 16, 2025

@kekekeks SupportedEdgeToEdgeModes may not make much sense since at best, it's a on/off state, and at worst, apps are forced into one state permanently. Not a lot of choices to make here.

@emmauss emmauss force-pushed the android_15_insets branch from 547f723 to b92af59 Compare May 19, 2025 10:27
@emmauss
Copy link
Contributor Author

emmauss commented May 19, 2025

Added DisplayEdgeToEdgePreference property and deprecated DisplayEdgeToEdge

@emmauss emmauss force-pushed the android_15_insets branch from b92af59 to 4076bcc Compare May 19, 2025 10:29
@emmauss emmauss removed the backport-candidate-11.3.x Consider this PR for backporting to 11.3 branch label May 19, 2025
@emmauss emmauss force-pushed the android_15_insets branch from 4076bcc to 5b375cb Compare May 19, 2025 11:24
@emmauss emmauss force-pushed the android_15_insets branch from 5b375cb to f1ca995 Compare May 19, 2025 11:24
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 12.0.999-cibuild0056594-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6
Copy link
Member

maxkatz6 commented Jun 2, 2025

@emmauss can we keep backport candidate label for 11.x? So we could remove old API in 12.0

@emmauss
Copy link
Contributor Author

emmauss commented Jun 2, 2025

@emmauss can we keep backport candidate label for 11.x? So we could remove old API in 12.0

That would be ok.

@emmauss emmauss added the backport-candidate-11.3.x Consider this PR for backporting to 11.3 branch label Jun 2, 2025
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 12.0.999-cibuild0056819-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@MrJul MrJul enabled auto-merge June 3, 2025 14:31
@MrJul MrJul disabled auto-merge June 5, 2025 15:25
@MrJul MrJul merged commit 2dc808f into master Jun 5, 2025
12 checks passed
@MrJul MrJul deleted the android_15_insets branch June 5, 2025 15:26
MrJul pushed a commit that referenced this pull request Jun 5, 2025
* fix insets on android 15

* add api diff

* fix nit
@MrJul MrJul added backported-11.3.x and removed backport-candidate-11.3.x Consider this PR for backporting to 11.3 branch labels Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display Edge to Edge feature is disabled for API level 35
5 participants