1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2025-01-01 12:54:07 +00:00

Keep using old method to acquire DNS servers for now

This commit is contained in:
M66B 2017-04-08 08:37:11 +02:00
parent 7883988ed0
commit fd3b56eb8c

View file

@ -271,7 +271,7 @@ public class Util {
public static List<String> getDefaultDNS(Context context) {
String dns1 = null;
String dns2 = null;
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {
if (android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.N) {
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
Network an = cm.getActiveNetwork();
if (an != null) {