aboutsummaryrefslogtreecommitdiff
path: root/src/github
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-01-16 12:35:11 -0800
committerScott Jackson <daneren2005@gmail.com>2015-01-16 12:35:11 -0800
commiteb1ad23b49cfd4de477c73279cda7d5c1ad3b1a9 (patch)
treea3808774f9db57f08189c088387e0b68bcb9b9ad /src/github
parent746dd8e2cf2bcee6cfe4bed23261bf7c2be6020f (diff)
downloaddsub-eb1ad23b49cfd4de477c73279cda7d5c1ad3b1a9.tar.gz
dsub-eb1ad23b49cfd4de477c73279cda7d5c1ad3b1a9.tar.bz2
dsub-eb1ad23b49cfd4de477c73279cda7d5c1ad3b1a9.zip
Fix crash on startup after casting due to a check not to do anything if remoteState hasn't changed
Diffstat (limited to 'src/github')
-rw-r--r--src/github/daneren2005/dsub/service/DownloadService.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java
index 29fb00b2..37741b92 100644
--- a/src/github/daneren2005/dsub/service/DownloadService.java
+++ b/src/github/daneren2005/dsub/service/DownloadService.java
@@ -414,10 +414,10 @@ public class DownloadService extends Service {
public synchronized void restore(List<MusicDirectory.Entry> songs, List<MusicDirectory.Entry> toDelete, int currentPlayingIndex, int currentPlayingPosition) {
SharedPreferences prefs = Util.getPreferences(this);
- remoteState = RemoteControlState.values()[prefs.getInt(Constants.PREFERENCES_KEY_CONTROL_MODE, 0)];
- if(remoteState != LOCAL) {
+ RemoteControlState newState = RemoteControlState.values()[prefs.getInt(Constants.PREFERENCES_KEY_CONTROL_MODE, 0)];
+ if(newState != LOCAL) {
String id = prefs.getString(Constants.PREFERENCES_KEY_CONTROL_ID, null);
- setRemoteState(remoteState, null, id);
+ setRemoteState(newState, null, id);
}
if(prefs.getBoolean(Constants.PREFERENCES_KEY_REMOVE_PLAYED, false)) {
removePlayed = true;