Merge "Fix test failure on S image + S module"

This commit is contained in:
Paul Hu 2022-05-23 13:45:58 +00:00 • committed by Gerrit Code Review
commit d6446263ce

View file

@ -3235,6 +3235,7 @@ public class ConnectivityManagerTest {
// TODD: Have a significant signal to know the uids has been sent to netd. // TODD: Have a significant signal to know the uids has been sent to netd.
assertBindSocketToNetworkSuccess(network); assertBindSocketToNetworkSuccess(network);
if (TestUtils.shouldTestTApis()) {
// Uid is in allowed list. Try file network request again. // Uid is in allowed list. Try file network request again.
requestNetwork(restrictedRequest, restrictedNetworkCb); requestNetwork(restrictedRequest, restrictedNetworkCb);
// Verify that the network is restricted. // Verify that the network is restricted.
@ -3243,6 +3244,7 @@ public class ConnectivityManagerTest {
entry -> network.equals(entry.getNetwork()) entry -> network.equals(entry.getNetwork())
&& (!((CallbackEntry.CapabilitiesChanged) entry).getCaps() && (!((CallbackEntry.CapabilitiesChanged) entry).getCaps()
.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED))); .hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED)));
}
} finally { } finally {
agent.unregister(); agent.unregister();