Avoid creating IpClient if ethernet cable is unplugged.

This change avoids calling start() on needNetworkFor() if ethernet
cable is unplugged. Fixed by adding isLinkUp validation.

Test: ./cts-tradefed run cts-dev -d -m CtsSecurityTestCases -t \
      android.security.cts.ListeningPortsTest#testNoRemotelyAccessibleListeningUdpPorts
      adb shell netstat -lnup

Change-Id: I2debd7367a20b665249f9c19d2d8a61737435803
1 file changed
tree: 27c4a7396965b01340a66b9f14b44a4be7c67e1d
  1. service-t/
  2. tests/