[Android] [PATCH 1/3] VideoPlayerActivity: fix OVERLAY_INFINITE value

Thomas Guillem thomas at gllm.fr
Thu Nov 6 10:01:05 CET 2014


---
 vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 6 +++---
 1 file changed, 3 insertions(+), 3 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 eeeccb2..1d072c5 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -155,7 +155,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
     private View mOverlayProgress;
     private View mOverlayBackground;
     private static final int OVERLAY_TIMEOUT = 4000;
-    private static final int OVERLAY_INFINITE = 3600000;
+    private static final int OVERLAY_INFINITE = -1;
     private static final int FADE_OUT = 1;
     private static final int SHOW_PROGRESS = 2;
     private static final int SURFACE_SIZE = 3;
@@ -1905,10 +1905,10 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
             mOverlayProgress.setVisibility(View.VISIBLE);
             if (mPresentation != null) mOverlayBackground.setVisibility(View.VISIBLE);
         }
-        Message msg = mHandler.obtainMessage(FADE_OUT);
         if (timeout != 0) {
             mHandler.removeMessages(FADE_OUT);
-            mHandler.sendMessageDelayed(msg, timeout);
+            if (timeout != OVERLAY_INFINITE)
+                mHandler.sendMessageDelayed(mHandler.obtainMessage(FADE_OUT), timeout);
         }
         updateOverlayPausePlay();
     }
-- 
2.1.1



More information about the Android mailing list