Fixes DeviceOwnerTest#testWifiConfigLockdown for automotive.

The test uses the DeviceOwner's WifiManager to remove the networks,
but it must use WifiManager.getConfiguredNetworks() from the current
user to get the networks (as that method would return empty for the
DO's manager if the device runs with headless system user mode on).

Also improved logging.

Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testWifiConfigLockdown,testWifiSetHttpProxyTest,testWifiConfigLockdown,testWifiNetworkConfigurationWithoutFineLocationPermission # on automotive and phone

Fixes: 213385606

Change-Id: I4f9727c7226f9daa6bf5e8e4ba4143458712dc22
4 files changed