WifiServiceImpl: add LOHS permission checks
The new calls to start/stopLocalOnlyHotspot and
getLocalOnlyHotspotConfig need to have permission checks to make sure
only valid callers can turn the hotspot on since that disables wifi.
Enabling LocalOnlyHotspot also requires the location permission and that
Location services are enabled. A utility was added to ease testing.
This CL also adds tests verifying the permission checks.
Bug: 36760523
Bug: 37082656
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I91b28ccb44113bb6233a50f643db785e0a509d53
4 files changed