diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-03-19 22:20:48 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-03-19 22:20:48 -0700 |
commit | 855017392ae445b12026c1959fe57f24eef70ad5 (patch) | |
tree | f9569238295b5d4f7418901a7ce51ccd64b144da /src/github/daneren2005 | |
parent | 7d277c55af2defb1d08ef882d7ac8c80a1c4cee3 (diff) | |
download | dsub-855017392ae445b12026c1959fe57f24eef70ad5.tar.gz dsub-855017392ae445b12026c1959fe57f24eef70ad5.tar.bz2 dsub-855017392ae445b12026c1959fe57f24eef70ad5.zip |
Don't die when setVolume throws exception
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r-- | src/github/daneren2005/dsub/service/DownloadService.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java index 30948dee..aa5d8845 100644 --- a/src/github/daneren2005/dsub/service/DownloadService.java +++ b/src/github/daneren2005/dsub/service/DownloadService.java @@ -1459,7 +1459,11 @@ public class DownloadService extends Service { public void setVolume(float volume) { if(mediaPlayer != null && (playerState == STARTED || playerState == PAUSED || playerState == STOPPED)) { - mediaPlayer.setVolume(volume, volume); + try { + mediaPlayer.setVolume(volume, volume); + } catch(Exception e) { + Log.w(TAG, "Failed to set volume"); + } } } |