aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/parser/IqParser.java
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-03-04 17:05:47 +0100
committerChristian Schneppe <christian@pix-art.de>2017-03-04 17:05:47 +0100
commitcedc4305c20aa76aa6ffa9a5443578e57023e1ca (patch)
tree62ffe4ed374e029385659d64919b144ea64626a7 /src/main/java/de/pixart/messenger/parser/IqParser.java
parenta2a9ce1caeabed2e29f702933f1fd18d949b75ec (diff)
rename the Xmlns class to Namespace
Diffstat (limited to 'src/main/java/de/pixart/messenger/parser/IqParser.java')
-rw-r--r--src/main/java/de/pixart/messenger/parser/IqParser.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/de/pixart/messenger/parser/IqParser.java b/src/main/java/de/pixart/messenger/parser/IqParser.java
index 2e45db32a..073a36170 100644
--- a/src/main/java/de/pixart/messenger/parser/IqParser.java
+++ b/src/main/java/de/pixart/messenger/parser/IqParser.java
@@ -28,7 +28,7 @@ import de.pixart.messenger.entities.Account;
import de.pixart.messenger.entities.Contact;
import de.pixart.messenger.entities.Conversation;
import de.pixart.messenger.services.XmppConnectionService;
-import de.pixart.messenger.utils.Xmlns;
+import de.pixart.messenger.utils.Namespace;
import de.pixart.messenger.xml.Element;
import de.pixart.messenger.xmpp.OnIqPacketReceived;
import de.pixart.messenger.xmpp.OnUpdateBlocklist;
@@ -287,19 +287,19 @@ public class IqParser extends AbstractParser implements OnIqPacketReceived {
final boolean isGet = packet.getType() == IqPacket.TYPE.GET;
if (packet.getType() == IqPacket.TYPE.ERROR || packet.getType() == IqPacket.TYPE.TIMEOUT) {
return;
- } else if (packet.hasChild("query", Xmlns.ROSTER) && packet.fromServer(account)) {
+ } else if (packet.hasChild("query", Namespace.ROSTER) && packet.fromServer(account)) {
final Element query = packet.findChild("query");
// If this is in response to a query for the whole roster:
if (packet.getType() == IqPacket.TYPE.RESULT) {
account.getRoster().markAllAsNotInRoster();
}
this.rosterItems(account, query);
- } else if ((packet.hasChild("block", Xmlns.BLOCKING) || packet.hasChild("blocklist", Xmlns.BLOCKING)) &&
+ } else if ((packet.hasChild("block", Namespace.BLOCKING) || packet.hasChild("blocklist", Namespace.BLOCKING)) &&
packet.fromServer(account)) {
// Block list or block push.
Log.d(Config.LOGTAG, "Received blocklist update from server");
- final Element blocklist = packet.findChild("blocklist", Xmlns.BLOCKING);
- final Element block = packet.findChild("block", Xmlns.BLOCKING);
+ final Element blocklist = packet.findChild("blocklist", Namespace.BLOCKING);
+ final Element block = packet.findChild("block", Namespace.BLOCKING);
final Collection<Element> items = blocklist != null ? blocklist.getChildren() :
(block != null ? block.getChildren() : null);
// If this is a response to a blocklist query, clear the block list and replace with the new one.
@@ -335,10 +335,10 @@ public class IqParser extends AbstractParser implements OnIqPacketReceived {
final IqPacket response = packet.generateResponse(IqPacket.TYPE.RESULT);
mXmppConnectionService.sendIqPacket(account, response, null);
}
- } else if (packet.hasChild("unblock", Xmlns.BLOCKING) &&
+ } else if (packet.hasChild("unblock", Namespace.BLOCKING) &&
packet.fromServer(account) && packet.getType() == IqPacket.TYPE.SET) {
Log.d(Config.LOGTAG, "Received unblock update from server");
- final Collection<Element> items = packet.findChild("unblock", Xmlns.BLOCKING).getChildren();
+ final Collection<Element> items = packet.findChild("unblock", Namespace.BLOCKING).getChildren();
if (items.size() == 0) {
// No children to unblock == unblock all
account.getBlocklist().clear();