diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-05-02 21:48:30 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-05-02 21:48:30 -0700 |
commit | 7f778403863b33a9460df9cfbc20114af755a237 (patch) | |
tree | 289f68fb6bc2098a733ba9fe318517b34d62e246 /src/github/daneren2005 | |
parent | 0e3f566dbedeb328caebf3a9f8af53ffcfa10b31 (diff) | |
download | dsub-7f778403863b33a9460df9cfbc20114af755a237.tar.gz dsub-7f778403863b33a9460df9cfbc20114af755a237.tar.bz2 dsub-7f778403863b33a9460df9cfbc20114af755a237.zip |
Possible fix for EQ crash some users are getting
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r-- | src/github/daneren2005/dsub/fragments/EqualizerFragment.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/fragments/EqualizerFragment.java b/src/github/daneren2005/dsub/fragments/EqualizerFragment.java index 4bdb1716..17448516 100644 --- a/src/github/daneren2005/dsub/fragments/EqualizerFragment.java +++ b/src/github/daneren2005/dsub/fragments/EqualizerFragment.java @@ -156,8 +156,18 @@ public class EqualizerFragment extends SubsonicFragment { SharedPreferences.Editor editor = prefs.edit();
editor.putBoolean(Constants.PREFERENCES_EQUALIZER_ON, enabled);
editor.commit();
- equalizer.setEnabled(enabled);
- updateBars(true);
+ for(int i = 0; i < 10; i++) {
+ try {
+ equalizer.setEnabled(enabled);
+ updateBars(true);
+ i = 10;
+ } catch (UnsupportedOperationException e) {
+ equalizerController.release();
+ equalizer = equalizerController.getEqualizer();
+ bass = equalizerController.getBassBoost();
+ loudnessEnhancer = equalizerController.getLoudnessEnhancerController();
+ }
+ }
}
private void updateBars(boolean changedEnabled) {
|