Merge "Disable always-on VPN in factoryReset" am: 63c14e0ab6 am: 1135d509c5 am: e2554d51c4

am: 08d05b2719

Change-Id: Iaccb7394994ccce66df0ab2f713fd890a8b999c8
This commit is contained in:
Robin Lee
2017-01-23 17:05:42 +00:00
committed by android-build-merger

View File

@@ -5512,6 +5512,18 @@ public class ConnectivityService extends IConnectivityManager.Stub
}
}
// Turn Always-on VPN off
if (mLockdownEnabled && userId == UserHandle.USER_SYSTEM) {
final long ident = Binder.clearCallingIdentity();
try {
mKeyStore.delete(Credentials.LOCKDOWN_VPN);
mLockdownEnabled = false;
setLockdownTracker(null);
} finally {
Binder.restoreCallingIdentity(ident);
}
}
// Turn VPN off
VpnConfig vpnConfig = getVpnConfig(userId);
if (vpnConfig != null) {