diff options
| author | San Mehat <san@google.com> | 2010-04-02 11:50:05 -0700 |
|---|---|---|
| committer | San Mehat <san@google.com> | 2010-04-02 11:50:27 -0700 |
| commit | be23fba286e6772f2eb37ef25f252d7a73ef9dce (patch) | |
| tree | e624a43a92069d16a4dc0b7ab02a2509044c7ec5 /services/java/com/android/server/NetworkManagementService.java | |
| parent | c1548e3819ab4662e6b5f5455f95258b37dc7192 (diff) | |
NetworkManagementService: Combine setInterfaceRx/Tx throttle and add max speed
Change-Id: I1d6816c9754801504a988802118a2167e0eb8690
Signed-off-by: San Mehat <san@google.com>
Diffstat (limited to 'services/java/com/android/server/NetworkManagementService.java')
| -rw-r--r-- | services/java/com/android/server/NetworkManagementService.java | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/services/java/com/android/server/NetworkManagementService.java b/services/java/com/android/server/NetworkManagementService.java index b7f617598f6b..6d16aed969a1 100644 --- a/services/java/com/android/server/NetworkManagementService.java +++ b/services/java/com/android/server/NetworkManagementService.java @@ -564,19 +564,11 @@ class NetworkManagementService extends INetworkManagementService.Stub { return getInterfaceCounter(iface, false); } - private void setInterfaceThrottle(String iface, boolean rx, int kbps) { + public void setInterfaceThrottle(String iface, int maxKbps, int rxKbps, int txKbps) { mContext.enforceCallingOrSelfPermission( android.Manifest.permission.CHANGE_NETWORK_STATE, "NetworkManagementService"); mConnector.doCommand(String.format( - "interface setthrottle %s %s %d", iface, (rx ? "rx" : "tx"), kbps)); - } - - public void setInterfaceRxThrottle(String iface, int kbps) { - setInterfaceThrottle(iface, true, kbps); - } - - public void setInterfaceTxThrottle(String iface, int kbps) { - setInterfaceThrottle(iface, false, kbps); + "interface setthrottle %s %d %d %d", iface, maxKbps, rxKbps, txKbps)); } private int getInterfaceThrottle(String iface, boolean rx) { |
