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

Commit b5bb9046 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Remove unsupported NetworkManagement AIDL methods" into main am: 4af925ff

parents 4c1c8684 4af925ff
Loading
Loading
Loading
Loading
+0 −86
Original line number Diff line number Diff line
@@ -109,92 +109,6 @@ interface INetworkManagementService
    @EnforcePermission("SHUTDOWN")
    void shutdown();

    /**
     ** TETHERING RELATED
     **/

    /**
     * Returns true if IP forwarding is enabled
     */
    @UnsupportedAppUsage(maxTargetSdk = 34, trackingBug = 170729553,
            publicAlternatives = "Use {@code android.net.INetd#ipfwdEnabled}")
    boolean getIpForwardingEnabled();

    /**
     * Enables/Disables IP Forwarding
     */
    @UnsupportedAppUsage(maxTargetSdk = 34, trackingBug = 170729553,
            publicAlternatives = "Avoid using this directly. Instead, enable tethering with "
            + "{@code android.net.TetheringManager#startTethering}. See also "
            + "{@code INetd#ipfwdEnableForwarding(String)}.")
    void setIpForwardingEnabled(boolean enabled);

    /**
     * Start tethering services with the specified dhcp server range
     * arg is a set of start end pairs defining the ranges.
     */
    @UnsupportedAppUsage(maxTargetSdk = 34, trackingBug = 170729553,
            publicAlternatives = "{@code android.net.TetheringManager#startTethering}")
    void startTethering(in String[] dhcpRanges);

    /**
     * Stop currently running tethering services
     */
    @UnsupportedAppUsage(maxTargetSdk = 34, trackingBug = 170729553,
            publicAlternatives = "{@code android.net.TetheringManager#stopTethering(int)}")
    void stopTethering();

    /**
     * Returns true if tethering services are started
     */
    @UnsupportedAppUsage(maxTargetSdk = 34, trackingBug = 170729553,
            publicAlternatives = "Generally track your own tethering requests. "
            + "See also {@code android.net.INetd#tetherIsEnabled()}")
    boolean isTetheringStarted();

    /**
     * Tethers the specified interface
     */
    @UnsupportedAppUsage(maxTargetSdk = 34, trackingBug = 170729553,
            publicAlternatives = "Avoid using this directly. Instead, enable tethering with "
            + "{@code android.net.TetheringManager#startTethering}. See also "
            + "{@code com.android.net.module.util.NetdUtils#tetherInterface}.")
    void tetherInterface(String iface);

    /**
     * Untethers the specified interface
     */
    @UnsupportedAppUsage(maxTargetSdk = 34, trackingBug = 170729553,
            publicAlternatives = "Avoid using this directly. Instead, disable "
            + "tethering with {@code android.net.TetheringManager#stopTethering(int)}. "
            + "See also {@code NetdUtils#untetherInterface}.")
    void untetherInterface(String iface);

    /**
     * Returns a list of currently tethered interfaces
     */
    @UnsupportedAppUsage(maxTargetSdk = 34, trackingBug = 170729553,
            publicAlternatives = "{@code android.net.TetheringManager#getTetheredIfaces()}")
    String[] listTetheredInterfaces();

    /**
     *  Enables Network Address Translation between two interfaces.
     *  The address and netmask of the external interface is used for
     *  the NAT'ed network.
     */
    @UnsupportedAppUsage(maxTargetSdk = 34, trackingBug = 170729553,
            publicAlternatives = "Avoid using this directly. Instead, enable tethering with "
            + "{@code android.net.TetheringManager#startTethering}.")
    void enableNat(String internalInterface, String externalInterface);

    /**
     *  Disables Network Address Translation between two interfaces.
     */
    @UnsupportedAppUsage(maxTargetSdk = 34, trackingBug = 170729553,
            publicAlternatives = "Avoid using this directly. Instead, disable tethering with "
            + "{@code android.net.TetheringManager#stopTethering(int)}.")
    void disableNat(String internalInterface, String externalInterface);

    /**
     ** DATA USAGE RELATED
     **/
+0 −60
Original line number Diff line number Diff line
@@ -830,66 +830,6 @@ public class NetworkManagementService extends INetworkManagementService.Stub {
        Slog.i(TAG, "Shutting down");
    }

    @Override
    public boolean getIpForwardingEnabled() throws IllegalStateException{
        PermissionUtils.enforceNetworkStackPermission(mContext);
        throw new UnsupportedOperationException("NMS#getIpForwardingEnabled not supported in V+");
    }

    @Override
    public void setIpForwardingEnabled(boolean enable) {
        PermissionUtils.enforceNetworkStackPermission(mContext);
        throw new UnsupportedOperationException("NMS#setIpForwardingEnabled not supported in V+");
    }

    @Override
    public void startTethering(String[] dhcpRange) {
        PermissionUtils.enforceNetworkStackPermission(mContext);
        throw new UnsupportedOperationException("NMS#startTethering not supported in V+");
    }

    @Override
    public void stopTethering() {
        PermissionUtils.enforceNetworkStackPermission(mContext);
        throw new UnsupportedOperationException("NMS#stopTethering not supported in V+");
    }

    @Override
    public boolean isTetheringStarted() {
        PermissionUtils.enforceNetworkStackPermission(mContext);
        throw new UnsupportedOperationException("NMS#isTetheringStarted not supported in V+");
    }

    @Override
    public void tetherInterface(String iface) {
        PermissionUtils.enforceNetworkStackPermission(mContext);
        throw new UnsupportedOperationException("NMS#tetherInterface not supported in V+");
    }

    @Override
    public void untetherInterface(String iface) {
        PermissionUtils.enforceNetworkStackPermission(mContext);
        throw new UnsupportedOperationException("NMS#untetherInterface not supported in V+");
    }

    @Override
    public String[] listTetheredInterfaces() {
        PermissionUtils.enforceNetworkStackPermission(mContext);
        throw new UnsupportedOperationException("NMS#listTetheredInterfaces not supported in V+");
    }

    @Override
    public void enableNat(String internalInterface, String externalInterface) {
        PermissionUtils.enforceNetworkStackPermission(mContext);
        throw new UnsupportedOperationException("NMS#enableNat not supported in V+");
    }

    @Override
    public void disableNat(String internalInterface, String externalInterface) {
        PermissionUtils.enforceNetworkStackPermission(mContext);
        throw new UnsupportedOperationException("NMS#disableNat not supported in V+");
    }

    @Override
    public void setInterfaceQuota(String iface, long quotaBytes) {
        PermissionUtils.enforceNetworkStackPermission(mContext);