diff options
Diffstat (limited to 'core/java/android')
-rw-r--r-- | core/java/android/net/ConnectivityManager.java | 16 | ||||
-rw-r--r-- | core/java/android/os/INetworkManagementService.aidl | 12 |
2 files changed, 28 insertions, 0 deletions
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java index f920874..8bbe6c8 100644 --- a/core/java/android/net/ConnectivityManager.java +++ b/core/java/android/net/ConnectivityManager.java @@ -480,6 +480,22 @@ 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: + 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. * Note that this made sense when we only had 2 network types, diff --git a/core/java/android/os/INetworkManagementService.aidl b/core/java/android/os/INetworkManagementService.aidl index 51c367a..ed9620f 100644 --- a/core/java/android/os/INetworkManagementService.aidl +++ b/core/java/android/os/INetworkManagementService.aidl @@ -19,6 +19,7 @@ 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.wifi.WifiConfiguration; @@ -388,6 +389,17 @@ interface INetworkManagementService void clearMarkedForwardingRoute(String iface, in RouteInfo route); /** + * 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); + + /** * Set a process (pid) to use the name servers associated with the specified interface. */ void setDnsInterfaceForPid(String iface, int pid); |