Support setting the default interface to null again.
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
1 file changed