summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHung-ying Tyan <tyanh@google.com>2015-07-29 12:39:21 +0800
committerHung-ying Tyan <tyanh@google.com>2015-07-30 10:52:25 +0800
commit44c8c5ccaf1dfb5e059732c05e00e6891cb65f71 (patch)
treeb4fbd69144a11fa00adbf509b1898677836211b8
parentb8040265dd0d5a2a96e0850623647dad2f528db1 (diff)
downloadframeworks_base-44c8c5ccaf1dfb5e059732c05e00e6891cb65f71.zip
frameworks_base-44c8c5ccaf1dfb5e059732c05e00e6891cb65f71.tar.gz
frameworks_base-44c8c5ccaf1dfb5e059732c05e00e6891cb65f71.tar.bz2
Revise lockdown check in getLegacyVpnInfo()
Return null instead of raising exception in lockdown mode. BUG=22749146 Change-Id: I0e9e3ded0d189e3fa9e872b7af9fe363799c85d6
-rw-r--r--services/core/java/com/android/server/ConnectivityService.java5
1 files changed, 4 insertions, 1 deletions
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();
}