Merge "Maintain VPN type form the VpnProfile" into sc-dev am: 4ee56ab90d

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14158852

Change-Id: I1985e93ed4a1b2f908bb48516a17e91f2053d525
This commit is contained in:
Jeremy Goldman
2021-04-12 10:54:20 +00:00
committed by Automerger Merge Worker

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);
}