aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/services
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-11-28 20:11:38 +0100
committerChristian S <christian@pix-art.de>2015-12-04 20:02:05 +0100
commitc1677af5b1872846c39514e5c488381de67be63c (patch)
tree8d87764082c000b998ff4b57cc739ac0790cad66 /src/main/java/eu/siacs/conversations/services
parent45e961f02b1f60859741af16f6d278b0cfdfb121 (diff)
initial tor support
Diffstat (limited to 'src/main/java/eu/siacs/conversations/services')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index 2c140a83f..ac084758b 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -2113,8 +2113,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);
@@ -2551,10 +2550,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);
}
@@ -2571,6 +2566,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()) {