Fix VPN Wi-Fi not being shown correctly due to race condition

Fix issue where VPN Wi-Fi isn't shown correctly due to
WifiManager.getCurrentNetwork/getConnectionInfo() not being available
(network loss or MBB) when the default network changes, causing us to
ignore a default network that is actually wifi.

To fix this, we should
1) Remove the dependency on WifiManager.getCurrentNetwork() and
   getConnectionInfo() and get the underlying default networks and
   capabilities directly from ConnectivityManager.
2) Instead of checking if wifi is default on the default
   network callback and caching the result, store the default Network
   object and compare it whenever we check if the WifiEntry is default.

Bug: 301493943
Test: atest WifiTrackerLibTests, manual verification that VPN over wifi
still shows the wifi pie in Settings/SystemUI

Change-Id: Ia39ace36a9401a942a134a3669d7db807d5960a6
5 files changed