This commit is contained in:
Tad 2017-12-16 04:15:50 -05:00
parent 3997947f92
commit b8c68528f6

View file

@ -24,6 +24,7 @@ public class MalwareScanner {
private static TextView log = null;
private static AsyncTask<Boolean, String, String> malwareScannerTask = null;
private static final int MAX_FILE_SIZE = (1000 * 1000) * 50; //50MB
private static long scanTime = 0;
private static HashMap<String, File> fileHashesMD5 = new HashMap<>();
@ -152,7 +153,7 @@ public class MalwareScanner {
@Override
protected void onPostExecute(String result) {
log.append("Scan complete in " + ((SystemClock.elapsedRealtime() - scanTime) / 1000) + " seconds!\n\n\n\n\n");
log.append("Scan completed in " + ((SystemClock.elapsedRealtime() - scanTime) / 1000) + " seconds!\n\n\n\n\n");
}
}
@ -169,7 +170,7 @@ public class MalwareScanner {
filesAll.addAll(filesTmp);
}
} else {
if(f.length() < (1000*1000*50)) {//Exclude files larger than 50MB for performance
if(f.length() <= MAX_FILE_SIZE) {//Exclude files larger than 50MB for performance
filesAll.add(f);
}
}