From d9aaeff16e83faa634fd46651ba550336788585b Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Sat, 5 Jan 2013 08:54:15 -0800 Subject: Fix requestAudioFocus not always running when starting playback --- .../src/github/daneren2005/dsub/service/DownloadServiceImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'subsonic-android/src/github/daneren2005') diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java index 1878f422..68ae7a2f 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java @@ -727,9 +727,12 @@ public class DownloadServiceImpl extends Service implements DownloadService { Util.broadcastPlaybackStatusChange(this, playerState); this.playerState = playerState; + + if(playerState == STARTED) { + Util.requestAudioFocus(this); + } if (show) { - Util.requestAudioFocus(this); Util.showPlayingNotification(this, this, handler, currentPlaying.getSong()); } else if (hide) { Util.hidePlayingNotification(this, this, handler); -- cgit v1.2.3