WifiConfigManager: do not use ScanDetailCache to set SSID for...
passpoint networks

For passpoint networks, set the WPA supplicant SSID field for the
network being selected in WifiConfigManager.selectNetwork() to the
SSID stored in the WifiConfiguration argument, since we know that QNS
will set this field to the SSID of the network it has selected.

This replaces the previous logic of looking for the SSID in a cached
ScanDetail, which is not guaranteed to match correspond to the network
selectNetwork() is attempting to connect to.

While there:
  - Use the BSSID set by WSM for the network we are connecting to, to
    get the ScanDetail we need to set |mSelectedPasspointNetwork|.
    Using this BSSID ensures that we end up getting the NetworkDetail
    corresponding to the passpoint network we are selecting.
  - Remove ScanDetailCache.getFirst(), since it is no longer used
    anywhere else.

BUG: 29946781
TEST: In the lab, there are currently two Passpoint APs, each
broadcasting a network that the same Passpoint profile can be
used to connect to. One of these networks ("X") rejects the Passpoint
credentials presented to it, while the other ("Y") accepts them. Verify
that a device loaded with the aforementioned Passpoint profile
will try to connect to X and fail, and then attempt to connect to
Y and succeed.

Change-Id: Iaac40738c952684694ef07f244cd8880e0d91fa3
3 files changed
tree: 747ff9d8195a456c461b4ce3b5a7d478599889b3
  1. libwifi_hal/
  2. libwifi_system/
  3. service/
  4. tests/