aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-05-24 09:06:44 -0700
committerScott Jackson <daneren2005@gmail.com>2013-05-24 09:06:44 -0700
commit579cf4e85e4ce825eaca9494821f0c369f5ab37c (patch)
tree732e8b8db8445e15a0efaec3c57e246a48046bae /subsonic-android/src
parent6a67a4713421d1565953e59140f23240346c3526 (diff)
downloaddsub-579cf4e85e4ce825eaca9494821f0c369f5ab37c.tar.gz
dsub-579cf4e85e4ce825eaca9494821f0c369f5ab37c.tar.bz2
dsub-579cf4e85e4ce825eaca9494821f0c369f5ab37c.zip
Add in a check to make sure instance is valid
Diffstat (limited to 'subsonic-android/src')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java
index d1c22fea..6ab62662 100644
--- a/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java
+++ b/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java
@@ -269,7 +269,12 @@ public class MainActivity extends SubsonicActivity {
editor.putString(Constants.PREFERENCES_KEY_PASSWORD + 1, "guest");
editor.putInt(Constants.PREFERENCES_KEY_SERVER_INSTANCE, 1);
editor.commit();
- }
+ }
+ if(prefs.getInt(Constants.PREFERENCES_KEY_SERVER_INSTANCE, -1) < 0) {
+ SharedPreferences.Editor editor = prefs.edit();
+ editor.putInt(Constants.PREFERENCES_KEY_SERVER_INSTANCE, 0);
+ editor.commit();
+ }
}
private void showInfoDialog() {