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

Commit a0e34f02 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

Change-Id: Idb17fffd05797c2c54bd823f2bcd6743b2d640fc
parents ab315ddb 73455096
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;
    }