Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d0aaa06 authored by frank PREEL's avatar frank PREEL Committed by Alexandre Roux
Browse files

Err

Change-Id: I6d2e0955d33c41f063ee93a8e189178432d3de4c
parent 71697738
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -307,12 +307,15 @@ public class DnsManager {
    public void setDnsConfigurationForNetwork(
            int netId, LinkProperties lp, boolean isDefaultNetwork) {

        int useNwDNS = android.provider.Settings.System.getInt(mContext.getContentResolver(), "USE_NETWORK_DNS", 1);
        Slog.d(TAG, "useNwDNS>"+useNwDNS+"<");

        if ( 0 != useNwDNS ) {}
        else {
            try {
                String s = android.provider.Settings.System.getString(mContext.getContentResolver(), "OVERRIDE_DNS_IP_V4");
                if (s == null) s = "9.9.9.9";
                if (DBG) log("Override dnses>"+s+"<");
                Slog.d(TAG, "Override dnses>"+s+"<");

                //InetAddress addr = InetAddress.getByName(s);
                //dnses.add(addr);
@@ -324,16 +327,10 @@ public class DnsManager {
                lp.setDnsServers((Collection<InetAddress>) _list);

            } catch (Exception e) {
                loge("Cannot set custom DNS: " + e);
                Slog.d(TAG,"Cannot set custom DNS: " + e);
            }
        }


        int useNwDNS = android.provider.Settings.System.getInt(mContext.getContentResolver(), "USE_NETWORK_DNS", 1);
        if (DBG) log("useNwDNS>"+useNwDNS+"<");



        updateParametersSettings();
        final ResolverParamsParcel paramsParcel = new ResolverParamsParcel();