[Android] PlaybackService: Fix restoration of audio pause state
Jean-Baptiste Kempf
git at videolan.org
Mon Oct 3 17:28:38 CEST 2016
vlc-android | branch: 2.0.x | Jean-Baptiste Kempf <jb at videolan.org> | Mon Sep 26 11:58:43 2016 +0200| [483561e98556d0adc88e3061f95c723dddaeb807] | committer: Jean-Baptiste Kempf
PlaybackService: Fix restoration of audio pause state
If one had both AUDIOFOCUS_LOSS_TRANSIENT and AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK events,
then we did not resume audio playback.
(cherry picked from commit b5e5b713f6ab19755998aea3db8655b15cd9e02e)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> https://code.videolan.org/videolan/vlc-android/commit/483561e98556d0adc88e3061f95c723dddaeb807
---
vlc-android/src/org/videolan/vlc/PlaybackService.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 9f60619..b0f6e19 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -390,7 +390,8 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
if (mLossTransientVolume != -1) {
mMediaPlayer.setVolume(mLossTransientVolume);
mLossTransientVolume = -1;
- } else if (mLossTransient) {
+ }
+ if (mLossTransient) {
if (wasPlaying)
mMediaPlayer.play();
mLossTransient = false;
More information about the Android
mailing list