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

Commit f3b8a45f authored by Robin Lee's avatar Robin Lee
Browse files

Remove unused network management RPCs

These were previously used for legacy VPN network lockdown, but they
aren't any more, so we don't need them any more.

Test: make -j30 full # still builds
Bug: 33159037
Change-Id: I03ab248a52dd7aed29fc049622aeb4dbca1e86ae
parent c3736bc1
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -315,8 +315,6 @@ interface INetworkManagementService
    void setFirewallEnabled(boolean enabled);
    boolean isFirewallEnabled();
    void setFirewallInterfaceRule(String iface, boolean allow);
    void setFirewallEgressSourceRule(String addr, boolean allow);
    void setFirewallEgressDestRule(String addr, int port, boolean allow);
    void setFirewallUidRule(int chain, int uid, int rule);
    void setFirewallUidRules(int chain, in int[] uids, in int[] rules);
    void setFirewallChainEnabled(int chain, boolean enable);
+0 −24
Original line number Diff line number Diff line
@@ -1896,30 +1896,6 @@ public class NetworkManagementService extends INetworkManagementService.Stub
        }
    }

    @Override
    public void setFirewallEgressSourceRule(String addr, boolean allow) {
        enforceSystemUid();
        Preconditions.checkState(mFirewallEnabled);
        final String rule = allow ? "allow" : "deny";
        try {
            mConnector.execute("firewall", "set_egress_source_rule", addr, rule);
        } catch (NativeDaemonConnectorException e) {
            throw e.rethrowAsParcelableException();
        }
    }

    @Override
    public void setFirewallEgressDestRule(String addr, int port, boolean allow) {
        enforceSystemUid();
        Preconditions.checkState(mFirewallEnabled);
        final String rule = allow ? "allow" : "deny";
        try {
            mConnector.execute("firewall", "set_egress_dest_rule", addr, port, rule);
        } catch (NativeDaemonConnectorException e) {
            throw e.rethrowAsParcelableException();
        }
    }

    private void closeSocketsForFirewallChainLocked(int chain, String chainName) {
        // UID ranges to close sockets on.
        UidRange[] ranges;