[Android] Do not hide overlay on pause

Geoffrey Métais git at videolan.org
Tue Nov 4 14:47:49 CET 2014


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Oct 27 15:48:05 2014 +0100| [15fb6298beb115ad6ffd977dae027cafd1e4006e] | committer: Geoffrey Métais

Do not hide overlay on pause

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

 .../org/videolan/vlc/gui/video/VideoPlayerActivity.java    |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 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 0ffa3e9..eeeccb2 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -759,7 +759,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
 
     @Override
     public boolean onKeyDown(int keyCode, KeyEvent event) {
-        showOverlay(OVERLAY_TIMEOUT);
+        showOverlay();
         switch (keyCode) {
         case KeyEvent.KEYCODE_F:
         case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD:
@@ -1713,11 +1713,13 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
     };
 
     private final void doPlayPause() {
-        if (mLibVLC.isPlaying())
+        if (mLibVLC.isPlaying()){
             pause();
-        else
+            showOverlay(OVERLAY_INFINITE);
+        } else {
             play();
-        showOverlay();
+            showOverlay(OVERLAY_TIMEOUT);
+        }
     }
 
     /**
@@ -1870,7 +1872,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
      * show overlay the the default timeout
      */
     private void showOverlay() {
-        showOverlay(OVERLAY_TIMEOUT);
+        showOverlay(mLibVLC.isPlaying() ? OVERLAY_TIMEOUT : OVERLAY_INFINITE);
     }
 
     @TargetApi(Build.VERSION_CODES.HONEYCOMB)



More information about the Android mailing list