From a8bdbbc62d426d184a6bc528c8b757e07bc51680 Mon Sep 17 00:00:00 2001 From: Jason Whitmore Date: Tue, 4 Jun 2024 16:35:51 -0700 Subject: [PATCH] LocationPickerActivity.java: rearrange method calls. Before this change, a method call to move the map to the device's GPS location was called at the very end of the map setup method. This would move the map away from the media's EXIF location data (if it was available). This change places the method call to move the map to the device's GPS location before the method call to move the map to the media's EXIF location (if the data is available). In short, if no exif data is available, the map attempts to move to the device's GPS location. If the exif location data does exist, the map will move to that location. --- .../free/nrw/commons/LocationPicker/LocationPickerActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/fr/free/nrw/commons/LocationPicker/LocationPickerActivity.java b/app/src/main/java/fr/free/nrw/commons/LocationPicker/LocationPickerActivity.java index eae51d1db..56c4919a2 100644 --- a/app/src/main/java/fr/free/nrw/commons/LocationPicker/LocationPickerActivity.java +++ b/app/src/main/java/fr/free/nrw/commons/LocationPicker/LocationPickerActivity.java @@ -327,12 +327,12 @@ public class LocationPickerActivity extends BaseActivity implements } private void setupMapView() { + requestLocationPermissions(); moveMapToMediaLocation(); modifyLocationButton.setOnClickListener(v -> onClickModifyLocation()); removeLocationButton.setOnClickListener(v -> onClickRemoveLocation()); showInMapButton.setOnClickListener(v -> showInMap()); darkThemeSetup(); - requestLocationPermissions(); } /**