diff --git a/java/MainActivity.java b/java/MainActivity.java index 66a82ff2..6fa2c096 100644 --- a/java/MainActivity.java +++ b/java/MainActivity.java @@ -299,7 +299,9 @@ public void run() { if (fullscreen) { getWindow().setFlags(LayoutParams.FLAG_LAYOUT_NO_LIMITS, LayoutParams.FLAG_LAYOUT_NO_LIMITS); - getWindow().getAttributes().layoutInDisplayCutoutMode = LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES; + if (Build.VERSION.SDK_INT >= 28) { + getWindow().getAttributes().layoutInDisplayCutoutMode = LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES; + } if (Build.VERSION.SDK_INT >= 30) { getWindow().setDecorFitsSystemWindows(false); } else {