WifiNetworkSelector: Refactor sufficiency checks for multiple STA's
For the android auto STA + STA use-case, WifiConnectivityManager needs
to manage 2 instances of CMM for auto-join purposes. Refactor the
sufficiency check to account for all instances of CMM which needs to be
managed by WifiConnectivityManager.
Also,
i) Remove the connected network score boost in ScoredNetworkNominator.
This is already done by the candidate scorer and does not need to be
done in the nomination phase.
ii) Remove connected network details from NetworkNominator.nominateNetworks()
interface (since this is unused currently other than (i) and is more
complicated to handle with multiple STA's).
iii) Remove the supplicant transient state check in
WifiConnectivityManager. With the refactor of ClientModeImpl in S, if
the ClientModeImpl is not connected or disconnected, then it is implied
that we are in transient state (i.e connecting state). This is already
checked in WifiNetworkSelector.isNetworkSelectionNeeded().
Note: The current CL does not include the secondary CMM state. That will
be done in a follow up CL. This CL just refactors existing code to help
with that.
Bug: 169413079
Test: atest com.android.server.wifi
Change-Id: I51f49b554a6944d955a1c7290dca2e3b6c81e297
10 files changed