[Android] Fix statusbar dimming on HoneyComb

Geoffrey Métais git at videolan.org
Mon Feb 29 18:43:29 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Feb 29 18:42:48 2016 +0100| [e506eeb5d86e081c551cf16358c96c41bcfb5896] | committer: Geoffrey Métais

Fix statusbar dimming on HoneyComb

> https://code.videolan.org/videolan/vlc-android/commit/e506eeb5d86e081c551cf16358c96c41bcfb5896
---

 .../org/videolan/vlc/gui/video/VideoPlayerActivity.java  | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 78ee33b..f8225e2 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -2552,19 +2552,27 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
             visibility = View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
             navbar = View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
         }
-        visibility |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
+        if (AndroidUtil.isJellyBeanOrLater())
+            visibility |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
         if (dim || mIsLocked) {
-            navbar |= View.SYSTEM_UI_FLAG_LOW_PROFILE;
+            if (AndroidUtil.isICSOrLater())
+                navbar |= View.SYSTEM_UI_FLAG_LOW_PROFILE;
+            else
+                visibility |= View.STATUS_BAR_HIDDEN;
             if (!AndroidDevices.hasCombBar()) {
                 navbar |= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
                 if (AndroidUtil.isKitKatOrLater())
                     visibility |= View.SYSTEM_UI_FLAG_IMMERSIVE;
-                visibility |= View.SYSTEM_UI_FLAG_FULLSCREEN;
+                if (AndroidUtil.isJellyBeanOrLater())
+                    visibility |= View.SYSTEM_UI_FLAG_FULLSCREEN;
             }
         }
         if (!dim) {
             getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
-            visibility |= View.SYSTEM_UI_FLAG_VISIBLE;
+            if (AndroidUtil.isICSOrLater())
+                visibility |= View.SYSTEM_UI_FLAG_VISIBLE;
+            else
+                visibility |= View.STATUS_BAR_VISIBLE;
         }
 
         if (AndroidDevices.hasNavBar())



More information about the Android mailing list