From 01cbfb6dd1a78ed0015f22bfd4c269cfb4abb9ab Mon Sep 17 00:00:00 2001 From: staphen Date: Wed, 3 Jul 2024 17:54:45 -0400 Subject: [PATCH] [Android] Force app to overlap with the display cutout --- .../org/diasurgical/devilutionx/DevilutionXSDLActivity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android-project/app/src/main/java/org/diasurgical/devilutionx/DevilutionXSDLActivity.java b/android-project/app/src/main/java/org/diasurgical/devilutionx/DevilutionXSDLActivity.java index b42da6c6a88..2a0ade3cb19 100644 --- a/android-project/app/src/main/java/org/diasurgical/devilutionx/DevilutionXSDLActivity.java +++ b/android-project/app/src/main/java/org/diasurgical/devilutionx/DevilutionXSDLActivity.java @@ -7,6 +7,7 @@ import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.ViewTreeObserver; +import android.view.WindowManager; import org.libsdl.app.SDLActivity; @@ -23,6 +24,10 @@ protected void onCreate(Bundle savedInstanceState) { if (Build.VERSION.SDK_INT >= 25) trackVisibleSpace(); + // Force app to overlap with the display cutout + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) + getWindow().getAttributes().layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; + fileManager = new ExternalFilesManager(this); migrateSaveGames();