Maintain VPN type form the VpnProfile
the connectedLegacyVpn may already exist within the VpnProfiles. Because the stub profile generated from the LegacyVpnInfo does not contain type information, overriding whether the VPN is insecure using this information will provide an incomplete picture. Test: atest -c SettingsUnitTests Bug: 184922172 Change-Id: Icf2e08826c444863eaebdaa47bfd217795d2bad6
This commit is contained in:
@@ -304,7 +304,9 @@ public class VpnSettings extends RestrictedSettingsFragment implements
|
|||||||
LegacyVpnPreference p = mSettings.findOrCreatePreference(stubProfile, false);
|
LegacyVpnPreference p = mSettings.findOrCreatePreference(stubProfile, false);
|
||||||
p.setState(vpn.state);
|
p.setState(vpn.state);
|
||||||
p.setAlwaysOn(lockdownVpnKey != null && lockdownVpnKey.equals(vpn.key));
|
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);
|
updates.add(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user