aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-03-19 22:50:10 -0700
committerScott Jackson <daneren2005@gmail.com>2014-03-19 22:50:10 -0700
commit2ae6f6067f89810e7a1970bd1ae1b4d2e9e93461 (patch)
tree9b6ceef83f766f7bf1e4761d1c365c871398d9b6 /src
parent9eafac97066552fb87462061354f275ef41ecb4e (diff)
downloaddsub-2ae6f6067f89810e7a1970bd1ae1b4d2e9e93461.tar.gz
dsub-2ae6f6067f89810e7a1970bd1ae1b4d2e9e93461.tar.bz2
dsub-2ae6f6067f89810e7a1970bd1ae1b4d2e9e93461.zip
Fix crash on Froyo
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 aa5d8845..2d82e5fb 100644
--- a/src/github/daneren2005/dsub/service/DownloadService.java
+++ b/src/github/daneren2005/dsub/service/DownloadService.java
@@ -164,7 +164,11 @@ public class DownloadService extends Service {
return false;
}
});
- audioSessionId = mediaPlayer.getAudioSessionId();
+ try {
+ audioSessionId = mediaPlayer.getAudioSessionId();
+ } catch(Throwable e) {
+ // Froyo or lower
+ }
try {
Intent i = new Intent(AudioEffect.ACTION_OPEN_AUDIO_EFFECT_CONTROL_SESSION);