WifiServiceImpl: ap state change response

When responding to getWifiApState API calls, do not send to
WifiStateMachine.  Instead, use the locally stored state updated via
AP_STATE_CHANGE broadcasts. Also add test to verify SecurityException
when the API is called and the permission check fails.

Bug: 31830541
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manual verification from Settings and QuickSettings
Test: wifi integration tests
Test: wifi CTS tests
Change-Id: Id7e2ca73894c3acecfe4ce1ae0e2efa69dc5b07c
4 files changed