Merge "Maintain VPN type form the VpnProfile" into sc-dev

This commit is contained in:
Jeremy Goldman
2021-04-12 10:10:11 +00:00
committed by Android (Google) Code Review

View File

@@ -304,7 +304,9 @@ public class VpnSettings extends RestrictedSettingsFragment implements
LegacyVpnPreference p = mSettings.findOrCreatePreference(stubProfile, false);
p.setState(vpn.state);
p.setAlwaysOn(lockdownVpnKey != null && lockdownVpnKey.equals(vpn.key));
p.setInsecureVpn(VpnProfile.isLegacyType(stubProfile.type));
// (b/184921649) do not call setInsecureVpn() for connectedLegacyVpns, since the
// LegacyVpnInfo does not contain VPN type information, and the profile already
// exists within vpnProfiles.
updates.add(p);
}