# HG changeset patch # User Da Risk # Date 1358863316 -3600 # Node ID b47960e53050c061bb18c2928ae1954c3197d386 # Parent d8ef6a82d7152e17ee8bfa62c803f86806362dc8 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. diff -r d8ef6a82d715 -r b47960e53050 src/com/beem/project/beem/BeemService.java --- 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"); diff -r d8ef6a82d715 -r b47960e53050 src/com/beem/project/beem/service/XmppConnectionAdapter.java --- 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, "");