Synchronize the IpClient events

If the ipClient is stopped before handling the events in
Handler thread, ethernet network factory might end up
creating a network agent for a network which is already
cleared.

This change fixes the issue by handling the events only
if ipClient is initialized.

Tests:

  Builds, Boots, EthernetNetworkFactoryTest.
  Ethernet related test scenarios

Bug: 207057937
Change-Id: If7ff7abf5f0dcdb0e94de0502bfdf981f9f20298
2 files changed
tree: 27ea995bd9b4b4e8a5fc27e01e94aaa60520dd95
  1. java/
  2. tests/
  3. .gitignore
  4. Android.bp
  5. TEST_MAPPING