876e5e16a97b4fa2532cd1920da84e20bea31a68
Currently, the default interface can only ever go from null to non-null. This is correct for fixed interfaces (because they don't get unplugged) and it's generally correct for USB interfaces that use ethX as their device name (because when they are unplugged and plugged in again, the device name won't change). But it is not correct if, for example, the default interface is a test interface. So, allow mDefaultInterface to go back to null. This CL also fixes a crash if a tethered interface request is added and removed when there is no default interface. Also, make dump() report tethered interface requests. Also remove an unused variable that I missed in the previous CL. Bug: 150644681 Test: tested by EthernetTetheringTest in same topic Change-Id: I5109d8da3aeb6c1f6523291d9e2ec92c64b5ad2d Merged-In: I5109d8da3aeb6c1f6523291d9e2ec92c64b5ad2d (cherry picked from commit cc156c2f7793731b2699e194d4b164138ee4cf62)
Description
android_packages_modules_Connectivity
Languages
Java
81.4%
Kotlin
7.7%
AIDL
4.5%
C++
4.5%
C
1.7%
Other
0.1%