Merge "Allow excludeLocalRoutes set only in bypassable profile" am: eaa3fc76a8 am: e6c1b94120 am: 9d00b2224a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1938237 Change-Id: Iadb59b8bf40309b8dffd03d28f01606c7423c8f1
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user