aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-03-19 22:20:48 -0700
committerScott Jackson <daneren2005@gmail.com>2014-03-19 22:20:48 -0700
commit855017392ae445b12026c1959fe57f24eef70ad5 (patch)
treef9569238295b5d4f7418901a7ce51ccd64b144da /src
parent7d277c55af2defb1d08ef882d7ac8c80a1c4cee3 (diff)
downloaddsub-855017392ae445b12026c1959fe57f24eef70ad5.tar.gz
dsub-855017392ae445b12026c1959fe57f24eef70ad5.tar.bz2
dsub-855017392ae445b12026c1959fe57f24eef70ad5.zip
Don't die when setVolume throws exception
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/service/DownloadService.java6
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");
+ }
}
}