Switch to the two-argument version of explicitlySelected.

This allows wifi to pass in the value of noInternetAccessExpected
even if the network was not manually selected by the user.

This is needed on partial connectivity networks where the user
has responded "yes, don't ask again" to the dialog that asks
whether the device should stay connected. Such networks will
validate and thus re-enable autojoin.

When wifi autojoins such a network, ConnectivityService must be
informed that the user has accepted partial connectivity so it
can switch to the network as soon as partial connectivity is
detected.

The code change is very simple and most of this CL consists of
tests. The tests are a bit tricky because WifiNetworkAgent is
private to ClientModeImpl, and thus cannot just be mocked out.

Bug: 130766237
Test: atest FrameworksWifiTests
Change-Id: I04be21743faa88063a2aa89720b70bc61f9d1c64
2 files changed