mirror of
https://github.com/MaintainTeam/Hypatia.git
synced 2025-03-01 05:48:23 +03:00
Fix
This commit is contained in:
parent
9d040c8b5b
commit
7f7c811f1d
3 changed files with 4 additions and 3 deletions
|
@ -6,7 +6,7 @@ android {
|
||||||
applicationId "us.spotco.malwarescanner"
|
applicationId "us.spotco.malwarescanner"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 26
|
targetSdkVersion 26
|
||||||
versionCode 19
|
versionCode 20
|
||||||
versionName "1.9"
|
versionName "1.9"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
|
|
@ -56,6 +56,7 @@ class MalwareScanner extends AsyncTask<Set<File>, Object, String> {
|
||||||
.setVisibility(Notification.VISIBILITY_SECRET)
|
.setVisibility(Notification.VISIBILITY_SECRET)
|
||||||
.setDefaults(Notification.DEFAULT_VIBRATE);
|
.setDefaults(Notification.DEFAULT_VIBRATE);
|
||||||
notificationManager.notify(new Random().nextInt(), mBuilder.build());
|
notificationManager.notify(new Random().nextInt(), mBuilder.build());
|
||||||
|
//Log.d("Theia", result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +76,7 @@ class MalwareScanner extends AsyncTask<Set<File>, Object, String> {
|
||||||
publishProgress(filesToScan[0].size() + " files pending scan\n", true);
|
publishProgress(filesToScan[0].size() + " files pending scan\n", true);
|
||||||
|
|
||||||
Database.loadDatabase(context, true, Database.signatureDatabases);
|
Database.loadDatabase(context, true, Database.signatureDatabases);
|
||||||
if(Database.getSignatureCount() >= 0) {
|
if (Database.getSignatureCount() >= 0) {
|
||||||
publishProgress("Loaded database with " + Database.getSignatureCount() + " signatures\n", true);
|
publishProgress("Loaded database with " + Database.getSignatureCount() + " signatures\n", true);
|
||||||
|
|
||||||
//Get file hashes
|
//Get file hashes
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class MalwareScannerService extends Service {
|
||||||
case FileObserver.MOVED_TO:
|
case FileObserver.MOVED_TO:
|
||||||
case FileObserver.CLOSE_WRITE:
|
case FileObserver.CLOSE_WRITE:
|
||||||
File file = new File(path);
|
File file = new File(path);
|
||||||
if (file.exists() && file.length() > 0 && file.length() <= Utils.MAX_SCAN_SIZE_REALTIME) {
|
if (file.exists() && /*file.length() > 0 &&*/ file.length() <= Utils.MAX_SCAN_SIZE_REALTIME) {
|
||||||
Set<File> filesToScan = new HashSet<>();
|
Set<File> filesToScan = new HashSet<>();
|
||||||
filesToScan.add(file);
|
filesToScan.add(file);
|
||||||
new MalwareScanner(null, getApplicationContext(), false).execute(filesToScan);
|
new MalwareScanner(null, getApplicationContext(), false).execute(filesToScan);
|
||||||
|
|
Loading…
Add table
Reference in a new issue