Fix a little bug where configured account is not correctly detected
authorDa Risk <da_risk@beem-project.com>
Mon, 07 Jan 2013 14:42:41 +0100
changeset 1012 b76c110b3c73
parent 1011 b825f2773bd6
child 1013 3f4c77587fb9
Fix a little bug where configured account is not correctly detected
src/com/beem/project/beem/BeemApplication.java
--- a/src/com/beem/project/beem/BeemApplication.java	Sun Jan 06 18:27:57 2013 +0100
+++ b/src/com/beem/project/beem/BeemApplication.java	Mon Jan 07 14:42:41 2013 +0100
@@ -144,7 +144,8 @@
 	mSettings = PreferenceManager.getDefaultSharedPreferences(this);
 	String login = mSettings.getString(BeemApplication.ACCOUNT_USERNAME_KEY, "");
 	String password = mSettings.getString(BeemApplication.ACCOUNT_PASSWORD_KEY, "");
-	mIsAccountConfigured = !("".equals(login) || "".equals(password));
+	boolean useSystemAccount = mSettings.getBoolean(BeemApplication.USE_SYSTEM_ACCOUNT_KEY, false);
+	mIsAccountConfigured = !TextUtils.isEmpty(login) && (useSystemAccount || !TextUtils.isEmpty((password)));
 	mSettings.registerOnSharedPreferenceChangeListener(mPreferenceListener);
 	SmileyParser.init(this);
     }