LocationPickerActivity.java: remove redundant method, renaming method

Before this change, there were two methods with the same behavior.

This change removes the newer method and renames the old method to the descriptive name the newer one had.
Additionally, code which calls this method has been changed to reflect the new name.
This commit is contained in:
Jason Whitmore 2024-05-28 19:08:04 -07:00
parent bff14dafde
commit d1c849af36

View file

@ -272,19 +272,6 @@ public class LocationPickerActivity extends BaseActivity implements
}
}
/**
* Moves the center of the map to the media's location (likely EXIF data), if that data
* is available.
*/
private void moveMapToMediaLocation(){
if(cameraPosition != null){
double latitude = cameraPosition.getLatitude();
double longitude = cameraPosition.getLongitude();
moveMapTo(latitude, longitude);
}
}
/**
* For showing credits
*/
@ -340,7 +327,7 @@ public class LocationPickerActivity extends BaseActivity implements
}
private void setupMapView() {
adjustCameraBasedOnOptions();
moveMapToMediaLocation();
modifyLocationButton.setOnClickListener(v -> onClickModifyLocation());
removeLocationButton.setOnClickListener(v -> onClickRemoveLocation());
showInMapButton.setOnClickListener(v -> showInMap());
@ -416,12 +403,16 @@ public class LocationPickerActivity extends BaseActivity implements
}
/**
* move the location to the current media coordinates
* Moves the center of the map to the media's location (likely EXIF data), if that data
* is available.
*/
private void adjustCameraBasedOnOptions() {
private void moveMapToMediaLocation() {
if (cameraPosition != null) {
mapView.getController().setCenter(new GeoPoint(cameraPosition.getLatitude(),
cameraPosition.getLongitude()));
GeoPoint point = new GeoPoint(cameraPosition.getLatitude(),
cameraPosition.getLongitude());
moveMapTo(point);
}
}