VPN after active

(cherry picked from commit 0ba2469e12c1825a63d9aa449268d8d678000153)
This commit is contained in:
Stephen Paul Weber 2024-12-09 11:34:22 -05:00 committed by Arne
parent 724bfc508e
commit 26bff2289c

View file

@ -53,7 +53,8 @@ public class AndroidUsingLinkProperties extends AbstractDnsServerLookupMechanism
final boolean isVpn = networkInfo != null && networkInfo.getType() == ConnectivityManager.TYPE_VPN;
final List<String> servers = getIPv4First(linkProperties.getDnsServers());
if (hasDefaultRoute(linkProperties) || isActiveNetwork || activeNetwork == null || isVpn) {
if (isActiveNetwork || isVpn) networkServers.addAll(servers);
if (isActiveNetwork) networkServers.addAll(0, servers);
if (isVpn) networkServers.addAll(servers);
otherServers.addAll(servers);
}
}