[Android] Keep video player fullscreen on chromebooks

Geoffrey Métais git at videolan.org
Wed Aug 30 18:26:59 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Aug 30 18:04:59 2017 +0200| [cf45cca713a7dc240081d2761d1129e3b695d91e] | committer: Geoffrey Métais

Keep video player fullscreen on chromebooks

Leaving fullscreen when showing overlay makes display glitches on
Chromebooks

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

 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java        | 7 +++++--
 1 file changed, 5 insertions(+), 2 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 76663945e..c3c606457 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -2857,7 +2857,8 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
                 UiTools.setViewVisibility(mPlaylistNext, View.VISIBLE);
                 UiTools.setViewVisibility(mPlaylistPrevious, View.VISIBLE);
             }
-            dimStatusBar(false);
+            if (!AndroidDevices.isChromeBook)
+                dimStatusBar(false);
             mOverlayProgress.setVisibility(View.VISIBLE);
             if (mPresentation != null)
                 mOverlayBackground.setVisibility(View.VISIBLE);
@@ -2949,7 +2950,8 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
                 UiTools.setViewVisibility(mPlaylistNext, View.INVISIBLE);
                 UiTools.setViewVisibility(mPlaylistPrevious, View.INVISIBLE);
             mShowing = false;
-            dimStatusBar(true);
+            if (!AndroidDevices.isChromeBook)
+                dimStatusBar(true);
         } else if (!fromUser) {
             /*
              * Try to hide the Nav Bar again.
@@ -2964,6 +2966,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
      * Dim the status bar and/or navigation icons when needed on Android 3.x.
      * Hide it on Android 4.0 and later
      */
+    @SuppressWarnings("deprecation")
     @TargetApi(Build.VERSION_CODES.KITKAT)
     private void dimStatusBar(boolean dim) {
         if (dim || mIsLocked)



More information about the Android mailing list