mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Pass the GPSExtractor created in FileProcessor.java back into ShareActivity
This commit is contained in:
parent
a082f509e7
commit
dac6a15e60
2 changed files with 3 additions and 2 deletions
|
|
@ -99,7 +99,7 @@ public class FileProcessor implements SimilarImageDialogFragment.onResponse{
|
||||||
* Gets coordinates for category suggestions, either from EXIF data or user location
|
* Gets coordinates for category suggestions, either from EXIF data or user location
|
||||||
* @param gpsEnabled if true use GPS
|
* @param gpsEnabled if true use GPS
|
||||||
*/
|
*/
|
||||||
void getFileCoordinates(boolean gpsEnabled) {
|
GPSExtractor getFileCoordinates(boolean gpsEnabled) {
|
||||||
Timber.d("Calling GPSExtractor");
|
Timber.d("Calling GPSExtractor");
|
||||||
try {
|
try {
|
||||||
ParcelFileDescriptor descriptor = contentResolver.openFileDescriptor(mediaUri, "r");
|
ParcelFileDescriptor descriptor = contentResolver.openFileDescriptor(mediaUri, "r");
|
||||||
|
|
@ -127,6 +127,7 @@ public class FileProcessor implements SimilarImageDialogFragment.onResponse{
|
||||||
} catch (FileNotFoundException e) {
|
} catch (FileNotFoundException e) {
|
||||||
Timber.w("File not found: " + mediaUri, e);
|
Timber.w("File not found: " + mediaUri, e);
|
||||||
}
|
}
|
||||||
|
return imageObj;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -306,7 +306,7 @@ public class ShareActivity
|
||||||
ContentResolver contentResolver = this.getContentResolver();
|
ContentResolver contentResolver = this.getContentResolver();
|
||||||
fileObj = new FileProcessor(mediaUri, contentResolver, this);
|
fileObj = new FileProcessor(mediaUri, contentResolver, this);
|
||||||
checkIfFileExists();
|
checkIfFileExists();
|
||||||
fileObj.getFileCoordinates(locationPermitted);
|
imageObj = fileObj.getFileCoordinates(locationPermitted);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue