Loading core/java/android/app/ContextImpl.java +1 −2 Original line number Diff line number Diff line Loading @@ -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() { Loading core/java/android/net/ConnectivityManager.java +3 −30 Original line number Diff line number Diff line Loading @@ -543,8 +543,6 @@ public class ConnectivityManager { private final IConnectivityManager mService; private final String mPackageName; private INetworkManagementService mNMService; /** Loading Loading @@ -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. Loading Loading @@ -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)); } /** Loading @@ -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; } Loading Loading @@ -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} */ Loading core/java/android/net/IConnectivityManager.aidl +1 −3 Original line number Diff line number Diff line Loading @@ -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); Loading core/java/android/net/NetworkUtils.java +0 −6 Original line number Diff line number Diff line Loading @@ -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; Loading core/java/android/os/INetworkManagementService.aidl +0 −18 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); Loading @@ -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 */ Loading Loading @@ -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 Loading
core/java/android/app/ContextImpl.java +1 −2 Original line number Diff line number Diff line Loading @@ -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() { Loading
core/java/android/net/ConnectivityManager.java +3 −30 Original line number Diff line number Diff line Loading @@ -543,8 +543,6 @@ public class ConnectivityManager { private final IConnectivityManager mService; private final String mPackageName; private INetworkManagementService mNMService; /** Loading Loading @@ -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. Loading Loading @@ -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)); } /** Loading @@ -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; } Loading Loading @@ -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} */ Loading
core/java/android/net/IConnectivityManager.aidl +1 −3 Original line number Diff line number Diff line Loading @@ -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); Loading
core/java/android/net/NetworkUtils.java +0 −6 Original line number Diff line number Diff line Loading @@ -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; Loading
core/java/android/os/INetworkManagementService.aidl +0 −18 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); Loading @@ -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 */ Loading Loading @@ -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