aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu/siacs/conversations/services/XmppConnectionService.java')
-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() {