2
0
Эх сурвалжийг харах

Fix safe area regression on older Android versions

Anish Mishra 2 долоо хоног өмнө
parent
commit
3bc1fa0c37

+ 6 - 1
platform/android/java/lib/src/org/godotengine/godot/GodotIO.java

@@ -225,7 +225,12 @@ public class GodotIO {
 		}
 
 		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) {
 				WindowInsetsCompat insetsCompat = WindowInsetsCompat.toWindowInsetsCompat(topView.getRootWindowInsets(), topView);