From 805512c4109fd5aa0f147d5d415e4b3f39cb1186 Mon Sep 17 00:00:00 2001 From: Dean Brettle Date: Sat, 3 Aug 2013 18:53:57 -0700 Subject: [PATCH] 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. --- src/de/danoeh/antennapod/service/PlaybackService.java | 6 +++--- 1 file 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) {