1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-23 15:16:17 +00:00

Merge pull request #109818 from syntaxerror247/safe-area-regression

Fix safe area regression on older Android versions
This commit is contained in:
Thaddeus Crews
2025-08-27 13:39:44 -05:00

View File

@@ -225,7 +225,12 @@ public class GodotIO {
} }
if (topView != null) { if (topView != null) {
int insetTypes = WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout(); int insetTypes;
if (godot.isInImmersiveMode()) {
insetTypes = WindowInsetsCompat.Type.displayCutout();
} else {
insetTypes = WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout();
}
if (topView.getRootWindowInsets() != null) { if (topView.getRootWindowInsets() != null) {
WindowInsetsCompat insetsCompat = WindowInsetsCompat.toWindowInsetsCompat(topView.getRootWindowInsets(), topView); WindowInsetsCompat insetsCompat = WindowInsetsCompat.toWindowInsetsCompat(topView.getRootWindowInsets(), topView);