Add more checks for location access

Add checks as detailed in the frameworks/base change, and modify
testapps to be able to test the changes.

Bug: 116258458
Test: testapps
Change-Id: I7eec05d80b1dd0b458342f1b6a026f4c0a23e773
5 files changed