Optimize FileProcessor

This commit is contained in:
misaochan 2018-06-23 20:07:06 +10:00
parent be5c05435e
commit 4a5257c2c7
2 changed files with 3 additions and 5 deletions

View file

@ -119,7 +119,7 @@ public class FileProcessor implements SimilarImageDialogFragment.onResponse {
if (decimalCoords == null || !imageObj.imageCoordsExists) { if (decimalCoords == null || !imageObj.imageCoordsExists) {
//Find other photos taken around the same time which has gps coordinates //Find other photos taken around the same time which has gps coordinates
if (!haveCheckedForOtherImages) if (!haveCheckedForOtherImages)
findOtherImages(gpsEnabled);// Do not do repeat the process findOtherImages();// Do not do repeat the process
} else { } else {
useImageCoords(); useImageCoords();
} }
@ -137,9 +137,8 @@ public class FileProcessor implements SimilarImageDialogFragment.onResponse {
/** /**
* Find other images around the same location that were taken within the last 20 sec * Find other images around the same location that were taken within the last 20 sec
* *
* @param gpsEnabled True if GPS is enabled
*/ */
private void findOtherImages(boolean gpsEnabled) { private void findOtherImages() {
Timber.d("filePath" + getPathOfMediaOrCopy()); Timber.d("filePath" + getPathOfMediaOrCopy());
long timeOfCreation = new File(filePath).lastModified();//Time when the original image was created long timeOfCreation = new File(filePath).lastModified();//Time when the original image was created

View file

@ -1,6 +1,5 @@
package fr.free.nrw.commons.upload; package fr.free.nrw.commons.upload;
import android.content.SharedPreferences;
import android.media.ExifInterface; import android.media.ExifInterface;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
@ -16,7 +15,7 @@ import timber.log.Timber;
* is uploaded, extract latitude and longitude from EXIF data of image. * is uploaded, extract latitude and longitude from EXIF data of image.
*/ */
public class GPSExtractor { public class GPSExtractor {
private ExifInterface exif; private ExifInterface exif;
private double decLatitude; private double decLatitude;
private double decLongitude; private double decLongitude;