Commit 617f25eb authored by jianglx's avatar jianglx

修改im配置为空闪退的问题

parent b39589f0
......@@ -8,8 +8,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
flavorDimensions "default"
versionCode 152
versionName "1.5.2"
versionCode 145
versionName "1.4.5"
multiDexEnabled true
......
......@@ -183,8 +183,11 @@ public class XmppConnectionManager {
mContext = context;
initConfig();
mNotifyConnectionListener = listener;
mConnection = new XMPPTCPConnection(getConnectionConfiguration());
XMPPTCPConnectionConfiguration connectionConfiguration = getConnectionConfiguration();
if (connectionConfiguration == null) {
return;
}
mConnection = new XMPPTCPConnection(connectionConfiguration);
mConnection.addConnectionListener(mAbstractConnectionListener);
initNetWorkStatusReceiver();
......@@ -201,6 +204,7 @@ public class XmppConnectionManager {
private AppConfig staticConfig = null;
private XMPPTCPConnectionConfiguration getConnectionConfiguration() {
if (staticConfig == null) return null;
final String mXmppHost = staticConfig.XMPPHost;
int mXmppPort = staticConfig.mXMPPPort;
String mXmppDomain = staticConfig.XMPPDomain;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment