Clean up KeyStore exception warning caused by adding a new VPN.

Bug:109791294
Test: manually navigate to settings and click the + button in VPN.
Change-Id: Ib94778ef3fdab0fc8147477b91f644c54dc04c24
This commit is contained in:
Irina Dumitrescu
2018-06-08 19:26:25 +01:00
parent a5711f1bc6
commit addc82e454

View File

@@ -38,7 +38,8 @@ public class VpnUtils {
private static final String TAG = "VpnUtils";
public static String getLockdownVpn() {
final byte[] value = KeyStore.getInstance().get(Credentials.LOCKDOWN_VPN);
final byte[] value = KeyStore.getInstance().get(
Credentials.LOCKDOWN_VPN, true /* suppressKeyNotFoundWarning */);
return value == null ? null : new String(value);
}