Include login/alwayson in legacy VPN editor dialog

A little more consistent with the new app VPNs' dialogs. To make this
work it was also necessary to restart the lockdown VPN every time it is
edited, which makes sense because the expected action after editing a
VPN is that it reconnects with the new settings.

Bug: 28072644
Change-Id: I4b6a6f0a6ed96d2ec6f62889fdae4abb60d0646c
This commit is contained in:
Robin Lee
2016-04-12 17:56:38 +01:00
parent 6599660196
commit 20ddd1c57b
3 changed files with 13 additions and 12 deletions

View File

@@ -152,12 +152,9 @@ public class ConfigDialogFragment extends DialogFragment implements
return;
}
// Update only if lockdown vpn has been changed
if (!VpnUtils.isVpnLockdown(profile.key)) {
final ConnectivityManager conn = ConnectivityManager.from(getActivity());
conn.setAlwaysOnVpnPackageForUser(UserHandle.myUserId(), null);
VpnUtils.setLockdownVpn(getContext(), profile.key);
}
final ConnectivityManager conn = ConnectivityManager.from(getActivity());
conn.setAlwaysOnVpnPackageForUser(UserHandle.myUserId(), null);
VpnUtils.setLockdownVpn(getContext(), profile.key);
} else {
// update only if lockdown vpn has been changed
if (VpnUtils.isVpnLockdown(profile.key)) {