Revert EXCLUDED_ROUTES to only keep RTN_UNICAST

Revert the previous change to filter out all non-RTN_THROW routes when
EXCLUDED_ROUTES is disabled, as that behavior is CTS tested for T, and
has been used by T for a while. The previous change already ensured that
there is no behavior change on S, so this is the safest approach.

This fixes HostsideLinkPropertiesGatingTests.

Bug: 239046959
Test: atest LinkPropertiesTest CtsHostsideNetworkTests
Change-Id: I55e078cdc06341f4957fe7bc743c0022b2c7d3da
This commit is contained in:
Remi NGUYEN VAN
2022-07-15 16:42:49 +09:00
parent 66c27c18a2
commit 48380e4132
2 changed files with 7 additions and 8 deletions

View File

@@ -769,16 +769,15 @@ public final class LinkProperties implements Parcelable {
// system) will not see it in getRoutes on T+ if they do not have the compat change
// enabled (target SDK < T); but this is expected to be rare and typically only affect
// tests creating LinkProperties themselves (like CTS v12, which is only running on S).
return Collections.unmodifiableList(getNonThrowRoutes());
return Collections.unmodifiableList(getUnicastRoutes());
}
}
/**
* Returns all the {@link RouteInfo} that are not of type {@link RouteInfo#RTN_THROW} set on
* this link.
* Returns all the {@link RouteInfo} of type {@link RouteInfo#RTN_UNICAST} set on this link.
*/
private @NonNull List<RouteInfo> getNonThrowRoutes() {
return CollectionUtils.filter(mRoutes, route -> route.getType() != RouteInfo.RTN_THROW);
private @NonNull List<RouteInfo> getUnicastRoutes() {
return CollectionUtils.filter(mRoutes, route -> route.getType() == RouteInfo.RTN_UNICAST);
}
/**