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

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

Change-Id: If65ae287c9fc52201d010679b2b93e99d9f3847e
This commit is contained in:
Chiachang Wang
2022-01-11 09:13:45 +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;