summaryrefslogtreecommitdiffstats
path: root/services/core
diff options
context:
space:
mode:
authorErik Kline <ek@google.com>2015-10-14 17:37:57 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-10-14 17:37:57 +0000
commitb7e722b88fab8b67f8a2ef54a7acb8c6672b6f46 (patch)
tree9e02dbbf12fa261572d974049b37cbc78edc7733 /services/core
parent7013f0c8f2adcc14acd052f4066827ad31f17195 (diff)
parent9b23f885525b38f0042b315e8254ea663e433ad8 (diff)
downloadframeworks_base-b7e722b88fab8b67f8a2ef54a7acb8c6672b6f46.zip
frameworks_base-b7e722b88fab8b67f8a2ef54a7acb8c6672b6f46.tar.gz
frameworks_base-b7e722b88fab8b67f8a2ef54a7acb8c6672b6f46.tar.bz2
Merge "Don't crash if an invalid always-on VPN profile is configured." into mnc-dr-dev
Diffstat (limited to 'services/core')
-rw-r--r--services/core/java/com/android/server/ConnectivityService.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 77837b7..4c03143 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -3212,6 +3212,11 @@ public class ConnectivityService extends IConnectivityManager.Stub
final String profileName = new String(mKeyStore.get(Credentials.LOCKDOWN_VPN));
final VpnProfile profile = VpnProfile.decode(
profileName, mKeyStore.get(Credentials.VPN + profileName));
+ if (profile == null) {
+ Slog.e(TAG, "Lockdown VPN configured invalid profile " + profileName);
+ setLockdownTracker(null);
+ return true;
+ }
int user = UserHandle.getUserId(Binder.getCallingUid());
synchronized(mVpns) {
setLockdownTracker(new LockdownVpnTracker(mContext, mNetd, this, mVpns.get(user),