code cleanup
This commit is contained in:
parent
ee24baa0fd
commit
850b24c4db
|
@ -387,14 +387,10 @@ public class XmppConnection implements Runnable {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendCompressionZlib() throws IOException {
|
private void sendCompressionZlib() throws IOException {
|
||||||
tagWriter.writeElement(new Element("compress") {
|
Element compress = new Element("compress");
|
||||||
public String toString() {
|
compress.setAttribute("xmlns", "http://jabber.org/protocol/compress");
|
||||||
return
|
compress.addChild("method").setContent("zlib");
|
||||||
"<compress xmlns='http://jabber.org/protocol/compress'>"
|
tagWriter.writeElement(compress);
|
||||||
+ "<method>zlib</method>"
|
|
||||||
+ "</compress>";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void switchOverToZLib(Tag currentTag) throws XmlPullParserException,
|
private void switchOverToZLib(Tag currentTag) throws XmlPullParserException,
|
||||||
|
@ -408,9 +404,8 @@ public class XmppConnection implements Runnable {
|
||||||
tagReader.setInputStream(new ZLibInputStream(tagReader.getInputStream()));
|
tagReader.setInputStream(new ZLibInputStream(tagReader.getInputStream()));
|
||||||
|
|
||||||
sendStartStream();
|
sendStartStream();
|
||||||
|
Log.d(LOGTAG,account.getJid()+": compression enabled");
|
||||||
processStream(tagReader.readTag());
|
processStream(tagReader.readTag());
|
||||||
|
|
||||||
Log.d(LOGTAG,account.getJid()+": zlib compressed stream established");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendStartTLS() throws IOException {
|
private void sendStartTLS() throws IOException {
|
||||||
|
@ -568,7 +563,6 @@ public class XmppConnection implements Runnable {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue