Revise lockdown check in getLegacyVpnInfo()

Return null instead of raising exception in lockdown mode.

BUG=22749146

Change-Id: I0e9e3ded0d189e3fa9e872b7af9fe363799c85d6
This commit is contained in:
Hung-ying Tyan
2015-07-29 12:39:21 +08:00
parent f5a934b60c
commit dd494fb2f3

View File

@@ -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();
}