diff options
author | Dean Brettle <dean@brettle.com> | 2013-08-03 18:53:57 -0700 |
---|---|---|
committer | Dean Brettle <dean@brettle.com> | 2013-08-03 18:53:57 -0700 |
commit | 805512c4109fd5aa0f147d5d415e4b3f39cb1186 (patch) | |
tree | 1a7f20d72c05276729763fccd2efa994e323a5fe /src | |
parent | 62961d6594687eb34e36adaeba55a90c99e2dd4e (diff) | |
download | AntennaPod-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')
-rw-r--r-- | src/de/danoeh/antennapod/service/PlaybackService.java | 6 |
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) { |