aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJose Luis Marti <joseluis.marti@gmail.com>2022-11-21 23:39:04 +0100
committerJose Luis Marti <joseluis.marti@gmail.com>2022-11-21 23:39:04 +0100
commitec628d03a14d12a9d3cd7bcd9d75895a70adb444 (patch)
tree41058a6aac50897e0322fccb2665df6bbe7a455c /tools
parent41de6b9949b132f02ca13dedc9396e0b250aca9a (diff)
[Android] Use SYSTEM_UI_FLAG_IMMERSIVE_STICKY flag instead of its value
Diffstat (limited to 'tools')
-rw-r--r--tools/android/packaging/xbmc/src/Main.java.in48
1 files changed, 17 insertions, 31 deletions
diff --git a/tools/android/packaging/xbmc/src/Main.java.in b/tools/android/packaging/xbmc/src/Main.java.in
index ec9f5cf700..831ce38e34 100644
--- a/tools/android/packaging/xbmc/src/Main.java.in
+++ b/tools/android/packaging/xbmc/src/Main.java.in
@@ -171,21 +171,14 @@ public class Main extends NativeActivity implements Choreographer.FrameCallback
{
public void run()
{
- if (android.os.Build.VERSION.SDK_INT >= 19)
- {
- // Immersive mode
-
- // Constants from API > 17
- final int API_SYSTEM_UI_FLAG_IMMERSIVE_STICKY = 0x00001000;
-
- mDecorView.setSystemUiVisibility(
- View.SYSTEM_UI_FLAG_LAYOUT_STABLE
- | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
- | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
- | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
- | View.SYSTEM_UI_FLAG_FULLSCREEN
- | API_SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
- }
+ // Immersive mode
+ mDecorView.setSystemUiVisibility(
+ View.SYSTEM_UI_FLAG_LAYOUT_STABLE
+ | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
+ | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
+ | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
+ | View.SYSTEM_UI_FLAG_FULLSCREEN
+ | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
}
});
}
@@ -225,22 +218,15 @@ public class Main extends NativeActivity implements Choreographer.FrameCallback
{
super.onResume();
- if (android.os.Build.VERSION.SDK_INT >= 19)
- {
- // Immersive mode
-
- // Constants from API > 17
- final int API_SYSTEM_UI_FLAG_IMMERSIVE_STICKY = 0x00001000;
-
- mDecorView.setSystemUiVisibility(
- View.SYSTEM_UI_FLAG_LAYOUT_STABLE
- | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
- | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
- | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
- | View.SYSTEM_UI_FLAG_FULLSCREEN
- | API_SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
- }
-
+ // Immersive mode
+ mDecorView.setSystemUiVisibility(
+ View.SYSTEM_UI_FLAG_LAYOUT_STABLE
+ | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
+ | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
+ | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
+ | View.SYSTEM_UI_FLAG_FULLSCREEN
+ | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
+
// New intent ?
for (final DelayedIntent delayedIntent : mDelayedIntents)
{