WifiServiceImpl: Mask networkId in WifiInfo if needed

WifiInfo.getNetworkId() when used in conjunction with data retrieved
from WifiManager.getConfiguredNetworks() can end up revealing location.
So, enforce location permission on apps for the networkId field as well.

Bug: 124080065
Test: ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I42d9361acb8390fc0828fa998c9a2d502937f31a
2 files changed