Merge "Update netd API."
diff --git a/core/java/android/os/INetworkManagementService.aidl b/core/java/android/os/INetworkManagementService.aidl
index bdc520e..db9bebf 100644
--- a/core/java/android/os/INetworkManagementService.aidl
+++ b/core/java/android/os/INetworkManagementService.aidl
@@ -431,16 +431,13 @@
*/
void removeNetwork(int netId);
- void addDnsServersForNetId(int netId, in String[] servers, in String domains);
- void removeDnsServersForNetId(int netId, in String[] servers, in String domains);
-
void addRouteForNetId(int netId, in RouteInfo routeInfo);
void removeRouteForNetId(int netId, in RouteInfo routeInfo);
void addLegacyRouteForNetId(int netId, in RouteInfo routeInfo, int uid);
void removeLegacyRouteForNetId(int netId, in RouteInfo routeInfo, int uid);
- void setDefaultNetId(int netId, boolean resetOldSockets);
+ void setDefaultNetId(int netId);
void clearDefaultNetId();
void setPermission(boolean internal, boolean changeNetState, in int[] uids);
diff --git a/services/core/java/com/android/server/NetworkManagementService.java b/services/core/java/com/android/server/NetworkManagementService.java
index 7a155a2..24af6b6 100644
--- a/services/core/java/com/android/server/NetworkManagementService.java
+++ b/services/core/java/com/android/server/NetworkManagementService.java
@@ -1972,34 +1972,6 @@
}
@Override
- public void addDnsServersForNetId(int netId, String[] servers, String domains) {
- modifyDnsServersForNetId(netId, servers, domains, ADD);
- }
-
- @Override
- public void removeDnsServersForNetId(int netId, String[] servers,
- String domains) {
- modifyDnsServersForNetId(netId, servers, domains, REMOVE);
- }
-
- private void modifyDnsServersForNetId(int netId, String[] servers,
- String domains, String action) {
- mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
-
- final Command cmd = new Command("network", "dns", action, netId, servers.length);
- for(int i=0; i<servers.length; i++) {
- cmd.appendArg(servers[i]);
- }
- cmd.appendArg((domains == null ? "" : domains));
-
- try {
- mConnector.execute(cmd);
- } catch (NativeDaemonConnectorException e) {
- throw e.rethrowAsParcelableException();
- }
- }
-
- @Override
public void addRouteForNetId(int netId, RouteInfo routeInfo) {
modifyRouteForNetId(netId, routeInfo, ADD);
}
@@ -2058,11 +2030,11 @@
}
@Override
- public void setDefaultNetId(int netId, boolean resetOldSockets) {
+ public void setDefaultNetId(int netId) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
try {
- mConnector.execute("network", "default", "set", netId, resetOldSockets);
+ mConnector.execute("network", "default", "set", netId);
} catch (NativeDaemonConnectorException e) {
throw e.rethrowAsParcelableException();
}