Merge "Allow excludeLocalRoutes set only in bypassable profile" am: eaa3fc76a8 am: e6c1b94120

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1938237

Change-Id: I14f0fe8795aa6f90c13bf764db45ce5e234268ff
This commit is contained in:
Chiachang Wang
2022-01-11 09:33:29 +00:00
committed by Automerger Merge Worker

View File

@@ -163,6 +163,10 @@ public final class Ikev2VpnProfile extends PlatformVpnProfile {
// 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));
if (excludeLocalRoutes && !isBypassable) {
throw new IllegalArgumentException(
"Vpn should be byassable if excludeLocalRoutes is set");
}
mIsBypassable = isBypassable; mIsBypassable = isBypassable;
mIsMetered = isMetered; mIsMetered = isMetered;