Previously we did not stop DHCP or try to force a disconnect.
This made it impossible to reconnect by unplugging and
replugging an USB Ethernet adapter.
Bug: 17736828
Change-Id: Idd8576a96b063b5ca726ee9149800bdcb0f62bd1
Network Factories are allowed to go below, but networks need to be
constrained. Allowing the network to go below 0 meant that -1 could
sometimes leak through and foul the logic.
bug:17361330
Change-Id: Ife34ca0f9c233dd3c3df80f6fea580af43afcdeb
Also make static IP configuration more robust (e.g., tear down
our NetworkAgent when we switch between static and DHCP).
Bug: 16114392
Bug: 16893413
Change-Id: Ib33f35c004e30b6067bb20235ffa43c247d174df
NetworkFactory only indicates if we're interested in new connections. It
shouldn't be used to tear down existing connections (they have unwanted callbacks
for that).
Supports linger properly as well as dealing with tie scores.
bug:15612739
Change-Id: Ib3dfe673d3645b9dc4756c176958409a64ec32e4
(cherry picked from commit 8b07ee36a2)
It was attempting to update the NetworkAgent before the NetworkAgent
was created, causing NullPointerExceptions.
bug:15407938
Change-Id: Ie36b906df4b12f095a16d1b30c847a55b074d60c
Make NetworkFactory a concrete class and divide responsibilites between it and NetworkAgent.
Factory will track requests and by default give a single connect/disconnect api for ease
of use. Then NetworkAgent is created and destroyed as needed with very simple logic.
Change-Id: I401c14a6e5466f2fc63b04219b97ff85bb9af291
(cherry picked from commit 8af038d056)
Make NetworkFactory a concrete class and divide responsibilites between it and NetworkAgent.
Factory will track requests and by default give a single connect/disconnect api for ease
of use. Then NetworkAgent is created and destroyed as needed with very simple logic.
Change-Id: I401c14a6e5466f2fc63b04219b97ff85bb9af291
1. If DHCP fails, set the score to 0. Coupled with changes in
NetworkAgent, that will cause us to retry DHCP the next time
the link is plugged in.
2. Send LinkProperties before sending NetworkInfo, because of
a race in NetworkAgent.
3. Make Ethernet work properly after a runtime restart.
4. Improve locking.
5. Clarify how things work in comments.
Bug: 15295359
Change-Id: I06cd683a1633838bca1ec177e61f1829889d3934
(cherry picked from commit 21be8b6dc7)
1. If DHCP fails, set the score to 0. Coupled with changes in
NetworkAgent, that will cause us to retry DHCP the next time
the link is plugged in.
2. Send LinkProperties before sending NetworkInfo, because of
a race in NetworkAgent.
3. Make Ethernet work properly after a runtime restart.
4. Improve locking.
5. Clarify how things work in comments.
Bug: 15295359
Change-Id: I06cd683a1633838bca1ec177e61f1829889d3934