Deflake DatagramChannelTest.

About 2% of the time, the device has no non-loopback IPv4 address,
e.g. due to environmental flakes.

If that happens, don't pass a null through to test_bind() because
it will fail, see bug for details, ust skip it for this run.

Add the same logic to the IPv6 test too for consistency.

Fixes: 240018849
Test: atest CtsLibcoreTestCases:libcore.java.nio.channels.DatagramChannelTest
Change-Id: If2cd1dabe48b113fe4a6e4c0636e8ef0bfd15b76
1 file changed