aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2016-02-23 22:40:43 +0100
committersteckbrief <steckbrief@chefmail.de>2016-02-23 22:40:43 +0100
commit5fcd69c68b5f530ac76836d4f3a761cdba958356 (patch)
treea5a71bcf5b75cea4e86a990b4d37205f23a9d9dd /src/main/java/eu/siacs
parent6d4a55a08743032bb3f0a068d09aaae588eb0b17 (diff)
Packet sending helper moved to XmppSendUtil and methods in XmppConnectionService marked as deprecated
Diffstat (limited to '')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index 9fee1478..a78a43f1 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -67,6 +67,7 @@ import de.thedevstack.conversationsplus.utils.FileHelper;
import de.thedevstack.conversationsplus.utils.ImageUtil;
import de.thedevstack.conversationsplus.utils.MessageUtil;
import de.thedevstack.conversationsplus.utils.UiUpdateHelper;
+import de.thedevstack.conversationsplus.utils.XmppSendUtil;
import de.tzur.conversations.Settings;
import eu.siacs.conversations.Config;
import eu.siacs.conversations.R;
@@ -2388,10 +2389,6 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
.getDefaultSharedPreferences(getApplicationContext());
}
- public boolean confirmMessages() {
- return getPreferences().getBoolean("confirm_messages", true);
- }
-
public boolean saveEncryptedMessages() {
return !getPreferences().getBoolean("dont_save_encrypted", false);
}
@@ -2610,18 +2607,14 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
return mucServers;
}
+ @Deprecated
public void sendMessagePacket(Account account, MessagePacket packet) {
- XmppConnection connection = account.getXmppConnection();
- if (connection != null) {
- connection.sendMessagePacket(packet);
- }
+ XmppSendUtil.sendMessagePacket(account, packet);
}
+ @Deprecated
public void sendPresencePacket(Account account, PresencePacket packet) {
- XmppConnection connection = account.getXmppConnection();
- if (connection != null) {
- connection.sendPresencePacket(packet);
- }
+ XmppSendUtil.sendPresencePacket(account, packet);
}
public void sendCreateAccountWithCaptchaPacket(Account account, String id, Data data) {
@@ -2631,15 +2624,13 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
}
}
+ @Deprecated
public void sendIqPacket(final Account account, final IqPacket packet, final OnIqPacketReceived callback) {
- final XmppConnection connection = account.getXmppConnection();
- if (connection != null) {
- connection.sendIqPacket(packet, callback);
- }
+ XmppSendUtil.sendIqPacket(account, packet, callback);
}
public void sendPresence(final Account account) {
- sendPresencePacket(account, mPresenceGenerator.selfPresence(account, getTargetPresence()));
+ XmppSendUtil.sendPresencePacket(account, mPresenceGenerator.selfPresence(account, getTargetPresence()));
}
public void refreshAllPresences() {
@@ -2659,7 +2650,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
}
public void sendOfflinePresence(final Account account) {
- sendPresencePacket(account, mPresenceGenerator.sendOfflinePresence(account));
+ XmppSendUtil.sendPresencePacket(account, mPresenceGenerator.sendOfflinePresence(account));
}
public MessageGenerator getMessageGenerator() {