mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-11-04 08:43:52 +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
 | 
			
		||||
     * @param gpsEnabled if true use GPS
 | 
			
		||||
     */
 | 
			
		||||
    void getFileCoordinates(boolean gpsEnabled) {
 | 
			
		||||
    GPSExtractor getFileCoordinates(boolean gpsEnabled) {
 | 
			
		||||
        Timber.d("Calling GPSExtractor");
 | 
			
		||||
        try {
 | 
			
		||||
                ParcelFileDescriptor descriptor = contentResolver.openFileDescriptor(mediaUri, "r");
 | 
			
		||||
| 
						 | 
				
			
			@ -127,6 +127,7 @@ public class FileProcessor implements SimilarImageDialogFragment.onResponse{
 | 
			
		|||
        } catch (FileNotFoundException e) {
 | 
			
		||||
            Timber.w("File not found: " + mediaUri, e);
 | 
			
		||||
        }
 | 
			
		||||
        return imageObj;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -306,7 +306,7 @@ public class ShareActivity
 | 
			
		|||
        ContentResolver contentResolver = this.getContentResolver();
 | 
			
		||||
        fileObj = new FileProcessor(mediaUri, contentResolver, this);
 | 
			
		||||
        checkIfFileExists();
 | 
			
		||||
        fileObj.getFileCoordinates(locationPermitted);
 | 
			
		||||
        imageObj = fileObj.getFileCoordinates(locationPermitted);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue