[Android] Video player: Enforce black background

Geoffrey Métais git at videolan.org
Tue Dec 3 10:24:35 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey at videolan.org> | Tue Dec  3 10:24:34 2019 +0100| [ee227373ecbbf51ea1956350017e88e3d861acd7] | committer: Nicolas Pomepuy

Video player: Enforce black background

Some shitty ROM change android.R.color.black to brown.

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

 libvlc/src/org/videolan/libvlc/util/VLCVideoLayout.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libvlc/src/org/videolan/libvlc/util/VLCVideoLayout.java b/libvlc/src/org/videolan/libvlc/util/VLCVideoLayout.java
index 575f4e164..5fad6429f 100644
--- a/libvlc/src/org/videolan/libvlc/util/VLCVideoLayout.java
+++ b/libvlc/src/org/videolan/libvlc/util/VLCVideoLayout.java
@@ -8,13 +8,13 @@ import android.view.TextureView;
 import android.view.ViewGroup;
 import android.widget.FrameLayout;
 
-import org.videolan.R;
-import org.videolan.libvlc.MediaPlayer;
-
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 import androidx.annotation.RequiresApi;
 
+import org.videolan.R;
+import org.videolan.libvlc.MediaPlayer;
+
 /**
  * VLC-ready layout which includes 2 {@link SurfaceView} (video+subtitles) and 1 {@link TextureView}
  * All these surfaces are stubs, only the relevant one(s) will be inflated
@@ -50,7 +50,7 @@ public class VLCVideoLayout extends FrameLayout {
     @Override
     protected void onAttachedToWindow() {
         super.onAttachedToWindow();
-        setBackgroundColor(getResources().getColor(android.R.color.black));
+        setBackgroundResource(R.color.black);
         final ViewGroup.LayoutParams lp = getLayoutParams();
         lp.height = ViewGroup.LayoutParams.MATCH_PARENT;
         lp.width = ViewGroup.LayoutParams.MATCH_PARENT;



More information about the Android mailing list