Reintroduce the net.dns system properties <TEMP>
Removing these properties broke video playback as they used a custom dns resolver. We'll work together to resolve our resolver issues in the future, but this was the easy fix to get things working again. bug:8173236 Change-Id: I687dae59eda4fc449efc34eed11c3dc88a110ad0
This commit is contained in:
committed by
The Android Automerger
parent
01495af669
commit
3874bd4930
@@ -200,6 +200,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
||||
private int mDefaultConnectionSequence = 0;
|
||||
|
||||
private Object mDnsLock = new Object();
|
||||
private int mNumDnsEntries;
|
||||
private boolean mDnsOverridden = false;
|
||||
|
||||
private boolean mTestMode;
|
||||
@@ -2479,6 +2480,17 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
||||
try {
|
||||
mNetd.setDnsServersForInterface(iface, NetworkUtils.makeStrings(dnses), domains);
|
||||
mNetd.setDefaultInterfaceForDns(iface);
|
||||
for (InetAddress dns : dnses) {
|
||||
++last;
|
||||
String key = "net.dns" + last;
|
||||
String value = dns.getHostAddress();
|
||||
SystemProperties.set(key, value);
|
||||
}
|
||||
for (int i = last + 1; i <= mNumDnsEntries; ++i) {
|
||||
String key = "net.dns" + i;
|
||||
SystemProperties.set(key, "");
|
||||
}
|
||||
mNumDnsEntries = last;
|
||||
} catch (Exception e) {
|
||||
if (DBG) loge("exception setting default dns interface: " + e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user