Removed Throttle Manager as obsolete

Change-Id: I63e8514f34c880d0badaab33a347f54a80c84da6
This commit is contained in:
Sasha Levitskiy
2013-01-14 16:59:33 -08:00
parent 707a71e39e
commit ca6486e7f5
10 changed files with 0 additions and 1863 deletions

View File

@@ -1344,49 +1344,6 @@ public class NetworkManagementService extends INetworkManagementService.Stub
}
}
@Override
public void setInterfaceThrottle(String iface, int rxKbps, int txKbps) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
try {
mConnector.execute("interface", "setthrottle", iface, rxKbps, txKbps);
} catch (NativeDaemonConnectorException e) {
throw e.rethrowAsParcelableException();
}
}
private int getInterfaceThrottle(String iface, boolean rx) {
final NativeDaemonEvent event;
try {
event = mConnector.execute("interface", "getthrottle", iface, rx ? "rx" : "tx");
} catch (NativeDaemonConnectorException e) {
throw e.rethrowAsParcelableException();
}
if (rx) {
event.checkCode(InterfaceRxThrottleResult);
} else {
event.checkCode(InterfaceTxThrottleResult);
}
try {
return Integer.parseInt(event.getMessage());
} catch (NumberFormatException e) {
throw new IllegalStateException("unexpected response:" + event);
}
}
@Override
public int getInterfaceRxThrottle(String iface) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
return getInterfaceThrottle(iface, true);
}
@Override
public int getInterfaceTxThrottle(String iface) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
return getInterfaceThrottle(iface, false);
}
@Override
public void setDefaultInterfaceForDns(String iface) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);