diff options
author | Scott Jackson <daneren2005@gmail.com> | 2015-05-18 18:12:57 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2015-05-18 18:12:57 -0700 |
commit | 8eb2d63ba03335dd9a3d3b4c9f2a70c1b250b7ba (patch) | |
tree | 19a4a7fe020a904ebd86f3f8edbe34c2aba72452 /app/src/main/java/github/daneren2005 | |
parent | 2d55fbfdc0a01c8c5563827fba6198f1d8c5e4b9 (diff) | |
download | dsub-8eb2d63ba03335dd9a3d3b4c9f2a70c1b250b7ba.tar.gz dsub-8eb2d63ba03335dd9a3d3b4c9f2a70c1b250b7ba.tar.bz2 dsub-8eb2d63ba03335dd9a3d3b4c9f2a70c1b250b7ba.zip |
Move getController to separate line in case optimizer is screwing with order of operations
Diffstat (limited to 'app/src/main/java/github/daneren2005')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java index 43d85cdd..3e30af50 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java @@ -581,9 +581,10 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis if(equalizerAvailable && !downloadService.isRemoteEnabled()) { SharedPreferences prefs = Util.getPreferences(context); boolean equalizerOn = prefs.getBoolean(Constants.PREFERENCES_EQUALIZER_ON, false); - if (equalizerOn && getDownloadService() != null && getDownloadService().getEqualizerController() != null && - getDownloadService().getEqualizerController().isEnabled()) { - menu.findItem(R.id.menu_equalizer).setChecked(true); + if (equalizerOn && downloadService != null) { + if(downloadService.getEqualizerController() != null && downloadService.getEqualizerController().isEnabled()) { + menu.findItem(R.id.menu_equalizer).setChecked(true); + } } } else { menu.removeItem(R.id.menu_equalizer); |