mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Merge getFileMetadata() and getLocationData()
This commit is contained in:
parent
f0ba51a923
commit
333a0e0510
1 changed files with 6 additions and 13 deletions
|
|
@ -350,26 +350,19 @@ public class ShareActivity
|
|||
}
|
||||
}
|
||||
|
||||
public void getFileMetadata() {
|
||||
public void getFileMetadata(boolean gpsEnabled) {
|
||||
filePath = FileUtils.getPath(this, mediaUri);
|
||||
Log.d(TAG, "Filepath: " + filePath);
|
||||
Log.d(TAG, "Calling GPSExtractor");
|
||||
imageObj = new GPSExtractor(filePath, this);
|
||||
|
||||
if (filePath != null && !filePath.equals("")) {
|
||||
// Gets image coords from exif data
|
||||
decimalCoords = imageObj.getCoords(false);
|
||||
useImageCoords();
|
||||
}
|
||||
}
|
||||
|
||||
public void getLocationData() {
|
||||
if(imageObj == null) {
|
||||
imageObj = new GPSExtractor(filePath, this);
|
||||
}
|
||||
|
||||
decimalCoords = imageObj.getCoords(true);
|
||||
useImageCoords();
|
||||
if (filePath != null && !filePath.equals("")) {
|
||||
// Gets image coords from exif data
|
||||
decimalCoords = imageObj.getCoords(gpsEnabled);
|
||||
useImageCoords();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue