WifiScanningServiceImpl: Clear calling identity before location check

Retrieving the current foreground user info (for location mode check)
needs privileged permissions. Drop the incoming app's context and
assume wifi scanner service context before invoking this method.

PS: We do the same for similar checks in WifiServiceImpl (look at
startScan handling for example)

Bug: 150334212
Test: atest com.android.server.wifi.scanner
Test: TBD: Ensure the failing GTS test works now.
Change-Id: I8f62ce280a67b7c2899e3bff60226661c90fd647
1 file changed
tree: 4eff7d5e05ec6a88912496495e1e67eebb63b376
  1. apex/
  2. service/
  3. PREUPLOAD.cfg