From 96f138bfeefb17de52c7b35207ca15fbb13f5a55 Mon Sep 17 00:00:00 2001 From: Tad Date: Sun, 21 Oct 2018 20:52:49 -0400 Subject: [PATCH] Many changes - Add license headers - Reformat code - Change database icon --- .idea/assetWizardSettings.xml | 9 +++++++-- .../spotco/malwarescanner/DatabaseManager.java | 17 +++++++++++++++++ .../spotco/malwarescanner/EventReceiver.java | 17 +++++++++++++++++ .../us/spotco/malwarescanner/LogFragment.java | 17 +++++++++++++++++ .../us/spotco/malwarescanner/MainActivity.java | 17 +++++++++++++++++ .../java/us/spotco/malwarescanner/Scanner.java | 17 +++++++++++++++++ .../spotco/malwarescanner/ScannerFragment.java | 17 +++++++++++++++++ .../spotco/malwarescanner/ScannerService.java | 17 +++++++++++++++++ .../malwarescanner/SettingsFragment.java | 17 +++++++++++++++++ .../java/us/spotco/malwarescanner/Utils.java | 18 ++++++++++++++++++ .../res/drawable/ic_cloud_download_24dp.xml | 9 +++++++++ app/src/main/res/layout/activity_main.xml | 2 +- app/src/main/res/menu/navigation.xml | 2 +- 13 files changed, 172 insertions(+), 4 deletions(-) create mode 100644 app/src/main/res/drawable/ic_cloud_download_24dp.xml diff --git a/.idea/assetWizardSettings.xml b/.idea/assetWizardSettings.xml index 4d74ecb..2c643dc 100644 --- a/.idea/assetWizardSettings.xml +++ b/.idea/assetWizardSettings.xml @@ -3,6 +3,11 @@ diff --git a/app/src/main/java/us/spotco/malwarescanner/DatabaseManager.java b/app/src/main/java/us/spotco/malwarescanner/DatabaseManager.java index 38252be..7dea74e 100644 --- a/app/src/main/java/us/spotco/malwarescanner/DatabaseManager.java +++ b/app/src/main/java/us/spotco/malwarescanner/DatabaseManager.java @@ -1,3 +1,20 @@ +/* +Hypatia: An realtime malware scanner for Android +Copyright (c) 2017-2018 Divested Computing, Inc. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ package us.spotco.malwarescanner; public class DatabaseManager { diff --git a/app/src/main/java/us/spotco/malwarescanner/EventReceiver.java b/app/src/main/java/us/spotco/malwarescanner/EventReceiver.java index 421a375..ec9b1c1 100644 --- a/app/src/main/java/us/spotco/malwarescanner/EventReceiver.java +++ b/app/src/main/java/us/spotco/malwarescanner/EventReceiver.java @@ -1,3 +1,20 @@ +/* +Hypatia: An realtime malware scanner for Android +Copyright (c) 2017-2018 Divested Computing, Inc. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ package us.spotco.malwarescanner; public class EventReceiver { diff --git a/app/src/main/java/us/spotco/malwarescanner/LogFragment.java b/app/src/main/java/us/spotco/malwarescanner/LogFragment.java index 840bfde..fdd13f0 100644 --- a/app/src/main/java/us/spotco/malwarescanner/LogFragment.java +++ b/app/src/main/java/us/spotco/malwarescanner/LogFragment.java @@ -1,3 +1,20 @@ +/* +Hypatia: An realtime malware scanner for Android +Copyright (c) 2018 Divested Computing, Inc. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ package us.spotco.malwarescanner; diff --git a/app/src/main/java/us/spotco/malwarescanner/MainActivity.java b/app/src/main/java/us/spotco/malwarescanner/MainActivity.java index b608ab3..6f9ab37 100644 --- a/app/src/main/java/us/spotco/malwarescanner/MainActivity.java +++ b/app/src/main/java/us/spotco/malwarescanner/MainActivity.java @@ -1,3 +1,20 @@ +/* +Hypatia: An realtime malware scanner for Android +Copyright (c) 2018 Divested Computing, Inc. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ package us.spotco.malwarescanner; import android.os.Bundle; diff --git a/app/src/main/java/us/spotco/malwarescanner/Scanner.java b/app/src/main/java/us/spotco/malwarescanner/Scanner.java index 33d211a..7cf7d1b 100644 --- a/app/src/main/java/us/spotco/malwarescanner/Scanner.java +++ b/app/src/main/java/us/spotco/malwarescanner/Scanner.java @@ -1,3 +1,20 @@ +/* +Hypatia: An realtime malware scanner for Android +Copyright (c) 2017-2018 Divested Computing, Inc. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ package us.spotco.malwarescanner; public class Scanner { diff --git a/app/src/main/java/us/spotco/malwarescanner/ScannerFragment.java b/app/src/main/java/us/spotco/malwarescanner/ScannerFragment.java index 361a388..6e271e9 100644 --- a/app/src/main/java/us/spotco/malwarescanner/ScannerFragment.java +++ b/app/src/main/java/us/spotco/malwarescanner/ScannerFragment.java @@ -1,3 +1,20 @@ +/* +Hypatia: An realtime malware scanner for Android +Copyright (c) 2018 Divested Computing, Inc. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ package us.spotco.malwarescanner; diff --git a/app/src/main/java/us/spotco/malwarescanner/ScannerService.java b/app/src/main/java/us/spotco/malwarescanner/ScannerService.java index 9223e65..9ee9b4c 100644 --- a/app/src/main/java/us/spotco/malwarescanner/ScannerService.java +++ b/app/src/main/java/us/spotco/malwarescanner/ScannerService.java @@ -1,3 +1,20 @@ +/* +Hypatia: An realtime malware scanner for Android +Copyright (c) 2017-2018 Divested Computing, Inc. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ package us.spotco.malwarescanner; public class ScannerService { diff --git a/app/src/main/java/us/spotco/malwarescanner/SettingsFragment.java b/app/src/main/java/us/spotco/malwarescanner/SettingsFragment.java index 7d2a84b..d3b6722 100644 --- a/app/src/main/java/us/spotco/malwarescanner/SettingsFragment.java +++ b/app/src/main/java/us/spotco/malwarescanner/SettingsFragment.java @@ -1,3 +1,20 @@ +/* +Hypatia: An realtime malware scanner for Android +Copyright (c) 2018 Divested Computing, Inc. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ package us.spotco.malwarescanner; diff --git a/app/src/main/java/us/spotco/malwarescanner/Utils.java b/app/src/main/java/us/spotco/malwarescanner/Utils.java index ef8fe5e..bd47deb 100644 --- a/app/src/main/java/us/spotco/malwarescanner/Utils.java +++ b/app/src/main/java/us/spotco/malwarescanner/Utils.java @@ -1,3 +1,20 @@ +/* +Hypatia: An realtime malware scanner for Android +Copyright (c) 2017-2018 Divested Computing, Inc. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ package us.spotco.malwarescanner; import android.app.ActivityManager; @@ -21,6 +38,7 @@ public class Utils { } private static ThreadPoolExecutor threadPoolExecutor = null; + public static ThreadPoolExecutor getThreadPoolExecutor() { if (threadPoolExecutor == null) { threadPoolExecutor = (ThreadPoolExecutor) Executors.newScheduledThreadPool(getMaxThreads()); diff --git a/app/src/main/res/drawable/ic_cloud_download_24dp.xml b/app/src/main/res/drawable/ic_cloud_download_24dp.xml new file mode 100644 index 0000000..7ea487f --- /dev/null +++ b/app/src/main/res/drawable/ic_cloud_download_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 20798be..b9d146d 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -14,7 +14,7 @@ app:layout_constraintBottom_toTopOf="@+id/navigation" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent"/> + app:layout_constraintTop_toTopOf="parent" />