aboutsummaryrefslogtreecommitdiff
path: root/build/android/src/main/java/net.minetest.minetest/MtNativeActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'build/android/src/main/java/net.minetest.minetest/MtNativeActivity.java')
-rw-r--r--build/android/src/main/java/net.minetest.minetest/MtNativeActivity.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/build/android/src/main/java/net.minetest.minetest/MtNativeActivity.java b/build/android/src/main/java/net.minetest.minetest/MtNativeActivity.java
index b32e97b53..f49d078fe 100644
--- a/build/android/src/main/java/net.minetest.minetest/MtNativeActivity.java
+++ b/build/android/src/main/java/net.minetest.minetest/MtNativeActivity.java
@@ -37,20 +37,17 @@ public class MtNativeActivity extends NativeActivity {
makeFullScreen();
}
- public void makeFullScreen() {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+ private void makeFullScreen() {
+ if (Build.VERSION.SDK_INT >= 19)
this.getWindow().getDecorView().setSystemUiVisibility(
- View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
- );
- }
+ View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
}
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
- if (hasFocus) {
+ if (hasFocus)
makeFullScreen();
- }
}
public void copyAssets() {