Merge "Delete unused APIs in NetworkManagementService."
This commit is contained in:
committed by
Android (Google) Code Review
commit
c344f9b800
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user