WifiScanningServiceImpl: Hide requests from app-ops if flag set

If the newly added |hideFromAppOps| flag is set for scan requests, don't
invoke |AppOpsManager.noteOp()| method to log the request in app-ops.
Instead use |AppOpsManager.checkOp()| method to just ensure that the app
has the necessary permission to perform the operation, but not log it.

Also, renamed the existing |checkAppOpAllowed()| method to
|noteAppOpAllowed| in WifiPermissionsUtil to better reflect the
underlying call. The new |checkAppOpAllowed()| helper method will
instead invoke |AppOpsManager.checkOp|.

Bug: 119833663
Test: ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I3942513d17c23362ba7f2c5ca67bc9e3b5046ab5
4 files changed