From 0882f40c73e7364b1844cde2780a906e890bb8d9 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 10 Apr 2017 10:44:27 +0200 Subject: [PATCH] Revert "Keep using old method to acquire DNS servers for now" This reverts commit fd3b56eb8c9d4d9274ed76e4128987bb4c183fa8. --- app/src/main/java/eu/faircode/netguard/Util.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/netguard/Util.java b/app/src/main/java/eu/faircode/netguard/Util.java index 925598ae..5405574f 100644 --- a/app/src/main/java/eu/faircode/netguard/Util.java +++ b/app/src/main/java/eu/faircode/netguard/Util.java @@ -271,7 +271,7 @@ public class Util { public static List getDefaultDNS(Context context) { String dns1 = null; String dns2 = null; - if (android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.N) { + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) { ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); Network an = cm.getActiveNetwork(); if (an != null) {