From f0b1761ec3826b72fe3b20032b532dc5b1adfc1c Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 28 Nov 2015 20:11:38 +0100 Subject: initial tor support --- .../siacs/conversations/services/XmppConnectionService.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/main/java/eu/siacs/conversations/services') diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 4bde7fb6..30f8c687 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -2106,8 +2106,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa } public void createContact(Contact contact) { - SharedPreferences sharedPref = getPreferences(); - boolean autoGrant = sharedPref.getBoolean("grant_new_contacts", true); + boolean autoGrant = getPreferences().getBoolean("grant_new_contacts", true); if (autoGrant) { contact.setOption(Contact.Options.PREEMPTIVE_GRANT); contact.setOption(Contact.Options.ASKING); @@ -2534,10 +2533,6 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa .getDefaultSharedPreferences(getApplicationContext()); } - public boolean forceEncryption() { - return getPreferences().getBoolean("force_encryption", false); - } - public boolean confirmMessages() { return getPreferences().getBoolean("confirm_messages", true); } @@ -2554,6 +2549,10 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa return getPreferences().getBoolean("indicate_received", false); } + public boolean useTorToConnect() { + return getPreferences().getBoolean("use_tor", false); + } + public int unreadCount() { int count = 0; for (Conversation conversation : getConversations()) { -- cgit v1.2.3