9effed6f9ef2609a94c34699b7e2000fc1811993
1. Remove the IP provisioning thread and just attempt provisioning indefinitely whenever we have an interface. 2. Make all methods run on the passed-in handler thread. This makes it easier to verify correctness by code inspection. 3. Remove the code that changes the factory score depending on whether we're tracking an interface and have link. This is unnecessary complexity, as there is no penalty to accepting a request even if we don't have an interface. 4. Remove code duplication and only have one codepath for stopping layer 3. Tested the following are tested with this CL: - Booting with an interface connected. - Disconnecting/reconnecting the Ethernet cable repeatedly, particularly at inconvenient times (e.g., during provisioning). - Similarly, disconnecting/reconnecting USB Ethernet interfaces. - Falling back to another Ethernet interface if the currently tracked Ethernet interface is unplugged. - Disconnecting and restarting provisioning when provisioning is lost (e.g., if the default route is deleted). - Crashing the system server causes Ethernet to reconnect on restart. - The above while running watch -n 0.1 adb shell dumpsys ethernet Bug: 62308954 Test: tested on marlin with USB ethernet adapters, as described Change-Id: Iad12a52a903bfaccf7e245dfe499652c752c31e9
Description
android_packages_modules_Connectivity
Languages
Java
81.4%
Kotlin
7.7%
AIDL
4.5%
C++
4.5%
C
1.7%
Other
0.1%