Merge "Disable always-on VPN in factoryReset" am: 9847e78b72
am: adb7a1c631
Change-Id: I66b6721932ae8798cbb406cafa04ed0c92fe47f6
This commit is contained in:
@@ -5478,6 +5478,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) {
|
||||
|
||||
Reference in New Issue
Block a user