mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-28 03:46:00 +01:00
Revert
This commit is contained in:
@@ -309,29 +309,6 @@ public class DnsHelper {
|
||||
}
|
||||
}
|
||||
|
||||
static InetAddress getByName(Context context, String host) throws UnknownHostException {
|
||||
return getAllByName(context, host)[0];
|
||||
}
|
||||
|
||||
static InetAddress[] getAllByName(Context context, String host) throws UnknownHostException {
|
||||
List<InetAddress> result = new ArrayList<>();
|
||||
|
||||
boolean[] has46 = ConnectionHelper.has46(context);
|
||||
|
||||
if (has46[0])
|
||||
for (DnsRecord a : lookup(context, host, "a"))
|
||||
result.add(a.address);
|
||||
|
||||
if (has46[1])
|
||||
for (DnsRecord aaaa : lookup(context, host, "aaaa"))
|
||||
result.add(aaaa.address);
|
||||
|
||||
if (result.size() == 0)
|
||||
throw new UnknownHostException(host);
|
||||
else
|
||||
return result.toArray(new InetAddress[0]);
|
||||
}
|
||||
|
||||
private static List<String> getDnsServers(Context context) {
|
||||
List<String> result = new ArrayList<>();
|
||||
result.add(DEFAULT_DNS);
|
||||
|
||||
Reference in New Issue
Block a user