mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Remove unnecessary context var
This commit is contained in:
parent
df7a944c78
commit
927ceb9aba
2 changed files with 3 additions and 7 deletions
|
|
@ -106,7 +106,7 @@ public class FileProcessor implements SimilarImageDialogFragment.onResponse {
|
|||
ParcelFileDescriptor descriptor = contentResolver.openFileDescriptor(mediaUri, "r");
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
if (descriptor != null) {
|
||||
imageObj = new GPSExtractor(descriptor.getFileDescriptor(), context, prefs);
|
||||
imageObj = new GPSExtractor(descriptor.getFileDescriptor(), prefs);
|
||||
}
|
||||
} else {
|
||||
String filePath = getPathOfMediaOrCopy();
|
||||
|
|
@ -161,7 +161,7 @@ public class FileProcessor implements SimilarImageDialogFragment.onResponse {
|
|||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
if (descriptor != null) {
|
||||
tempImageObj = new GPSExtractor(descriptor.getFileDescriptor(), context, prefs);
|
||||
tempImageObj = new GPSExtractor(descriptor.getFileDescriptor(), prefs);
|
||||
}
|
||||
} else {
|
||||
if (filePath != null) {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ import timber.log.Timber;
|
|||
*/
|
||||
public class GPSExtractor {
|
||||
|
||||
private final Context context;
|
||||
private SharedPreferences prefs;
|
||||
private ExifInterface exif;
|
||||
private double decLatitude;
|
||||
|
|
@ -38,11 +37,9 @@ public class GPSExtractor {
|
|||
/**
|
||||
* Construct from the file descriptor of the image (only for API 24 or newer).
|
||||
* @param fileDescriptor the file descriptor of the image
|
||||
* @param context the context
|
||||
*/
|
||||
@RequiresApi(24)
|
||||
public GPSExtractor(@NonNull FileDescriptor fileDescriptor, Context context, SharedPreferences prefs) {
|
||||
this.context = context;
|
||||
public GPSExtractor(@NonNull FileDescriptor fileDescriptor, SharedPreferences prefs) {
|
||||
this.prefs = prefs;
|
||||
try {
|
||||
exif = new ExifInterface(fileDescriptor);
|
||||
|
|
@ -63,7 +60,6 @@ public class GPSExtractor {
|
|||
} catch (IOException | IllegalArgumentException e) {
|
||||
Timber.w(e);
|
||||
}
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue