From f336d722c773855402d91a227fc290eafca23335 Mon Sep 17 00:00:00 2001 From: Chad Brubaker Date: Mon, 15 Jul 2013 16:34:04 -0700 Subject: Fix supplimentary network connections with VPNs Enables the use of supplimentary mobile networks like MMS, and HIPRI while VPNs are running. Change-Id: I313f57a905b4e16bd4322c68687cbff1cfbe9d3e --- core/java/android/net/ConnectivityManager.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'core/java/android/net') 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, -- cgit v1.1