Skip to content

Commit

Permalink
Scmi 112253 no coordinates in bundle show results (#384)
Browse files Browse the repository at this point in the history
* SCMI-112253 When no location in the bundle, we are still doing a search and showing results

* SCMI-112253 Only add the default location if permission not granted

* SCMI-112253 Only add the default location if permission not granted

* SCMI-112253 Use the exiting function

---------

Co-authored-by: arturo.jimenez <[email protected]>
  • Loading branch information
artjimlop and arturo.jimenez authored Jan 10, 2024
1 parent dd13ecd commit c9d758b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions leku/src/main/java/com/adevinta/leku/LocationPickerActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1213,11 +1213,13 @@ class LocationPickerActivity :
}

private fun setDefaultLocation() {
currentLocation = Location(getString(R.string.leku_network_resource))
currentLocation?.latitude = 0.0
currentLocation?.longitude = 0.0
setCurrentPositionLocation()
isLocationInformedFromBundle = true
if (PermissionUtils.isLocationPermissionGranted(applicationContext)) {
currentLocation = Location(getString(R.string.leku_network_resource))
currentLocation?.latitude = 0.0
currentLocation?.longitude = 0.0
setCurrentPositionLocation()
isLocationInformedFromBundle = true
}
}

private fun startVoiceRecognitionActivity() {
Expand Down

0 comments on commit c9d758b

Please sign in to comment.