Merge "Revert "Second pass tying into dns cache per interface""

This commit is contained in:
Robert Greenwalt
2013-01-19 00:35:48 +00:00
committed by Android (Google) Code Review
3 changed files with 115 additions and 80 deletions

View File

@@ -1468,32 +1468,6 @@ public class NetworkManagementService extends INetworkManagementService.Stub
}
@Override
public void setDnsIfaceForPid(String iface, int pid) throws IllegalStateException {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
try {
String cmd = "resolver setifaceforpid " + iface + " " + pid;
mConnector.execute(cmd);
} catch (NativeDaemonConnectorException e) {
throw new IllegalStateException(
"Error communicating with native deamon to set interface for pid" + iface, e);
}
}
@Override
public void clearDnsIfaceForPid(int pid) throws IllegalStateException {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
try {
String cmd = "resolver clearifaceforpid " + pid;
mConnector.execute(cmd);
} catch (NativeDaemonConnectorException e) {
throw new IllegalStateException(
"Error communicating with native deamon to clear interface for pid " + pid, e);
}
}
/** {@inheritDoc} */
public void monitor() {
if (mConnector != null) {
mConnector.monitor();