Fix hiddenSSID overriden by adding hidden network via scans.

When WifiConfiguration.hiddenSSID is true for a network, we will scan
for networks with that SSID and see those scans in the Wifi picker. If
there is a network with the same SSID and security type familiy (i.e.
PSK and SAE), then the user is able to tap on this and save as a new
network. However, since hiddenSSID is false by default, this will
mistakenly override the merged config's hiddenSSID to false.

To avoid this, don't set hiddenSSID to false if we're merging two
networks together.

Bug: 308068979
Test: atest WifiConfigManagerTest
Change-Id: I7edcf685267ff0e9d5555f0156f81032c016f43f
2 files changed