From d02746217a47174b98b3d4f83c1b7ee1faeddea6 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Fri, 28 Feb 2014 09:26:34 -0800 Subject: Fix crash on audio focus change before initialized --- src/github/daneren2005/dsub/service/DownloadService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/github') diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java index faa88948..ce3c3799 100644 --- a/src/github/daneren2005/dsub/service/DownloadService.java +++ b/src/github/daneren2005/dsub/service/DownloadService.java @@ -1465,7 +1465,7 @@ public class DownloadService extends Service { } public void setVolume(float volume) { - if(mediaPlayer != null) { + if(mediaPlayer != null && (playerState == STARTED || playerState == PAUSED || playerState == STOPPED)) { mediaPlayer.setVolume(volume, volume); } } -- cgit v1.2.3