mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-11-04 08:43:52 +01:00 
			
		
		
		
	Refactor detectUnwantedPictures()
This commit is contained in:
		
							parent
							
								
									d1981494ad
								
							
						
					
					
						commit
						56eed67ac4
					
				
					 1 changed files with 6 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -455,7 +455,7 @@ public class ShareActivity
 | 
			
		|||
                                 //we are processing images that are already on server???...
 | 
			
		||||
                                if (duplicateCheckPassed) {
 | 
			
		||||
                                    //image can be uploaded, so now check if its a useless picture or not
 | 
			
		||||
                                    performUnwantedPictureDetectionProcess();
 | 
			
		||||
                                    detectUnwantedPictures();
 | 
			
		||||
                                }
 | 
			
		||||
                            },mwApi);
 | 
			
		||||
                    fileAsyncTask.execute();
 | 
			
		||||
| 
						 | 
				
			
			@ -469,12 +469,13 @@ public class ShareActivity
 | 
			
		|||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private void performUnwantedPictureDetectionProcess() {
 | 
			
		||||
    /**
 | 
			
		||||
     * Calls the async task that detects if image is fuzzy, too dark, etc
 | 
			
		||||
     */
 | 
			
		||||
    private void detectUnwantedPictures() {
 | 
			
		||||
        String imageMediaFilePath = FileUtils.getPath(this,mediaUri);
 | 
			
		||||
        DetectUnwantedPicturesAsync detectUnwantedPicturesAsync
 | 
			
		||||
                = new DetectUnwantedPicturesAsync(new WeakReference<Activity>(this)
 | 
			
		||||
                                                                , imageMediaFilePath);
 | 
			
		||||
 | 
			
		||||
                = new DetectUnwantedPicturesAsync(new WeakReference<Activity>(this), imageMediaFilePath);
 | 
			
		||||
        detectUnwantedPicturesAsync.execute();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue