Merge "Disable always-on VPN in factoryReset"
am: 5765604627
Change-Id: I021b288e3db17ddefbea3645fd282e3ee123a6e8
This commit is contained in:
commit
7960c6b8b5
1 changed files with 12 additions and 0 deletions
|
|
@ -5464,6 +5464,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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue