Move LOCK permission check to WifiServiceImpl

In current implementation the permission checks for WifiLock operations
is performed inside the WifiLockManager. However, as we are currently
running this part of the code from the Wifi handler thread, the check is not
effective and always succeeds.

In this commit, the permission checks are moved to the WifiServiceImpl
before switching to the wifi handler thread.

Bug: 130359136
Test: atest com.android.wifi.server
Test: atest android.permission.cts.NoWakeLockPermissionTest#testWifiLockAcquire

Change-Id: If307ebc693e9df67c2075159a3f394835d5b6cf4
3 files changed