Use Netd's binder interface to set resolver configuration.

BUG: 25731675
Change-Id: I86257bc84371832466161e5357ae173c305a7d18
This commit is contained in:
Pierre Imai
2016-04-28 17:00:04 +09:00
parent 40d1fb87a4
commit 2166469c85

View File

@@ -4255,10 +4255,10 @@ public class ConnectivityService extends IConnectivityManager.Stub
Collection<InetAddress> dnses = newLp.getDnsServers();
if (DBG) log("Setting DNS servers for network " + netId + " to " + dnses);
try {
mNetd.setDnsServersForNetwork(
mNetd.setDnsConfigurationForNetwork(
netId, NetworkUtils.makeStrings(dnses), newLp.getDomains());
} catch (Exception e) {
loge("Exception in setDnsServersForNetwork: " + e);
loge("Exception in setDnsConfigurationForNetwork: " + e);
}
final NetworkAgentInfo defaultNai = getDefaultNetwork();
if (defaultNai != null && defaultNai.network.netId == netId) {