Skip to content

Commit

Permalink
Always check for permission when opening search widget
Browse files Browse the repository at this point in the history
This commit closes #38

Signed-off-by: Rafael Chagas <[email protected]>
  • Loading branch information
rtchagas committed Aug 3, 2019
1 parent eac3732 commit 52aa643
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,12 @@ class PlacePickerActivity : AppCompatActivity(), PingKoinComponent,

private fun requestPlacesSearch() {

// This only works if location permission is granted
if (!isLocationPermissionGranted) {
checkForPermission()
return
}

// These fields are not charged by Google:
// https://developers.google.com/places/android-sdk/usage-and-billing#basic-data
val placeFields = listOf(
Expand Down

0 comments on commit 52aa643

Please sign in to comment.