Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08d05b27 authored by Robin Lee's avatar Robin Lee Committed by android-build-merger
Browse files

Merge "Disable always-on VPN in factoryReset" am: 63c14e0a am: 1135d509

am: e2554d51

Change-Id: I99207281321861a3e720b5c1e2e316e12b104677
parents 5edf4f11 e2554d51
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -5501,6 +5501,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) {