Android VTS 9.0 Release 5 (5140538)
WifiPermissionsUtil: remove connectivity app bypass

Remove the "connectivity app" bypass for getting scan results.

Changes in the CL:
a) Made the method checking permissions and device state more clear by
adding the location mode check up front with an explicit
SecurityException.
b) Added a bypass for apps with NETWORK_SETTINGS & NETWORK_SETUP_WIZARD
permissions.

Bug: 110264588
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manually verified device connects to wifi after starting
Test: manually verified Settings displays scan results (regardless of
whether location is on or off)
Change-Id: I2e5fa52689ec65c2ca85a32be10c179f9b9ee91b
(cherry picked from commit a545d80998db04392dfc3566f480041ea18e2bb6)
2 files changed