[Android] Fix seekbar unlock issues when video was paused
Alexandre Perraud
git at videolan.org
Fri Oct 28 18:02:34 CEST 2016
vlc-android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Fri Oct 28 17:08:58 2016 +0200| [9513302a6004396e669431bf3e7ed060a794809f] | committer: Alexandre Perraud
Fix seekbar unlock issues when video was paused
> https://code.videolan.org/videolan/vlc-android/commit/9513302a6004396e669431bf3e7ed060a794809f
---
.../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 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 7eca421..01274bf 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -526,7 +526,6 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
@Override
protected void onResume() {
super.onResume();
-
/*
* Set listeners here to avoid NPE when activity is closing
*/
@@ -1694,6 +1693,10 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
updateNavStatus();
if (!mService.getCurrentMediaWrapper().hasFlag(MediaWrapper.MEDIA_PAUSED))
mHandler.sendEmptyMessageDelayed(FADE_OUT, OVERLAY_TIMEOUT);
+ else {
+ mService.getCurrentMediaWrapper().removeFlags(MediaWrapper.MEDIA_PAUSED);
+ mWasPaused = false;
+ }
setESTracks();
}
@@ -3014,8 +3017,14 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
title = itemTitle;
mTitle.setText(title);
- if (mWasPaused)
+ if (mWasPaused) {
+ // XXX: Workaround to update the seekbar position
+ mForcedTime = savedTime;
+ setOverlayProgress();
+ mForcedTime = -1;
+
showOverlay(true);
+ }
}
private SubtitlesGetTask mSubtitlesGetTask = null;
More information about the Android
mailing list