Discover Server features right after connection.
In the same time, postpone the load of the roster.
This avoid a timeout on the discovery request sent to the server.
The timeout is caused by receiving big rosters.
--- a/src/com/beem/project/beem/BeemService.java Mon Jan 28 21:47:48 2013 +0100
+++ b/src/com/beem/project/beem/BeemService.java Tue Jan 22 15:01:56 2013 +0100
@@ -181,6 +181,7 @@
if (mSettings.getBoolean(BeemApplication.SMACK_DEBUG_KEY, false))
mConnectionConfiguration.setDebuggerEnabled(true);
mConnectionConfiguration.setSendPresence(false);
+ mConnectionConfiguration.setRosterLoadedAtLogin(false);
// maybe not the universal path, but it works on most devices (Samsung Galaxy, Google Nexus One)
mConnectionConfiguration.setTruststoreType("BKS");
mConnectionConfiguration.setTruststorePath("/system/etc/security/cacerts.bks");
--- a/src/com/beem/project/beem/service/XmppConnectionAdapter.java Mon Jan 28 21:47:48 2013 +0100
+++ b/src/com/beem/project/beem/service/XmppConnectionAdapter.java Tue Jan 22 15:01:56 2013 +0100
@@ -250,15 +250,14 @@
mAdaptee.login(mLogin, mPassword, mResource);
mUserInfo = new UserInfo(mAdaptee.getUser());
+ discoverServerFeatures();
mChatManager = new BeemChatManager(mAdaptee.getChatManager(), mService, mAdaptee.getRoster());
//nikita: I commented this line because of the logs provided in http://www.beem-project.com/issues/321
//Also, since the privacylistmanager isn't finished and used, it will be safer to not initialize it
//mPrivacyListManager = new PrivacyListManagerAdapter(PrivacyListManager.getInstanceFor(mAdaptee));
mService.initJingle(mAdaptee);
- discoverServerFeatures();
- mRoster = new RosterAdapter(mAdaptee.getRoster(), mService, mAvatarManager);
mApplication.setConnected(true);
int mode = mPref.getInt(BeemApplication.STATUS_KEY, 0);
String status = mPref.getString(BeemApplication.STATUS_TEXT_KEY, "");