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

Commit 1be80d22 authored by Robin Lee's avatar Robin Lee Committed by android-build-merger
Browse files

Merge "VPN: uncheck lockdown if always-on is off" into oc-dev am: 73455096

am: a0e34f02

Change-Id: Ic95e31908525fb12c83e010352260d42cc2738b0
parents b5a0fc40 a0e34f02
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -197,9 +197,7 @@ public class AppManagementFragment extends SettingsPreferenceFragment

    @Override
    public void onConfirmLockdown(Bundle options, boolean isEnabled, boolean isLockdown) {
        if (setAlwaysOnVpnByUI(isEnabled, isLockdown)) {
            updateUI();
        }
        setAlwaysOnVpnByUI(isEnabled, isLockdown);
    }

    private boolean setAlwaysOnVpnByUI(boolean isEnabled, boolean isLockdown) {
@@ -214,6 +212,8 @@ public class AppManagementFragment extends SettingsPreferenceFragment
        final boolean success = setAlwaysOnVpn(isEnabled, isLockdown);
        if (isEnabled && (!success || !isVpnAlwaysOn())) {
            CannotConnectFragment.show(this, mVpnLabel);
        } else {
            updateUI();
        }
        return success;
    }