summaryrefslogtreecommitdiff
path: root/src/de/danoeh/antennapod/service
diff options
context:
space:
mode:
authorDean Brettle <dean@brettle.com>2013-08-03 18:53:57 -0700
committerDean Brettle <dean@brettle.com>2013-08-03 18:53:57 -0700
commit805512c4109fd5aa0f147d5d415e4b3f39cb1186 (patch)
tree1a7f20d72c05276729763fccd2efa994e323a5fe /src/de/danoeh/antennapod/service
parent62961d6594687eb34e36adaeba55a90c99e2dd4e (diff)
downloadAntennaPod-805512c4109fd5aa0f147d5d415e4b3f39cb1186.zip
Fixes issue #249 (Cannot use Kinivo BTC450 bluetooth car kit to play
after pause). The problem was that audioManager.abandonAudioFocus() was being called before remoteControlClient.setPlaybackState(). That seems to have prevented the BTC450 from knowing that the audio was paused. As a result, the BTC450 continued to send "pause" instead of "play" for subsequent button presses. The fix just moves the call to abandonAudioFocus() until after setPlaybackState() has been called.
Diffstat (limited to 'src/de/danoeh/antennapod/service')
-rw-r--r--src/de/danoeh/antennapod/service/PlaybackService.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/de/danoeh/antennapod/service/PlaybackService.java b/src/de/danoeh/antennapod/service/PlaybackService.java
index 409ac6b48..e6cf6ee82 100644
--- a/src/de/danoeh/antennapod/service/PlaybackService.java
+++ b/src/de/danoeh/antennapod/service/PlaybackService.java
@@ -825,14 +825,14 @@ public class PlaybackService extends Service {
if (AppConfig.DEBUG)
Log.d(TAG, "Pausing playback.");
player.pause();
+ cancelPositionSaver();
+ saveCurrentPosition();
+ setStatus(PlayerStatus.PAUSED);
if (abandonFocus) {
audioManager.abandonAudioFocus(audioFocusChangeListener);
pausedBecauseOfTransientAudiofocusLoss = false;
disableSleepTimer();
}
- cancelPositionSaver();
- saveCurrentPosition();
- setStatus(PlayerStatus.PAUSED);
stopWidgetUpdater();
stopForeground(true);
if (shouldStream && reinit) {