From 2ae6f6067f89810e7a1970bd1ae1b4d2e9e93461 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Wed, 19 Mar 2014 22:50:10 -0700 Subject: Fix crash on Froyo --- src/github/daneren2005/dsub/service/DownloadService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3