diff options
| author | 2022-08-30 10:13:49 +0000 | |
|---|---|---|
| committer | 2022-09-06 06:49:28 +0000 | |
| commit | 9a80121f6b3a7e238008b533d972a4441f27c736 (patch) | |
| tree | 0cb0d0a13effb8c5fb5099e49c1fb4b375e084a8 | |
| parent | 96fd9fad38ee8d6ef666d24ad31cb576b3ab6f36 (diff) | |
Correctly handle null ProxyInfo in Ikev2VpnProfile
This change ensures that null ProxyInfo instances are honored
and reflected in the actual VpnProfile.
Ikev2VpnProfiles incorrectly set ProxyInfo as an empty instance
when provided with a null ProxyInfo. Other components in the
system sometimes have different behavior if presented with an
empty ProxyInfo instead of a null one.
Bug: 244281603
Test: atest FrameworksNetTests
Test: Manual testing with VPN validation enabled
Change-Id: I67ee2aa5c96dc22ba8fcd2be3fd4c090dec20697
(cherry picked from commit 29348dbfca787235ae1eabbe1a8b7b262187f197)
Merged-In: I67ee2aa5c96dc22ba8fcd2be3fd4c090dec20697
| -rw-r--r-- | core/java/android/net/Ikev2VpnProfile.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/net/Ikev2VpnProfile.java b/core/java/android/net/Ikev2VpnProfile.java index ba0546aceb95..3979c6c78dcb 100644 --- a/core/java/android/net/Ikev2VpnProfile.java +++ b/core/java/android/net/Ikev2VpnProfile.java @@ -171,7 +171,7 @@ public final class Ikev2VpnProfile extends PlatformVpnProfile { mPassword = password; mRsaPrivateKey = rsaPrivateKey; mUserCert = userCert; - mProxyInfo = new ProxyInfo(proxyInfo); + mProxyInfo = (proxyInfo == null) ? null : new ProxyInfo(proxyInfo); // UnmodifiableList doesn't make a defensive copy by default. mAllowedAlgorithms = Collections.unmodifiableList(new ArrayList<>(allowedAlgorithms)); |