Merge "Delete unused APIs in NetworkManagementService."

This commit is contained in:
Sreeram Ramachandran
2014-07-11 22:53:22 +00:00
committed by Android (Google) Code Review
2 changed files with 0 additions and 52 deletions

View File

@@ -340,21 +340,6 @@ interface INetworkManagementService
*/
int getMarkForUid(int uid);
/**
* Get the SO_MARK associated with protecting packets from VPN routing rules
*/
int getMarkForProtect();
/**
* Route all traffic in {@code route} to {@code iface} setup for marked forwarding
*/
void setMarkedForwardingRoute(String iface, in RouteInfo route);
/**
* Clear routes set by {@link setMarkedForwardingRoute}
*/
void clearMarkedForwardingRoute(String iface, in RouteInfo route);
/**
* Exempts {@code host} from the routing set up by {@link setMarkedForwardingRoute}
* All connects to {@code host} will use the global routing table

View File

@@ -1762,43 +1762,6 @@ public class NetworkManagementService extends INetworkManagementService.Stub
return Integer.parseInt(event.getMessage());
}
@Override
public int getMarkForProtect() {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
final NativeDaemonEvent event;
try {
event = mConnector.execute("interface", "fwmark", "get", "protect");
} catch (NativeDaemonConnectorException e) {
throw e.rethrowAsParcelableException();
}
event.checkCode(GetMarkResult);
return Integer.parseInt(event.getMessage());
}
@Override
public void setMarkedForwardingRoute(String iface, RouteInfo route) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
try {
LinkAddress dest = route.getDestinationLinkAddress();
mConnector.execute("interface", "fwmark", "route", "add", iface,
dest.getAddress().getHostAddress(), dest.getPrefixLength());
} catch (NativeDaemonConnectorException e) {
throw e.rethrowAsParcelableException();
}
}
@Override
public void clearMarkedForwardingRoute(String iface, RouteInfo route) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
try {
LinkAddress dest = route.getDestinationLinkAddress();
mConnector.execute("interface", "fwmark", "route", "remove", iface,
dest.getAddress().getHostAddress(), dest.getPrefixLength());
} catch (NativeDaemonConnectorException e) {
throw e.rethrowAsParcelableException();
}
}
@Override
public void setHostExemption(LinkAddress host) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);