mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-31 23:03:54 +01:00
LocationPickerActivity.java: rewrite comments to clarify if statement
Before this change, a comment in showInMapApp did not properly describe an if statement's intended behavior. After this change, the old comment was removed and 2 new comments were added in each part of the if statement to properly describe the intended behavior.
This commit is contained in:
parent
caed893d23
commit
e55f4916ee
1 changed files with 2 additions and 1 deletions
|
|
@ -402,11 +402,12 @@ public class LocationPickerActivity extends BaseActivity implements
|
||||||
private void showInMapApp() {
|
private void showInMapApp() {
|
||||||
fr.free.nrw.commons.location.LatLng position = null;
|
fr.free.nrw.commons.location.LatLng position = null;
|
||||||
|
|
||||||
//Check to see if EXIF location data is available
|
|
||||||
if(activity.equals("UploadActivity") && cameraPosition != null){
|
if(activity.equals("UploadActivity") && cameraPosition != null){
|
||||||
|
//EXIF location data is available
|
||||||
position = new fr.free.nrw.commons.location.LatLng(cameraPosition.getLatitude(),
|
position = new fr.free.nrw.commons.location.LatLng(cameraPosition.getLatitude(),
|
||||||
cameraPosition.getLongitude(), 0.0f);
|
cameraPosition.getLongitude(), 0.0f);
|
||||||
} else if(mapView != null){
|
} else if(mapView != null){
|
||||||
|
//EXIF location data is not available
|
||||||
position = new fr.free.nrw.commons.location.LatLng(mapView.getMapCenter().getLatitude(),
|
position = new fr.free.nrw.commons.location.LatLng(mapView.getMapCenter().getLatitude(),
|
||||||
mapView.getMapCenter().getLongitude(), 0.0f);
|
mapView.getMapCenter().getLongitude(), 0.0f);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue