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

Commit 71f6ad31 authored by Sreeram Ramachandran's avatar Sreeram Ramachandran Committed by Android (Google) Code Review
Browse files

Merge "Cleanup: Delete dead code." into lmp-dev

parents 403f095c 03666c70
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -413,8 +413,7 @@ class ContextImpl extends Context {
        registerService(CONNECTIVITY_SERVICE, new ServiceFetcher() {
                public Object createService(ContextImpl ctx) {
                    IBinder b = ServiceManager.getService(CONNECTIVITY_SERVICE);
                    return new ConnectivityManager(IConnectivityManager.Stub.asInterface(b),
                        ctx.getPackageName());
                    return new ConnectivityManager(IConnectivityManager.Stub.asInterface(b));
                }});

        registerService(COUNTRY_DETECTOR, new StaticServiceFetcher() {
+3 −30
Original line number Diff line number Diff line
@@ -543,8 +543,6 @@ public class ConnectivityManager {

    private final IConnectivityManager mService;

    private final String mPackageName;

    private INetworkManagementService mNMService;

    /**
@@ -645,23 +643,6 @@ public class ConnectivityManager {
        }
    }

    /**
     * Checks if the given network type should be exempt from VPN routing rules
     *
     * @hide
     */
    public static boolean isNetworkTypeExempt(int networkType) {
        switch (networkType) {
            case TYPE_MOBILE_MMS:
            case TYPE_MOBILE_SUPL:
            case TYPE_MOBILE_HIPRI:
            case TYPE_MOBILE_IA:
                return true;
            default:
                return false;
        }
    }

    /**
     * Specifies the preferred network type.  When the device has more
     * than one type available the preferred network type will be used.
@@ -1236,13 +1217,7 @@ public class ConnectivityManager {
     *             {@link #setProcessDefaultNetwork} and {@link Network#getSocketFactory} api.
     */
    public boolean requestRouteToHost(int networkType, int hostAddress) {
        InetAddress inetAddress = NetworkUtils.intToInetAddress(hostAddress);

        if (inetAddress == null) {
            return false;
        }

        return requestRouteToHostAddress(networkType, inetAddress);
        return requestRouteToHostAddress(networkType, NetworkUtils.intToInetAddress(hostAddress));
    }

    /**
@@ -1260,9 +1235,8 @@ public class ConnectivityManager {
     *             {@link #setProcessDefaultNetwork} api.
     */
    public boolean requestRouteToHostAddress(int networkType, InetAddress hostAddress) {
        byte[] address = hostAddress.getAddress();
        try {
            return mService.requestRouteToHostAddress(networkType, address, mPackageName);
            return mService.requestRouteToHostAddress(networkType, hostAddress.getAddress());
        } catch (RemoteException e) {
            return false;
        }
@@ -1433,9 +1407,8 @@ public class ConnectivityManager {
    /**
     * {@hide}
     */
    public ConnectivityManager(IConnectivityManager service, String packageName) {
    public ConnectivityManager(IConnectivityManager service) {
        mService = checkNotNull(service, "missing IConnectivityManager");
        mPackageName = checkNotNull(packageName, "missing package name");
    }

    /** {@hide} */
+1 −3
Original line number Diff line number Diff line
@@ -69,9 +69,7 @@ interface IConnectivityManager

    int stopUsingNetworkFeature(int networkType, in String feature);

    boolean requestRouteToHost(int networkType, int hostAddress, String packageName);

    boolean requestRouteToHostAddress(int networkType, in byte[] hostAddress, String packageName);
    boolean requestRouteToHostAddress(int networkType, in byte[] hostAddress);

    /** Policy control over specific {@link NetworkStateTracker}. */
    void setPolicyDataEnable(int networkType, boolean enabled);
+0 −6
Original line number Diff line number Diff line
@@ -36,12 +36,6 @@ public class NetworkUtils {

    private static final String TAG = "NetworkUtils";

    /** Bring the named network interface up. */
    public native static int enableInterface(String interfaceName);

    /** Bring the named network interface down. */
    public native static int disableInterface(String interfaceName);

    /** Setting bit 0 indicates reseting of IPv4 addresses required */
    public static final int RESET_IPV4_ADDRESSES = 0x01;

+0 −18
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ package android.os;

import android.net.InterfaceConfiguration;
import android.net.INetworkManagementEventObserver;
import android.net.LinkAddress;
import android.net.NetworkStats;
import android.net.RouteInfo;
import android.net.UidRange;
@@ -313,11 +312,6 @@ interface INetworkManagementService
     */
    void setDnsServersForNetwork(int netId, in String[] servers, String domains);

    /**
     * Flush the DNS cache associated with the specified network.
     */
    void flushNetworkDnsCache(int netId);

    void setFirewallEnabled(boolean enabled);
    boolean isFirewallEnabled();
    void setFirewallInterfaceRule(String iface, boolean allow);
@@ -335,17 +329,6 @@ interface INetworkManagementService
     */
    void removeVpnUidRanges(int netId, in UidRange[] ranges);

    /**
     * Exempts {@code host} from the routing set up by {@link setMarkedForwardingRoute}
     * All connects to {@code host} will use the global routing table
     */
    void setHostExemption(in LinkAddress host);

    /**
     * Clears an exemption set by {@link setHostExemption}
     */
    void clearHostExemption(in LinkAddress host);

    /**
     * Start the clatd (464xlat) service
     */
@@ -402,7 +385,6 @@ interface INetworkManagementService
    void removeInterfaceFromNetwork(String iface, int netId);

    void addLegacyRouteForNetId(int netId, in RouteInfo routeInfo, int uid);
    void removeLegacyRouteForNetId(int netId, in RouteInfo routeInfo, int uid);

    void setDefaultNetId(int netId);
    void clearDefaultNetId();
Loading