Implement the new added EthernetManager APIs.
EthernetManager is moving to the connectivity mainline module
and some of its hidden methods are being exposed as module-lib
APIs. This CL updates the implementation.
1. Rename onAvailabilityChanged to onInterfaceStateChanged in
IEthernetServiceListener.aidl, to match the name of the public
callback method.
2. Add the interface state, role and IpConfiguration to the
callback, so that clients can use this information without
having to call synchronous methods.
3. Call the new callback whenever any of the above parameters
changes, or when a callback is registered.
Also make some package-private methods in EthernetNetworkFactory
protected @VisibleForTesting because otherwise mockito can't
mock them.
Bug: 210586283
Test: m
Test: atest EthernetServiceTests EthernetTetheringTest
Change-Id: Ib27bf119b0d61b78f19b6447a38b4468d8035c78
Merged-In: Ib27bf119b0d61b78f19b6447a38b4468d8035c78
3 files changed