[Android] Fix video resume when background playback enabled
Geoffrey Métais
git at videolan.org
Fri Mar 18 19:37:12 CET 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Mar 18 19:33:22 2016 +0100| [c4004904a3b786a2c21e892094ce90e66afa877a] | committer: Geoffrey Métais
Fix video resume when background playback enabled
> https://code.videolan.org/videolan/vlc-android/commit/c4004904a3b786a2c21e892094ce90e66afa877a
---
.../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 7 ++++---
1 file changed, 4 insertions(+), 3 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 4a8a5db..3d7d2db 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -634,11 +634,10 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
if (mAlertDialog != null && mAlertDialog.isShowing())
mAlertDialog.dismiss();
- if (!isFinishing() && mSettings.getBoolean(PreferencesActivity.VIDEO_BACKGROUND, false)) {
+ if (!isFinishing() && mService != null && mService.isPlaying() &&
+ mSettings.getBoolean(PreferencesActivity.VIDEO_BACKGROUND, false)) {
switchToAudioMode(false);
}
-
- mWasPaused = !mService.isPlaying();
stopPlayback();
@@ -813,6 +812,8 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
if (!mPlaybackStarted)
return;
+ mWasPaused = !mService.isPlaying();
+
if (mMute)
mute(false);
More information about the Android
mailing list