[Android] Do not seek twice
Geoffrey Métais
git at videolan.org
Wed Apr 1 17:20:53 CEST 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Apr 1 15:30:29 2015 +0200| [580da764ee9c346a126e3f81c3e2196b20ba0f3b] | committer: Geoffrey Métais
Do not seek twice
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=580da764ee9c346a126e3f81c3e2196b20ba0f3b
---
.../org/videolan/vlc/gui/video/VideoPlayerActivity.java | 14 ++++++++------
1 file changed, 8 insertions(+), 6 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 e6386ea..a0ddf2c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -2643,14 +2643,16 @@ public class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay
} else {
// not in media library
long rTime = mSettings.getLong(PreferencesActivity.VIDEO_RESUME_TIME, -1);
- Editor editor = mSettings.edit();
- editor.putLong(PreferencesActivity.VIDEO_RESUME_TIME, -1);
- Util.commitPreferences(editor);
- if(rTime > 0)
- seek(rTime);
+ if (rTime > 0) {
+ Editor editor = mSettings.edit();
+ editor.putLong(PreferencesActivity.VIDEO_RESUME_TIME, -1);
+ Util.commitPreferences(editor);
+ }
- if(intentPosition > 0)
+ if (intentPosition > 0)
seek(intentPosition);
+ else if (rTime > 0)
+ seek(rTime);
}
// Get possible subtitles
More information about the Android
mailing list