Refactored code to improve readability.

A list with only one element was being created and then iterated. The reason this
was introduced is probably because in N the function updateSavedNetworkWithScanDetail
returned a List<WifiConfiguration> and in O getSavedNetworkForScanDetailAndCache
returns just a WifiConfiguration.

Bug: 69677408
Fixes: none
Test: ran the unit test and also tested manually to see if functionality remains the same.

Change-Id: I42a4b9d84a2f55f1f7b3c661903b598aa9bd87ae
1 file changed