[Android] Playback: Avoid double call on play/pause
Geoffrey Métais
git at videolan.org
Wed Mar 7 15:16:51 CET 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Mar 7 15:14:27 2018 +0100| [6553cc4720a0413c9e465ee6ad6a3d0930a0e18a] | committer: Geoffrey Métais
Playback: Avoid double call on play/pause
> https://code.videolan.org/videolan/vlc-android/commit/6553cc4720a0413c9e465ee6ad6a3d0930a0e18a
---
vlc-android/src/org/videolan/vlc/PlaybackService.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 768cd18a8..112662197 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -450,9 +450,8 @@ public class PlaybackService extends MediaBrowserServiceCompat{
* Remote / headset control events
*/
if (action.equalsIgnoreCase(Constants.ACTION_REMOTE_PLAYPAUSE)) {
- if (!playlistManager.hasCurrentMedia())
- loadLastAudioPlaylist();
- if (isPlaying()) pause();
+ if (!playlistManager.hasCurrentMedia()) loadLastAudioPlaylist();
+ else if (isPlaying()) pause();
else play();
} else if (action.equalsIgnoreCase(Constants.ACTION_REMOTE_PLAY)) {
if (!isPlaying() && playlistManager.hasCurrentMedia())
More information about the Android
mailing list