Commit e4a29f87 authored by Sébastien Toque's avatar Sébastien Toque
Browse files

VideoPlayerActivity: do not start playback from both onCreate and onResume.

onResume is enough.
also no need to use special code when resuming from pause, load() do all the necessary checks.
parent 17cc6c07
...@@ -299,7 +299,6 @@ public class VideoPlayerActivity extends Activity { ...@@ -299,7 +299,6 @@ public class VideoPlayerActivity extends Activity {
this.setVolumeControlStream(AudioManager.STREAM_MUSIC); this.setVolumeControlStream(AudioManager.STREAM_MUSIC);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
load();
} }
@Override @Override
...@@ -381,12 +380,7 @@ public class VideoPlayerActivity extends Activity { ...@@ -381,12 +380,7 @@ public class VideoPlayerActivity extends Activity {
protected void onResume() { protected void onResume() {
AudioServiceController.getInstance().bindAudioService(this); AudioServiceController.getInstance().bindAudioService(this);
if (savedIndexPosition >= 0) { load();
mLibVLC.playIndex(savedIndexPosition);
Media media = DatabaseManager.getInstance(this).getMedia(this, mLocation);
if (media != null && media.getTime() > 0)
mLibVLC.setTime(media.getTime());
}
showOverlay(); showOverlay();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment