[DO NOT MERGE] Add permission checking to WifiDialogActivity

- Use getCallingPackage() to get calling package.

- Check if the calling package has ACCESS_COARSE_LOCATION or

- Only set result data to permission granted callers

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

Merged-In: If7ca069c842ed2bd1aed23f9d4041473c68a4dad
Change-Id: If7ca069c842ed2bd1aed23f9d4041473c68a4dad
(cherry picked from commit 71e728e934bec9c5d121b285e5c0089f658723d2)
(cherry picked from commit f973f2ac69ef0c90c1c45b1d8495dea3bb024e03)
2 files changed