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.
- DownloadService should now terminate properly as soon as all downloads have been completed.
- Notification bug ("0 downloads left" notification) should be fixed
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
#
# It looks like you may be committing a merge.
# If this is not correct, please remove the file
# .git/MERGE_HEAD
# and try again.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch andrewgaul-buffered-output-stream-flush
# All conflicts fixed but you are still merging.
# (use "git commit" to conclude merge)
#
# Changes to be committed:
#
# modified: src/de/danoeh/antennapod/service/download/HttpDownloader.java
# modified: tests/src/de/danoeh/antennapod/test/FeedHandlerTest.java
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# (commit or discard the untracked or modified content in submodules)
#
# modified: submodules/ActionBarSherlock (modified content, untracked content)
# modified: submodules/ViewPagerIndicator (modified content, untracked content)
# modified: submodules/dslv (modified content, untracked content)
#
This ensures that IOException due to writes are thrown in the main
code path instead of the exceptional code path. Specifically for
HttpDownloader this ensures that IOUtils.closeQuietly does not swallow
a failed write.