Merge "Correctly handle null ProxyInfo in Ikev2VpnProfile"

This commit is contained in:
Chiachang Wang
2022-09-02 12:15:09 +00:00
committed by Gerrit Code Review

View File

@@ -171,7 +171,7 @@ public final class Ikev2VpnProfile extends PlatformVpnProfile {
mPassword = password; mPassword = password;
mRsaPrivateKey = rsaPrivateKey; mRsaPrivateKey = rsaPrivateKey;
mUserCert = userCert; mUserCert = userCert;
mProxyInfo = new ProxyInfo(proxyInfo); mProxyInfo = (proxyInfo == null) ? null : new ProxyInfo(proxyInfo);
// UnmodifiableList doesn't make a defensive copy by default. // UnmodifiableList doesn't make a defensive copy by default.
mAllowedAlgorithms = Collections.unmodifiableList(new ArrayList<>(allowedAlgorithms)); mAllowedAlgorithms = Collections.unmodifiableList(new ArrayList<>(allowedAlgorithms));