[Android] [PATCH] Do not hide overlay on pause

Thomas Guillem thomas at gllm.fr
Wed Oct 29 15:39:02 CET 2014


LGTM.

On Wed, Oct 29, 2014, at 15:13, Geoffrey Métais wrote:
> ---
>  .../src/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 9140da7..48e6a6a 100644
> --- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
> +++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
> @@ -763,7 +763,7 @@ public class VideoPlayerActivity extends
> ActionBarActivity implements IVideoPlay
>  
>      @Override
>      public boolean onKeyDown(int keyCode, KeyEvent event) {
> -        showOverlay(OVERLAY_TIMEOUT);
> +        showOverlay();
>          switch (keyCode) {
>          case KeyEvent.KEYCODE_F:
>          case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD:
> @@ -1655,11 +1655,13 @@ public class VideoPlayerActivity extends
> ActionBarActivity implements IVideoPlay
>      };
>  
>      private final void doPlayPause() {
> -        if (mLibVLC.isPlaying())
> +        if (mLibVLC.isPlaying()){
>              pause();
> -        else
> +            showOverlay(OVERLAY_INFINITE);
> +        } else {
>              play();
> -        showOverlay();
> +            showOverlay(OVERLAY_TIMEOUT);
> +        }
>      }
>  
>      /**
> @@ -1812,7 +1814,7 @@ public class VideoPlayerActivity extends
> ActionBarActivity implements IVideoPlay
>       * show overlay the the default timeout
>       */
>      private void showOverlay() {
> -        showOverlay(OVERLAY_TIMEOUT);
> +        showOverlay(mLibVLC.isPlaying() ? OVERLAY_TIMEOUT :
> OVERLAY_INFINITE);
>      }
>  
>      @TargetApi(Build.VERSION_CODES.HONEYCOMB)
> -- 
> 1.9.1
> 
> _______________________________________________
> Android mailing list
> Android at videolan.org
> https://mailman.videolan.org/listinfo/android


More information about the Android mailing list