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

Commit f82be84e authored by frank PREEL's avatar frank PREEL Committed by Romain Hunault
Browse files

Err

parent afe94249
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -356,12 +356,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);
@@ -373,19 +376,13 @@ 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);
            }
        }

        final String[] assignedServers = NetworkUtils.makeStrings(lp.getDnsServers());
        final String[] domainStrs = getDomainStrings(lp.getDomains());


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



        updateParametersSettings();
        final int[] params = { mSampleValidity, mSuccessThreshold, mMinSamples, mMaxSamples };