From ddac0b1268f3336d27f83c0e6a9e00a021c6ba2e Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Sat, 3 May 2014 17:26:59 -0700 Subject: Apply same work around for applying presets --- src/github/daneren2005/dsub/fragments/EqualizerFragment.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/github/daneren2005') diff --git a/src/github/daneren2005/dsub/fragments/EqualizerFragment.java b/src/github/daneren2005/dsub/fragments/EqualizerFragment.java index 17448516..8329298f 100644 --- a/src/github/daneren2005/dsub/fragments/EqualizerFragment.java +++ b/src/github/daneren2005/dsub/fragments/EqualizerFragment.java @@ -146,7 +146,17 @@ public class EqualizerFragment extends SubsonicFragment { @Override public boolean onContextItemSelected(MenuItem menuItem) { short preset = (short) menuItem.getItemId(); - equalizer.usePreset(preset); + for(int i = 0; i < 10; i++) { + try { + equalizer.usePreset(preset); + i = 10; + } catch (UnsupportedOperationException e) { + equalizerController.release(); + equalizer = equalizerController.getEqualizer(); + bass = equalizerController.getBassBoost(); + loudnessEnhancer = equalizerController.getLoudnessEnhancerController(); + } + } updateBars(false); return true; } -- cgit v1.2.3