Skip multicast test if it is not supported

DatagramChannelMulticastTest had some tests that
would not check the supportsMulticast flag to see
if they should execute before accessing fields that
are not initialized when supportsMulticast
is false.

supportsMulticast is set to false when the system
property "android.cts.device.multicast" is "false"
(normally provided by the CTS runner).

Thanks to bohu@ for the original fix.

BUG: 37719321
Test: vogar --vm-arg "-Dandroid.cts.device.multicast=false" \
luni/src/test/java/libcore/java/nio/channels/DatagramChannelMulticastTest.java
Change-Id: I0d3de3512b8f8ac300546f072eb98e760ccfbe66
1 file changed