Gear Preference on VPN page includes subtitle if the vpn is an insecure

type

Test: atest SettingsUnitTests
Screenshot: https://screenshot.googleplex.com/BWfUf6hcHNnbLvH
Bug: 176821216
Change-Id: I2bee3ba100bfe636221264492a2ce98b6a664cd5
Merged-In: I2bee3ba100bfe636221264492a2ce98b6a664cd5
(cherry picked from commit 3922249709)
This commit is contained in:
Jeremy Goldman
2021-03-11 13:29:46 +08:00
parent 006b8db0b6
commit ab8eeca966
3 changed files with 39 additions and 2 deletions

View File

@@ -294,6 +294,7 @@ public class VpnSettings extends RestrictedSettingsFragment implements
p.setState(LegacyVpnPreference.STATE_NONE);
}
p.setAlwaysOn(lockdownVpnKey != null && lockdownVpnKey.equals(profile.key));
p.setInsecureVpn(VpnProfile.isLegacyType(profile.type));
updates.add(p);
}
@@ -303,6 +304,7 @@ 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));
updates.add(p);
}