summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorRobin Lee <rgl@google.com>2015-06-01 10:57:03 -0700
committerRobin Lee <rgl@google.com>2015-06-09 12:04:23 -0700
commit472834518e2d23172189ee34e98c51f868628a90 (patch)
treecb940c66743d5e93e6f0ee36a44e4f84783f7b0d /services
parent8836528d7bc86742c973200f861328b3f9cbd421 (diff)
downloadframeworks_base-472834518e2d23172189ee34e98c51f868628a90.zip
frameworks_base-472834518e2d23172189ee34e98c51f868628a90.tar.gz
frameworks_base-472834518e2d23172189ee34e98c51f868628a90.tar.bz2
Switch over to updated VPN warning strings
These are more consistent and have placeholders for the description of whatever VPN apps are actually active. Bug: 20516964 Bug: 17474682 Change-Id: I37ff287b795f10bbbb192540f09f8100bb27b1a0
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/ConnectivityService.java19
1 files changed, 16 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 44d00d7..b64a200 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -2994,7 +2994,12 @@ public class ConnectivityService extends IConnectivityManager.Stub
throwIfLockdownEnabled();
synchronized(mVpns) {
- return mVpns.get(userId).prepare(oldPackage, newPackage);
+ Vpn vpn = mVpns.get(userId);
+ if (vpn != null) {
+ return vpn.prepare(oldPackage, newPackage);
+ } else {
+ return false;
+ }
}
}
@@ -3016,7 +3021,10 @@ public class ConnectivityService extends IConnectivityManager.Stub
enforceCrossUserPermission(userId);
synchronized(mVpns) {
- mVpns.get(userId).setPackageAuthorization(packageName, authorized);
+ Vpn vpn = mVpns.get(userId);
+ if (vpn != null) {
+ vpn.setPackageAuthorization(packageName, authorized);
+ }
}
}
@@ -3127,7 +3135,12 @@ public class ConnectivityService extends IConnectivityManager.Stub
public VpnConfig getVpnConfig(int userId) {
enforceCrossUserPermission(userId);
synchronized(mVpns) {
- return mVpns.get(userId).getVpnConfig();
+ Vpn vpn = mVpns.get(userId);
+ if (vpn != null) {
+ return vpn.getVpnConfig();
+ } else {
+ return null;
+ }
}
}