summaryrefslogtreecommitdiff
path: root/tests/unit/java/com/android/server/ethernet/EthernetServiceImplTest.java
diff options
context:
space:
mode:
authorPatrick Rohr <prohr@google.com>2022-04-08 12:04:34 +0200
committerPatrick Rohr <prohr@google.com>2022-05-25 11:50:30 -0700
commit0ccff8a30bdc54327724d645112fc3f06e2c8e52 (patch)
tree8692374e9cc3ca723e071fbd26cd45d7fc5a7240 /tests/unit/java/com/android/server/ethernet/EthernetServiceImplTest.java
parent41e249e380d6b227a8b565cca8951f92b95adc59 (diff)
Move EthernetNetworkFactory to using the NetworkProvider API
This CL makes EthernetNetworkFactory inherit from NetworkProvider rather than NetworkFactory. The name of the class is purposefully unchanged to make the code review easier (it will be changed to EthernetNetworkProvider in a follow up). As part of the conversion, NetworkInterfaceState now registers a NetworkOffer when the link comes up and unregisters it when the link goes down. It updates the existing offer when capabilities change (by calling registerNetworkOffer with an already registered NetworkOfferCallback). This change should fix existing refCount issues. When a NetworkOffer is first registered, it receives callbacks for all existing requests. This is the main problem with the NetworkFactory implementation where only one NetworkOffer is registered when the factory is first created; so when interfaces come up, they do not receive callbacks for existing requests. Test: atest EthernetNetworkTest Bug: 197548738 Change-Id: I5e8e4673d2ed04bc1a0c8d232a8772edfff65b5d Merged-In: I5e8e4673d2ed04bc1a0c8d232a8772edfff65b5d
Diffstat (limited to 'tests/unit/java/com/android/server/ethernet/EthernetServiceImplTest.java')
0 files changed, 0 insertions, 0 deletions