# HG changeset patch # User Da Risk # Date 1349012407 -7200 # Node ID 9bb5749a8c4f155fbbf8aa43b4da86764aedf930 # Parent 84b87e059de97b786c02137ec43c3d269399718c Fix bug: on the very first launch the account is not configured if you choose system account. diff -r 84b87e059de9 -r 9bb5749a8c4f src/com/beem/project/beem/BeemApplication.java --- a/src/com/beem/project/beem/BeemApplication.java Sat Sep 29 05:22:47 2012 +0200 +++ b/src/com/beem/project/beem/BeemApplication.java Sun Sep 30 15:40:07 2012 +0200 @@ -47,6 +47,7 @@ import android.app.Application; import android.content.SharedPreferences; import android.preference.PreferenceManager; +import android.text.TextUtils; /** * This class contains informations that needs to be global in the application. @@ -195,10 +196,11 @@ @Override public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { - if (BeemApplication.ACCOUNT_USERNAME_KEY.equals(key) || BeemApplication.ACCOUNT_PASSWORD_KEY.equals(key)) { + if (BeemApplication.ACCOUNT_USERNAME_KEY.equals(key) || BeemApplication.ACCOUNT_PASSWORD_KEY.equals(key) || BeemApplication.USE_SYSTEM_ACCOUNT_KEY.equals(key)) { 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))); } } } diff -r 84b87e059de9 -r 9bb5749a8c4f src/com/beem/project/beem/ui/wizard/AccountConfigureFragment.java --- a/src/com/beem/project/beem/ui/wizard/AccountConfigureFragment.java Sat Sep 29 05:22:47 2012 +0200 +++ b/src/com/beem/project/beem/ui/wizard/AccountConfigureFragment.java Sun Sep 30 15:40:07 2012 +0200 @@ -472,6 +472,8 @@ } if (settings.getBoolean(BeemApplication.SMACK_DEBUG_KEY, false)) config.setDebuggerEnabled(true); + config.setSendPresence(false); + config.setRosterLoadedAtLogin(false); return new XMPPConnection(config); } }