[Android] Remove tips overlay on Android TV for now

Geoffrey Métais git at videolan.org
Fri Oct 10 18:00:04 CEST 2014


vlc-ports/android | branch: tv | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Oct 10 17:25:27 2014 +0200| [4c61cd281eac071a71c27941b172cb641c9d9c84] | committer: Geoffrey Métais

Remove tips overlay on Android TV for now

we wait to have a specific one

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=4c61cd281eac071a71c27941b172cb641c9d9c84
---

 vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java  |    2 +-
 .../videolan/vlc/gui/video/VideoPlayerActivity.java  |   18 ++++++++++++------
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java b/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java
index b75268c..64fe99e 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java
@@ -13,7 +13,7 @@ public class TvUtil {
 
 	public static void openMedia(Activity activity, Media media, Row row){
 		if (media.getType() == Media.TYPE_VIDEO){
-			VideoPlayerActivity.start(activity, media.getLocation(), false);
+			VideoPlayerActivity.start(activity, media.getLocation(), false, true);
 		} else if (media.getType() == Media.TYPE_AUDIO){
 			Intent intent = new Intent(activity,
 					DetailsActivity.class);
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 c8df820..66217e5 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -180,6 +180,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
     private boolean mEnableBrightnessGesture;
     private boolean mEnableCloneMode;
     private boolean mDisplayRemainingTime = false;
+    private boolean mTvDevice = false;
     private int mScreenOrientation;
     private ImageButton mAudioTrack;
     private ImageButton mSubtitle;
@@ -447,7 +448,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
                     : getScreenOrientation());
             // Tips
             mOverlayTips = findViewById(R.id.player_overlay_tips);
-            if(mSettings.getBoolean(PREF_TIPS_SHOWN, false))
+            if(mSettings.getBoolean(PREF_TIPS_SHOWN, false) || getIntent().getBooleanExtra("tvDevice", false))
                 mOverlayTips.setVisibility(View.GONE);
             else {
                 mOverlayTips.bringToFront();
@@ -639,22 +640,26 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
     }
 
     public static void start(Context context, String location) {
-        start(context, location, null, -1, false, false);
+        start(context, location, null, -1, false, false, false);
+    }
+
+    public static void start(Context context, String location, Boolean fromStart, boolean tvDevice) {
+        start(context, location, null, -1, false, fromStart, tvDevice);
     }
 
     public static void start(Context context, String location, Boolean fromStart) {
-        start(context, location, null, -1, false, fromStart);
+        start(context, location, null, -1, false, fromStart, false);
     }
 
     public static void start(Context context, String location, String title, Boolean dontParse) {
-        start(context, location, title, -1, dontParse, false);
+        start(context, location, title, -1, dontParse, false, false);
     }
 
     public static void start(Context context, String location, String title, int position, Boolean dontParse) {
-        start(context, location, title, position, dontParse, false);
+        start(context, location, title, position, dontParse, false, false);
     }
 
-    public static void start(Context context, String location, String title, int position, Boolean dontParse, Boolean fromStart) {
+    public static void start(Context context, String location, String title, int position, Boolean dontParse, Boolean fromStart, boolean tvDevice) {
         Intent intent = new Intent(context, VideoPlayerActivity.class);
         intent.setAction(VideoPlayerActivity.PLAY_FROM_VIDEOGRID);
         intent.putExtra("itemLocation", location);
@@ -662,6 +667,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
         intent.putExtra("dontParse", dontParse);
         intent.putExtra("fromStart", fromStart);
         intent.putExtra("itemPosition", position);
+        intent.putExtra("tvDevice", tvDevice);
 
         if (dontParse)
             intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_MULTIPLE_TASK);



More information about the Android mailing list