diff --git a/app/src/main/java/eu/faircode/email/DebugHelper.java b/app/src/main/java/eu/faircode/email/DebugHelper.java index 3362f00ace..d789bd7666 100644 --- a/app/src/main/java/eu/faircode/email/DebugHelper.java +++ b/app/src/main/java/eu/faircode/email/DebugHelper.java @@ -1102,6 +1102,11 @@ public class DebugHelper { mx = false; } + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); + boolean dns_custom = prefs.getBoolean("dns_custom", false); + + size += write(os, "DNS custom=" + dns_custom + + " servers=" + TextUtils.join(", ", DnsHelper.getDnsServers(context)) + "\r\n"); size += write(os, "MX=" + mx + "\r\n"); size += write(os, "Has IPv4=" + has46[0] + " IPv6=" + has46[1] + "\r\n"); size += write(os, "VPN active=" + ConnectionHelper.vpnActive(context) + "\r\n"); @@ -1115,7 +1120,6 @@ public class DebugHelper { NetworkSecurityPolicy.getInstance().isCleartextTrafficPermitted() + "\r\n"); size += write(os, "\r\n"); - SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); int timeout = prefs.getInt("timeout", EmailService.DEFAULT_CONNECT_TIMEOUT); boolean metered = prefs.getBoolean("metered", true); int download = prefs.getInt("download", MessageHelper.DEFAULT_DOWNLOAD_SIZE); diff --git a/app/src/main/java/eu/faircode/email/DnsHelper.java b/app/src/main/java/eu/faircode/email/DnsHelper.java index 2a7f1f50ad..bbbc20c5f0 100644 --- a/app/src/main/java/eu/faircode/email/DnsHelper.java +++ b/app/src/main/java/eu/faircode/email/DnsHelper.java @@ -372,7 +372,7 @@ public class DnsHelper { } } - private static List getDnsServers(Context context) { + static List getDnsServers(Context context) { List result = new ArrayList<>(_getDnsServers(context)); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);