mirror of
https://github.com/MaintainTeam/Hypatia.git
synced 2025-03-01 05:48:23 +03:00
Add a comphrensive credits menu
This commit is contained in:
parent
0218f04e79
commit
22f86dc0e4
9 changed files with 47 additions and 9 deletions
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
|
@ -50,7 +50,7 @@ Credits
|
||||||
- ClamAV for the databases (GPLv2)
|
- ClamAV for the databases (GPLv2)
|
||||||
- ESET for extra databases (BSD 2-Clause)
|
- ESET for extra databases (BSD 2-Clause)
|
||||||
- RecursiveFileObserver.java (GPLv3): Daniel Gultsch, ownCloud Inc., Bartek Przybylski
|
- RecursiveFileObserver.java (GPLv3): Daniel Gultsch, ownCloud Inc., Bartek Przybylski
|
||||||
- Petra Mirelli for the German translations and the app banner/feature graphic.
|
- Petra Mirelli for the German translations, the app banner/feature graphic, and various tweaks.
|
||||||
- Jean-Luc Tibaux and Petra Mirelli for the French translations.
|
- Jean-Luc Tibaux and Petra Mirelli for the French translations.
|
||||||
- Icons: Google/Android/AOSP, License: Apache 2.0, https://google.github.io/material-design-icons/
|
- Icons: Google/Android/AOSP, License: Apache 2.0, https://google.github.io/material-design-icons/
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ android {
|
||||||
applicationId "us.spotco.malwarescanner"
|
applicationId "us.spotco.malwarescanner"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 60
|
versionCode 61
|
||||||
versionName "2.16"
|
versionName "2.16"
|
||||||
resConfigs "en", "de", "fr"
|
resConfigs "en", "de", "fr"
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,6 +142,20 @@ public class MainActivity extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showCredits() {
|
||||||
|
Dialog creditsDialog;
|
||||||
|
AlertDialog.Builder creditsBuilder = new AlertDialog.Builder(this);
|
||||||
|
creditsBuilder.setTitle(getString(R.string.lblFullCredits));
|
||||||
|
creditsBuilder.setItems(R.array.fullCredits, new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
//do nothing
|
||||||
|
}
|
||||||
|
});
|
||||||
|
creditsDialog = creditsBuilder.create();
|
||||||
|
creditsDialog.show();
|
||||||
|
}
|
||||||
|
|
||||||
private void selectDatabases() {
|
private void selectDatabases() {
|
||||||
final String[] databases = {"ClamAV: Android Only (GPL-2.0)", "ClamAV: Main (GPL-2.0)", "ClamAV: Daily [MASSIVE] (GPL-2.0)", "ESET (BSD 2-Clause)", "Extra (unused)"};
|
final String[] databases = {"ClamAV: Android Only (GPL-2.0)", "ClamAV: Main (GPL-2.0)", "ClamAV: Daily [MASSIVE] (GPL-2.0)", "ESET (BSD 2-Clause)", "Extra (unused)"};
|
||||||
final boolean[] databaseDefaults = {
|
final boolean[] databaseDefaults = {
|
||||||
|
@ -151,17 +165,17 @@ public class MainActivity extends AppCompatActivity {
|
||||||
prefs.getBoolean("SIGNATURES_ESET", true),
|
prefs.getBoolean("SIGNATURES_ESET", true),
|
||||||
prefs.getBoolean("SIGNATURES_EXTRA", false)};
|
prefs.getBoolean("SIGNATURES_EXTRA", false)};
|
||||||
|
|
||||||
Dialog dialog;
|
Dialog databaseDialog;
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
AlertDialog.Builder databaseBuilder = new AlertDialog.Builder(this);
|
||||||
builder.setTitle(R.string.lblSelectDatabasesTitle);
|
databaseBuilder.setTitle(R.string.lblSelectDatabasesTitle);
|
||||||
|
|
||||||
builder.setMultiChoiceItems(databases, databaseDefaults, new DialogInterface.OnMultiChoiceClickListener() {
|
databaseBuilder.setMultiChoiceItems(databases, databaseDefaults, new DialogInterface.OnMultiChoiceClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialogInterface, int i, boolean selected) {
|
public void onClick(DialogInterface dialogInterface, int i, boolean selected) {
|
||||||
databaseDefaults[i] = selected;
|
databaseDefaults[i] = selected;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
databaseBuilder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialogInterface, int i) {
|
public void onClick(DialogInterface dialogInterface, int i) {
|
||||||
prefs.edit().putBoolean("SIGNATURES_CLAMAV-ANDROID", databaseDefaults[0]).apply();
|
prefs.edit().putBoolean("SIGNATURES_CLAMAV-ANDROID", databaseDefaults[0]).apply();
|
||||||
|
@ -172,8 +186,8 @@ public class MainActivity extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
dialog = builder.create();
|
databaseDialog = databaseBuilder.create();
|
||||||
dialog.show();
|
databaseDialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -231,6 +245,9 @@ public class MainActivity extends AppCompatActivity {
|
||||||
scanExternal = !item.isChecked();
|
scanExternal = !item.isChecked();
|
||||||
item.setChecked(scanExternal);
|
item.setChecked(scanExternal);
|
||||||
break;
|
break;
|
||||||
|
case R.id.mnuFullCredits:
|
||||||
|
showCredits();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,5 +36,8 @@
|
||||||
android:title="@string/lblScanExternal"
|
android:title="@string/lblScanExternal"
|
||||||
android:checkable="true"
|
android:checkable="true"
|
||||||
android:checked="false" />
|
android:checked="false" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/mnuFullCredits"
|
||||||
|
android:title="@string/lblFullCredits" />
|
||||||
|
|
||||||
</menu>
|
</menu>
|
||||||
|
|
3
app/src/main/res/values-de/arrays.xml
Normal file
3
app/src/main/res/values-de/arrays.xml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
</resources>
|
3
app/src/main/res/values-fr/arrays.xml
Normal file
3
app/src/main/res/values-fr/arrays.xml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
</resources>
|
11
app/src/main/res/values/arrays.xml
Normal file
11
app/src/main/res/values/arrays.xml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string-array name="fullCredits">
|
||||||
|
<item>• Petra Mirelli: German + French Translations, App Banner, Small Tweaks</item>
|
||||||
|
<item>• Jean-Luc Tibaux: French Translations</item>
|
||||||
|
<item>• ClamAV by Cisco: Signature Databases</item>
|
||||||
|
<item>• ESET: Signature Databases</item>
|
||||||
|
<item>• RecursiveFileObserver.java: Daniel Gultsch, ownCloud Inc., Bartek Przybylski</item>
|
||||||
|
<item>• Google: App Icon</item>
|
||||||
|
</string-array>
|
||||||
|
</resources>
|
|
@ -12,6 +12,7 @@
|
||||||
<string name="lblUpdateDatabase">Update databases</string>
|
<string name="lblUpdateDatabase">Update databases</string>
|
||||||
<string name="lblSelectDatabases">Select databases</string>
|
<string name="lblSelectDatabases">Select databases</string>
|
||||||
<string name="lblSelectDatabasesTitle">Select databases to enable</string>
|
<string name="lblSelectDatabasesTitle">Select databases to enable</string>
|
||||||
|
<string name="lblFullCredits">Credits</string>
|
||||||
<string name="lblScanSystem">Scan /system</string>
|
<string name="lblScanSystem">Scan /system</string>
|
||||||
<string name="lblScanApps">Scan App APKs</string>
|
<string name="lblScanApps">Scan App APKs</string>
|
||||||
<string name="lblScanInternal">Scan Internal Storage</string>
|
<string name="lblScanInternal">Scan Internal Storage</string>
|
||||||
|
|
Loading…
Add table
Reference in a new issue