Use Netd's binder interface to set resolver configuration.
BUG: 25731675 Change-Id: I86257bc84371832466161e5357ae173c305a7d18
This commit is contained in:
@@ -4255,10 +4255,10 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
Collection<InetAddress> dnses = newLp.getDnsServers();
|
Collection<InetAddress> dnses = newLp.getDnsServers();
|
||||||
if (DBG) log("Setting DNS servers for network " + netId + " to " + dnses);
|
if (DBG) log("Setting DNS servers for network " + netId + " to " + dnses);
|
||||||
try {
|
try {
|
||||||
mNetd.setDnsServersForNetwork(
|
mNetd.setDnsConfigurationForNetwork(
|
||||||
netId, NetworkUtils.makeStrings(dnses), newLp.getDomains());
|
netId, NetworkUtils.makeStrings(dnses), newLp.getDomains());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
loge("Exception in setDnsServersForNetwork: " + e);
|
loge("Exception in setDnsConfigurationForNetwork: " + e);
|
||||||
}
|
}
|
||||||
final NetworkAgentInfo defaultNai = getDefaultNetwork();
|
final NetworkAgentInfo defaultNai = getDefaultNetwork();
|
||||||
if (defaultNai != null && defaultNai.network.netId == netId) {
|
if (defaultNai != null && defaultNai.network.netId == netId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user