Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0db6e18 authored by San Mehat's avatar San Mehat
Browse files

NetworkManagementService: Remove 'maxkbs' parameter from throttle API



Change-Id: I1cfbdac7d06478243931c6acec462da8e257f42f
Signed-off-by: default avatarSan Mehat <san@google.com>
parent c93386ce
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@ interface INetworkManagementService
    /**
     * 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
+2 −2
Original line number Diff line number Diff line
@@ -564,11 +564,11 @@ class NetworkManagementService extends INetworkManagementService.Stub {
        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(
                android.Manifest.permission.CHANGE_NETWORK_STATE, "NetworkManagementService");
        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) {