aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/ui/SettingsActivity.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-12-01 22:41:58 +0100
committerDaniel Gultsch <daniel@gultsch.de>2015-12-01 22:41:58 +0100
commitdc8967d8fc09a5b7e515bb5005726d677a08c86b (patch)
treedff76dd5f6f71af64ca3b7cc2e723fdd2dafc5a7 /src/main/java/eu/siacs/conversations/ui/SettingsActivity.java
parent65b5504e68e36116234bd69126304d6d764b678b (diff)
introduced build-time paranoia mode that disables unencrypted chats and forces TOR
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui/SettingsActivity.java')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/SettingsActivity.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/SettingsActivity.java b/src/main/java/eu/siacs/conversations/ui/SettingsActivity.java
index 7118eb5a8..da9738ab5 100644
--- a/src/main/java/eu/siacs/conversations/ui/SettingsActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/SettingsActivity.java
@@ -9,7 +9,10 @@ import android.os.Build;
import android.os.Bundle;
import android.preference.ListPreference;
import android.preference.Preference;
+import android.preference.PreferenceCategory;
import android.preference.PreferenceManager;
+import android.preference.PreferenceScreen;
+import android.util.Log;
import android.widget.Toast;
import java.security.KeyStoreException;
@@ -19,6 +22,7 @@ import java.util.Collections;
import java.util.Locale;
import de.duenndns.ssl.MemorizingTrustManager;
+import eu.siacs.conversations.Config;
import eu.siacs.conversations.R;
import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.xmpp.XmppConnection;
@@ -57,6 +61,14 @@ public class SettingsActivity extends XmppActivity implements
}
}
+ if (Config.PARANOID_MODE) {
+ PreferenceCategory connectionOptions = (PreferenceCategory) mSettingsFragment.findPreference("connection_options");
+ PreferenceScreen expert = (PreferenceScreen) mSettingsFragment.findPreference("expert");
+ if (connectionOptions != null) {
+ expert.removePreference(connectionOptions);
+ }
+ }
+
final Preference removeCertsPreference = mSettingsFragment.findPreference("remove_trusted_certificates");
removeCertsPreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override