Add permission checking to WifiDialogActivity

- Use getCallingPackage() to get calling package.

- Check if the calling package has ACCESS_COARSE_LOCATION or
ACCESS_COARSE_LOCATION permission.

- Only set result data to permission granted callers

Bug: 185126813
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiDialogActivityTest

Change-Id: If7ca069c842ed2bd1aed23f9d4041473c68a4dad
2 files changed