mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-27 11:25:13 +01:00
DNS: backward compatibility
This commit is contained in:
@@ -104,6 +104,7 @@ public class DnsHelper {
|
||||
@NonNull
|
||||
private static DnsRecord[] _lookup(Context context, String name, String type, int timeout) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean dns_custom = prefs.getBoolean("dns_custom", false);
|
||||
boolean dns_secure = prefs.getBoolean("dns_secure", false);
|
||||
|
||||
String filter = null;
|
||||
@@ -141,7 +142,7 @@ public class DnsHelper {
|
||||
ResolverApi resolver = DnssecResolverApi.INSTANCE;
|
||||
AbstractDnsClient client = resolver.getClient();
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && !dns_custom)
|
||||
client.setDataSource(new AbstractDnsDataSource() {
|
||||
private IOException ex;
|
||||
private DnsQueryResult result;
|
||||
|
||||
Reference in New Issue
Block a user