am 12ebde61: am 692329cf: am fd998a0c: Merge "NetworkManagementService: Remove \'maxkbs\' parameter from throttle API" into froyo
This commit is contained in:
@@ -193,7 +193,7 @@ interface INetworkManagementService
|
|||||||
/**
|
/**
|
||||||
* Configures bandwidth throttling on an interface
|
* Configures bandwidth throttling on an interface
|
||||||
*/
|
*/
|
||||||
void setInterfaceThrottle(String iface, int maxKbits, int rxKbps, int txKbps);
|
void setInterfaceThrottle(String iface, int rxKbps, int txKbps);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the currently configured RX throttle values
|
* Returns the currently configured RX throttle values
|
||||||
|
|||||||
@@ -564,11 +564,11 @@ class NetworkManagementService extends INetworkManagementService.Stub {
|
|||||||
return getInterfaceCounter(iface, false);
|
return getInterfaceCounter(iface, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setInterfaceThrottle(String iface, int maxKbps, int rxKbps, int txKbps) {
|
public void setInterfaceThrottle(String iface, int rxKbps, int txKbps) {
|
||||||
mContext.enforceCallingOrSelfPermission(
|
mContext.enforceCallingOrSelfPermission(
|
||||||
android.Manifest.permission.CHANGE_NETWORK_STATE, "NetworkManagementService");
|
android.Manifest.permission.CHANGE_NETWORK_STATE, "NetworkManagementService");
|
||||||
mConnector.doCommand(String.format(
|
mConnector.doCommand(String.format(
|
||||||
"interface setthrottle %s %d %d %d", iface, maxKbps, rxKbps, txKbps));
|
"interface setthrottle %s %d %d", iface, rxKbps, txKbps));
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getInterfaceThrottle(String iface, boolean rx) {
|
private int getInterfaceThrottle(String iface, boolean rx) {
|
||||||
|
|||||||
Reference in New Issue
Block a user