Don't update scan results for config changes when wifi is disabled

CONFIGURED_NETWORKS_CHANGED broacast may happen while wifi is disabled,
which then updates the wifi entries based on cached scans. This causes
getWifiEntries() to mistakenly return values even when wifi is disabled.
Prevent this by avoiding updating scan results during a config update
 when wifi is disabled.

Note that this is a no-op from the perspective of AOSP Settings, which
hides the entire wifi list and ignores getWifiEntries() when wifi is
 disabled.

Bug: 300061679
Test: atest WifiPickerTrackerTest
Change-Id: I06b6f7f41397072451c0fc6110cac5f05a646e7f
2 files changed