summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/ConnectivityService.java
diff options
context:
space:
mode:
authorChad Brubaker <cbrubaker@google.com>2013-07-16 18:59:12 -0700
committerChad Brubaker <cbrubaker@google.com>2013-07-16 18:59:12 -0700
commitbf6ff2c025405a3af496fe558dfc4468a9b45cc8 (patch)
tree0a2ab3144251b9d9b6b60ae2b7c149c88e563222 /services/java/com/android/server/ConnectivityService.java
parentd1c87546b37658fbc38cb33504cc726a07e0c4ea (diff)
Support multiple Vpn ManageDialogs
Move away from storing the configs in the Intent to prevent issues with PendingIntents and multiple configs. The Dialog now queries ConnectivityService for the configuration to display in the management dialog. Change-Id: I0e0ef52db840152914d117a24f776d8106e836ff
Diffstat (limited to 'services/java/com/android/server/ConnectivityService.java')
-rw-r--r--services/java/com/android/server/ConnectivityService.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index 476a6fdffb1a..3a4b7e382f57 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -3426,6 +3426,20 @@ public class ConnectivityService extends IConnectivityManager.Stub {
}
/**
+ * Returns the information of the ongoing VPN. This method is used by VpnDialogs and
+ * not available in ConnectivityManager.
+ * Permissions are checked in Vpn class.
+ * @hide
+ */
+ @Override
+ public VpnConfig getVpnConfig() {
+ int user = UserHandle.getUserId(Binder.getCallingUid());
+ synchronized(mVpns) {
+ return mVpns.get(user).getVpnConfig();
+ }
+ }
+
+ /**
* Callback for VPN subsystem. Currently VPN is not adapted to the service
* through NetworkStateTracker since it works differently. For example, it
* needs to override DNS servers but never takes the default routes. It