diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2012-08-05 15:43:03 +0200 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2012-08-05 15:43:03 +0200 |
commit | 0e7b1a9f3995981fff456f6f24c09ddcd65c2e44 (patch) | |
tree | 9962f2893fe020a1758d30247c6516d4f746d9a6 /src | |
parent | add5ce69d36a64c1f7dabc8262f5d5bd2a5a6715 (diff) | |
download | AntennaPod-0e7b1a9f3995981fff456f6f24c09ddcd65c2e44.zip |
Bugfix: Videoplayer crashed when screen was turned off
Diffstat (limited to 'src')
-rw-r--r-- | src/de/danoeh/antennapod/activity/VideoplayerActivity.java | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/de/danoeh/antennapod/activity/VideoplayerActivity.java b/src/de/danoeh/antennapod/activity/VideoplayerActivity.java index 34cb3aec9..7bf87448e 100644 --- a/src/de/danoeh/antennapod/activity/VideoplayerActivity.java +++ b/src/de/danoeh/antennapod/activity/VideoplayerActivity.java @@ -39,12 +39,23 @@ public class VideoplayerActivity extends MediaplayerActivity implements @Override protected void onPause() { super.onPause(); + if (videoControlsToggler != null) { + videoControlsToggler.cancel(true); + } if (PlaybackService.isRunning && playbackService != null && PlaybackService.isPlayingVideo()) { - playbackService.stop(); + playbackService.pause(true); } - if (videoControlsToggler != null) { - videoControlsToggler.cancel(true); + } + + + + @Override + protected void onStop() { + super.onStop(); + if (PlaybackService.isRunning && playbackService != null + && PlaybackService.isPlayingVideo()) { + playbackService.stop(); } } |