diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2014-09-28 15:21:56 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2014-09-28 15:21:56 +0200 |
commit | bff23c2e232e8f9a4e64553215130079b7fc5a4f (patch) | |
tree | fec9608b615334ff065399b03fb747c4a7bf4d94 /src/eu/siacs/conversations/xmpp | |
parent | 1ae9338fc9d5f8e1f6505445f07f4476efd8f139 (diff) |
new notification service. first draft
Diffstat (limited to 'src/eu/siacs/conversations/xmpp')
-rw-r--r-- | src/eu/siacs/conversations/xmpp/XmppConnection.java | 2 | ||||
-rw-r--r-- | src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java | 11 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/eu/siacs/conversations/xmpp/XmppConnection.java b/src/eu/siacs/conversations/xmpp/XmppConnection.java index 8694e68c..b055e35a 100644 --- a/src/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/eu/siacs/conversations/xmpp/XmppConnection.java @@ -657,7 +657,7 @@ public class XmppConnection implements Runnable { if (bind != null) { Element jid = bind.findChild("jid"); if (jid != null && jid.getContent() != null) { - account.setResource(jid.getContent().split("/",2)[1]); + account.setResource(jid.getContent().split("/", 2)[1]); if (streamFeatures.hasChild("sm", "urn:xmpp:sm:3")) { smVersion = 3; EnablePacket enable = new EnablePacket(smVersion); diff --git a/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java b/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java index 4eac99e6..3a3d3582 100644 --- a/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java +++ b/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java @@ -88,8 +88,8 @@ public class JingleConnection implements Downloadable { sendSuccess(); if (acceptedAutomatically) { message.markUnread(); - JingleConnection.this.mXmppConnectionService.notifyUi( - message.getConversation(), true); + JingleConnection.this.mXmppConnectionService + .pushNotification(message); } BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; @@ -256,12 +256,12 @@ public class JingleConnection implements Downloadable { this.status = STATUS_INITIATED; Conversation conversation = this.mXmppConnectionService .findOrCreateConversation(account, - packet.getFrom().split("/",2)[0], false); + packet.getFrom().split("/", 2)[0], false); this.message = new Message(conversation, "", Message.ENCRYPTION_NONE); this.message.setType(Message.TYPE_IMAGE); this.message.setStatus(Message.STATUS_RECEIVED_OFFER); this.message.setDownloadable(this); - String[] fromParts = packet.getFrom().split("/",2); + String[] fromParts = packet.getFrom().split("/", 2); this.message.setPresence(fromParts[1]); this.account = account; this.initiator = packet.getFrom(); @@ -319,8 +319,7 @@ public class JingleConnection implements Downloadable { + " allowed size:" + this.mJingleConnectionManager .getAutoAcceptFileSize()); - this.mXmppConnectionService - .notifyUi(conversation, true); + this.mXmppConnectionService.pushNotification(message); } this.file = this.mXmppConnectionService.getFileBackend() .getJingleFile(message, false); |