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

Commit b8b310df authored by Robin Lee's avatar Robin Lee
Browse files

VPN: uncheck lockdown if always-on is off

Change-Id: I00933e0c8567997d800f9f31f78c7b19922a52b8
Fix: 36713605
Test: make RunSettingsRoboTests -j30
parent a53f8a91
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;
    }