[Android] Fix mediasession state on playback stop
Geoffrey Métais
git at videolan.org
Tue Nov 21 11:25:40 CET 2017
vlc-android | branch: 2.5.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Nov 20 18:20:15 2017 +0100| [4440159a5a0b2b1d6fd2f928d45ead1bdb3687d4] | committer: Geoffrey Métais
Fix mediasession state on playback stop
(cherry picked from commit 19d97a9a5639f79754fe412cef65721d08efcbce)
> https://code.videolan.org/videolan/vlc-android/commit/4440159a5a0b2b1d6fd2f928d45ead1bdb3687d4
---
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 7a73c7328..217046d88 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -754,9 +754,10 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
return;
mMedialibrary.resumeBackgroundOperations();
mStopped = true;
+ // We must publish state before resetting mCurrentIndex
+ publishState();
mCurrentIndex = -1;
executeUpdate();
- publishState();
executeUpdateProgress();
}
More information about the Android
mailing list