mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Remove context in other constructor
This commit is contained in:
parent
927ceb9aba
commit
0fd77a1c60
3 changed files with 6 additions and 8 deletions
|
|
@ -111,7 +111,7 @@ public class FileProcessor implements SimilarImageDialogFragment.onResponse {
|
|||
} else {
|
||||
String filePath = getPathOfMediaOrCopy();
|
||||
if (filePath != null) {
|
||||
imageObj = new GPSExtractor(filePath, context, prefs);
|
||||
imageObj = new GPSExtractor(filePath, prefs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -165,7 +165,7 @@ public class FileProcessor implements SimilarImageDialogFragment.onResponse {
|
|||
}
|
||||
} else {
|
||||
if (filePath != null) {
|
||||
tempImageObj = new GPSExtractor(file.getAbsolutePath(), context, prefs);
|
||||
tempImageObj = new GPSExtractor(file.getAbsolutePath(), prefs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
package fr.free.nrw.commons.upload;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.location.Criteria;
|
||||
import android.location.Location;
|
||||
import android.location.LocationListener;
|
||||
import android.location.LocationManager;
|
||||
|
|
@ -51,9 +49,9 @@ public class GPSExtractor {
|
|||
/**
|
||||
* Construct from the file path of the image.
|
||||
* @param path file path of the image
|
||||
* @param context the context
|
||||
*
|
||||
*/
|
||||
public GPSExtractor(@NonNull String path, Context context, SharedPreferences prefs) {
|
||||
public GPSExtractor(@NonNull String path, SharedPreferences prefs) {
|
||||
this.prefs = prefs;
|
||||
try {
|
||||
exif = new ExifInterface(path);
|
||||
|
|
|
|||
|
|
@ -329,12 +329,12 @@ public class MultipleShareActivity extends AuthenticatedActivity
|
|||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
ParcelFileDescriptor fd = getContentResolver().openFileDescriptor(imageUri,"r");
|
||||
if (fd != null) {
|
||||
gpsExtractor = new GPSExtractor(fd.getFileDescriptor(),this,prefs);
|
||||
gpsExtractor = new GPSExtractor(fd.getFileDescriptor(), prefs);
|
||||
}
|
||||
} else {
|
||||
String filePath = FileUtils.getPath(this,imageUri);
|
||||
if (filePath != null) {
|
||||
gpsExtractor = new GPSExtractor(filePath,this,prefs);
|
||||
gpsExtractor = new GPSExtractor(filePath, prefs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue