Fix NetworkCallback expecting wrong network

By current wifi design, wifi will report disconnected and
re-connected when changing from non-metered to metered.
However, the cts test app listens for all network, which
will get mobile network as active network when wifi is
changing meteredness. This is not expected. And causes
test failures when DUT has both wifi and mobile connections.

Thus, this change pass request to track currently active
network to the test app and register only for transport
types of currently active network to prevent from getting
unexpected network.

Test: atest CtsHostsideNetworkTests:com.android.cts.net.HostsideNetworkCallbackTests
Bug: 182516128
Ignore-AOSP-First: merge conflict with ag/13615939 which cannot
                   be cherry-picked.
Change-Id: I2dce6035b13472bbdc2609009d690aac96280033
6 files changed
tree: 3b8788c005ae1be29fd8e04abf9558069f546277
  1. tests/
  2. Tethering/
  3. .gitignore
  4. OWNERS
  5. PREUPLOAD.cfg
  6. TEST_MAPPING