commit | a53ed851dab22dfa9a7cc3e1b7f9d9c396cbe791 | [log] [tgz] |
---|---|---|
author | Prerana <preranap@google.com> | Thu Apr 28 04:02:05 2022 +0000 |
committer | Prerana Patil <preranap@google.com> | Fri May 06 18:19:58 2022 +0000 |
tree | 7de1bc773b55de665de2ecb330e9add37ecf79cc | |
parent | bbbdc6b82fa0c7622a6a05c0dad11377ea70c270 [diff] [blame] |
Update VPN isolation code for excluded routes Bug: 230058738 Test: atest LinkPropertiesTest Result: https://paste.googleplex.com/4706859672928256 Change-Id: I970fca6b0e2cd358e9bd77152563d13367867c74 (cherry picked from commit 2b97bbebf4b85e0024fc75298e760fc03516be40) Merged-In: I970fca6b0e2cd358e9bd77152563d13367867c74
diff --git a/framework/src/android/net/LinkProperties.java b/framework/src/android/net/LinkProperties.java index 8782b33..4ce2593 100644 --- a/framework/src/android/net/LinkProperties.java +++ b/framework/src/android/net/LinkProperties.java
@@ -1366,6 +1366,21 @@ } /** + * Returns true if this link has a throw route. + * + * @return {@code true} if there is an exclude route, {@code false} otherwise. + * @hide + */ + public boolean hasExcludeRoute() { + for (RouteInfo r : mRoutes) { + if (r.getType() == RouteInfo.RTN_THROW) { + return true; + } + } + return false; + } + + /** * Compares this {@code LinkProperties} interface name against the target * * @param target LinkProperties to compare.