[VPN] save public legacy VPN details publicly

This does not include certificates, private keys etc. which are still
saved in the KeyStore with the encryption the user requested for them.

Makes connecting to lockdown vpn before user unlock possible.

Bug: 26108660
Change-Id: I56c1672c7a41e761c2791584b99900aff51b59e4
This commit is contained in:
Robin Lee
2015-12-17 11:58:24 +00:00
parent 949499948a
commit 4c85639733
3 changed files with 2 additions and 12 deletions

View File

@@ -456,13 +456,6 @@ public class VpnSettings extends SettingsPreferenceFragment implements
protected static List<VpnProfile> loadVpnProfiles(KeyStore keyStore, int... excludeTypes) {
final ArrayList<VpnProfile> result = Lists.newArrayList();
// This might happen if the user does not yet have a keystore. Quietly short-circuit because
// no keystore means no VPN configs.
if (!keyStore.isUnlocked()) {
return result;
}
// We are the only user of profiles in KeyStore so no locks are needed.
for (String key : keyStore.list(Credentials.VPN)) {
final VpnProfile profile = VpnProfile.decode(key, keyStore.get(Credentials.VPN + key));
if (profile != null && !ArrayUtils.contains(excludeTypes, profile.type)) {