diff --git a/app/src/main/java/eu/faircode/email/DnsHelper.java b/app/src/main/java/eu/faircode/email/DnsHelper.java
index 73c3d96598..0b4d52799f 100644
--- a/app/src/main/java/eu/faircode/email/DnsHelper.java
+++ b/app/src/main/java/eu/faircode/email/DnsHelper.java
@@ -90,7 +90,7 @@ public class DnsHelper {
String domain = UriHelper.getEmailDomain(email);
if (domain == null)
continue;
- DnsRecord[] records = _lookup(context, domain, "mx", CHECK_TIMEOUT);
+ DnsRecord[] records = _lookup(context, domain, "mx", CHECK_TIMEOUT, false);
if (records.length == 0)
throw new UnknownHostException(domain);
}
@@ -98,14 +98,13 @@ public class DnsHelper {
@NonNull
static DnsRecord[] lookup(Context context, String name, String type) {
- return _lookup(context, name, type, LOOKUP_TIMEOUT);
+ return _lookup(context, name, type, LOOKUP_TIMEOUT, false);
}
@NonNull
- private static DnsRecord[] _lookup(Context context, String name, String type, int timeout) {
+ private static DnsRecord[] _lookup(Context context, String name, String type, int timeout, boolean dns_secure) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean dns_custom = prefs.getBoolean("dns_custom", false);
- boolean dns_secure = prefs.getBoolean("dns_secure", false);
String filter = null;
int colon = type.indexOf(':');
diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsConnection.java b/app/src/main/java/eu/faircode/email/FragmentOptionsConnection.java
index 21dae7eb8d..07c3a1d0b5 100644
--- a/app/src/main/java/eu/faircode/email/FragmentOptionsConnection.java
+++ b/app/src/main/java/eu/faircode/email/FragmentOptionsConnection.java
@@ -98,7 +98,6 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
private SwitchCompat swStandaloneVpn;
private SwitchCompat swDnsCustom;
private EditText etDnsExtra;
- private SwitchCompat swDnsSecure;
private SwitchCompat swTcpKeepAlive;
private SwitchCompat swSslUpdate;
private SwitchCompat swSslHarden;
@@ -131,7 +130,7 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
"download_headers", "download_eml", "download_plain",
"require_validated", "require_validated_captive", "vpn_only",
"timeout", "prefer_ip4", "bind_socket", "standalone_vpn",
- "dns_extra", "dns_custom", "dns_secure",
+ "dns_extra", "dns_custom",
"tcp_keep_alive",
"ssl_update", "ssl_harden", "ssl_harden_strict", "cert_strict", "cert_transparency", "check_names",
"open_safe", "http_redirect",
@@ -166,7 +165,6 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
swStandaloneVpn = view.findViewById(R.id.swStandaloneVpn);
swDnsCustom = view.findViewById(R.id.swDnsCustom);
etDnsExtra = view.findViewById(R.id.etDnsExtra);
- swDnsSecure = view.findViewById(R.id.swDnsSecure);
swTcpKeepAlive = view.findViewById(R.id.swTcpKeepAlive);
swSslUpdate = view.findViewById(R.id.swSslUpdate);
swSslHarden = view.findViewById(R.id.swSslHarden);
@@ -351,7 +349,6 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
DnsHelper.clear(buttonView.getContext());
prefs.edit().putBoolean("dns_custom", checked).apply();
etDnsExtra.setEnabled(checked || Build.VERSION.SDK_INT < Build.VERSION_CODES.Q);
- swDnsSecure.setEnabled(checked);
}
});
@@ -372,15 +369,6 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
}
});
- swDnsSecure.setVisibility(debug || BuildConfig.DEBUG ? View.VISIBLE : View.GONE);
- swDnsSecure.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton buttonView, boolean checked) {
- DnsHelper.clear(buttonView.getContext());
- prefs.edit().putBoolean("dns_secure", checked).apply();
- }
- });
-
swTcpKeepAlive.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
@@ -768,8 +756,6 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
swDnsCustom.setChecked(prefs.getBoolean("dns_custom", false));
etDnsExtra.setText(prefs.getString("dns_extra", null));
etDnsExtra.setEnabled(swDnsCustom.isChecked() || Build.VERSION.SDK_INT < Build.VERSION_CODES.Q);
- swDnsSecure.setChecked(prefs.getBoolean("dns_secure", false));
- swDnsSecure.setEnabled(swDnsCustom.isChecked());
swTcpKeepAlive.setChecked(prefs.getBoolean("tcp_keep_alive", false));
swSslUpdate.setChecked(prefs.getBoolean("ssl_update", true));
swSslHarden.setChecked(prefs.getBoolean("ssl_harden", false));
diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java
index 9cf291bb9b..5dbfe58a48 100644
--- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java
+++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java
@@ -172,7 +172,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
"sync_shared_folders",
"download_headers", "download_eml",
"prefer_ip4", "bind_socket", "standalone_vpn", // force reconnect
- "dns_extra", "dns_custom", "dns_secure", // force reconnect
+ "dns_extra", "dns_custom", // force reconnect
"tcp_keep_alive", // force reconnect
"ssl_harden", "ssl_harden_strict", "cert_strict", "cert_transparency", "check_names", "bouncy_castle", "bc_fips", // force reconnect
"experiments", "debug", "protocol", // force reconnect
diff --git a/app/src/main/res/layout/fragment_options_connection.xml b/app/src/main/res/layout/fragment_options_connection.xml
index 7f5d1848d5..7544e5b507 100644
--- a/app/src/main/res/layout/fragment_options_connection.xml
+++ b/app/src/main/res/layout/fragment_options_connection.xml
@@ -461,18 +461,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvDns" />
-
-