[WifiNetworkSelector] Simplify updating of scan detail caches

Update the scan detail caches for existing networks before trying
network selection.

Call mWifiConfigManager.updateScanDetailForNetwork unconditionally after
the candidate is successfully added, just in case the config was newly
created.

Use the list of connectible networks instead of Candidate.getScanDetails
for mWifiConfigManager.setNetworkCandidateScanResult, so that the scan
detail associated with the config reflects the best available scan
result. This should allow the removal of the Candidate.getScanDetails
method.

Bug: 147751334
Test: atest com.android.server.wifi
Change-Id: Idc033ff85585db8e0cc427dcb0af74bd750d4581
2 files changed
tree: fcb2981fdad93f509ece31f5fada00fcd23812e5
  1. apex/
  2. service/
  3. PREUPLOAD.cfg