Fix L2 connected networks disappearing

L2 connected networks are disappearing in the Wifi picker due to them
not being correctly identified as the primary Wifi network since they
don't have NetworkCapabilities yet. To fix this, treat L2 connected
networks as primary as long as they have a NetworkInfo from the
NETWORK_STATE_CHANGED broadcast (which always matches the primary
network).

Bug: 286345967
Test: atest WifiPickerTrackerTest, manually verify network will not
disappear briefly when manually connecting.

Change-Id: Ib32877201f72bc299346c9453eb31c1aeffa6d4c
Merged-In: Ib32877201f72bc299346c9453eb31c1aeffa6d4c
3 files changed