Browse Source

Fixed issue #115 (compatibility with Android 2.3 devices)

fysx 10 years ago
parent
commit
4439a193d6
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/org/love2d/android/GameActivity.java

+ 7 - 0
src/org/love2d/android/GameActivity.java

@@ -112,6 +112,13 @@ public class GameActivity extends SDLActivity {
     }
 
     public void setImmersiveMode (boolean immersive_mode) {
+			if (android.os.Build.VERSION.SDK_INT < 11) {
+				// The API getWindow().getDecorView().setSystemUiVisibility() was
+				// added in Android 11 (a.k.a. Honeycomb, a.k.a. 3.0.x). If we run
+				// on this we do nothing.
+				return;
+			}
+
       immersiveActive = immersive_mode;
 
       final Object lock = new Object();