Fix refCount check at releaseNetworkFor

When releaseNetworkFor is called, refCount should be equal to 1 for
network.stop() to be called. This is the same logic that is followed by
WifiNetworkFactory also.
In the current code, when refCount is 2 and releaseNetworkFor() is called,
network.stop() will be executed and will stop Ethernet

Bug: 146089778
Test: build and boot OK
Change-Id: Ib7d1b488a2943364a8ba4a89eec5de4c33cf1d5a
1 file changed
tree: a827ffffd1b064f46989385fe3dc9ce4a9a556c3
  1. java/
  2. tests/
  3. Android.bp