diff options
author | Geremy Condra <gcondra@google.com> | 2013-07-23 17:58:33 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-07-23 17:58:33 +0000 |
commit | 5830e0752121c5565da184727888de6567b50e3a (patch) | |
tree | b7b328c2648483675bbb6b55870f88ab9c214df0 /core/java/android | |
parent | 1b6868cc4b8455e8660ba35ccdcc34abbaa43ffa (diff) | |
parent | f336d722c773855402d91a227fc290eafca23335 (diff) | |
download | frameworks_base-5830e0752121c5565da184727888de6567b50e3a.zip frameworks_base-5830e0752121c5565da184727888de6567b50e3a.tar.gz frameworks_base-5830e0752121c5565da184727888de6567b50e3a.tar.bz2 |
Merge "Fix supplimentary network connections with VPNs"
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); |