Revise lockdown check in getLegacyVpnInfo()
Return null instead of raising exception in lockdown mode. BUG=22749146 Change-Id: I0e9e3ded0d189e3fa9e872b7af9fe363799c85d6
This commit is contained in:
@@ -3048,7 +3048,10 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
@Override
|
@Override
|
||||||
public LegacyVpnInfo getLegacyVpnInfo(int userId) {
|
public LegacyVpnInfo getLegacyVpnInfo(int userId) {
|
||||||
enforceCrossUserPermission(userId);
|
enforceCrossUserPermission(userId);
|
||||||
throwIfLockdownEnabled();
|
if (mLockdownEnabled) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
synchronized(mVpns) {
|
synchronized(mVpns) {
|
||||||
return mVpns.get(userId).getLegacyVpnInfo();
|
return mVpns.get(userId).getLegacyVpnInfo();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user