From 44c8c5ccaf1dfb5e059732c05e00e6891cb65f71 Mon Sep 17 00:00:00 2001 From: Hung-ying Tyan Date: Wed, 29 Jul 2015 12:39:21 +0800 Subject: Revise lockdown check in getLegacyVpnInfo() Return null instead of raising exception in lockdown mode. BUG=22749146 Change-Id: I0e9e3ded0d189e3fa9e872b7af9fe363799c85d6 --- services/core/java/com/android/server/ConnectivityService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index 76d2258..a79e5b1 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -3048,7 +3048,10 @@ public class ConnectivityService extends IConnectivityManager.Stub @Override public LegacyVpnInfo getLegacyVpnInfo(int userId) { enforceCrossUserPermission(userId); - throwIfLockdownEnabled(); + if (mLockdownEnabled) { + return null; + } + synchronized(mVpns) { return mVpns.get(userId).getLegacyVpnInfo(); } -- cgit v1.1