From 017c8a641106e70154a1e6192e741fa25bfd297d Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Sun, 5 Jan 2014 20:26:35 +0100 Subject: [PATCH] Fixed play/pause state to be correct after playlist is over. --- .../github/nutomic/controldlna/gui/RouteFragment.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/com/github/nutomic/controldlna/gui/RouteFragment.java b/src/com/github/nutomic/controldlna/gui/RouteFragment.java index f5ba084..57df561 100644 --- a/src/com/github/nutomic/controldlna/gui/RouteFragment.java +++ b/src/com/github/nutomic/controldlna/gui/RouteFragment.java @@ -559,10 +559,12 @@ public class RouteFragment extends MediaRouteDiscoveryFragment implements mProgressBar.setProgress(currentTime); mProgressBar.setMax(totalTime); - - if (status.getPlaybackState() != MediaItemStatus.PLAYBACK_STATE_PLAYING && - status.getPlaybackState() != MediaItemStatus.PLAYBACK_STATE_BUFFERING && - status.getPlaybackState() != MediaItemStatus.PLAYBACK_STATE_PENDING) + + if (status.getPlaybackState() == MediaItemStatus.PLAYBACK_STATE_PLAYING || + status.getPlaybackState() == MediaItemStatus.PLAYBACK_STATE_BUFFERING || + status.getPlaybackState() == MediaItemStatus.PLAYBACK_STATE_PENDING) + changePlayPauseState(true); + else changePlayPauseState(false); if (mListView.getAdapter() == mPlaylistAdapter)