diff --git a/app/src/main/java/com/cringe_studios/code_guard/fragment/SettingsFragment.java b/app/src/main/java/com/cringe_studios/code_guard/fragment/SettingsFragment.java
index 6e1a0f8..e9474ca 100644
--- a/app/src/main/java/com/cringe_studios/code_guard/fragment/SettingsFragment.java
+++ b/app/src/main/java/com/cringe_studios/code_guard/fragment/SettingsFragment.java
@@ -125,8 +125,15 @@ public class SettingsFragment extends NamedFragment {
});
boolean biometricSupported = BiometricUtil.isSupported(requireContext());
- if(SettingsUtil.isDatabaseEncrypted(requireContext()) && biometricSupported) {
- binding.settingsBiometricLock.setChecked(SettingsUtil.isBiometricEncryption(requireContext()));
+ binding.settingsBiometricLock.setEnabled(SettingsUtil.isDatabaseEncrypted(requireContext()) && biometricSupported);
+ binding.settingsBiometricLock.setChecked(SettingsUtil.isBiometricEncryption(requireContext()));
+
+ if(!biometricSupported) {
+ binding.settingsBiometricLockInfo.setVisibility(View.VISIBLE);
+ binding.settingsBiometricLockInfo.setText(R.string.biometric_encryption_unavailable);
+ }
+
+ if(biometricSupported) {
binding.settingsBiometricLock.setOnCheckedChangeListener((view, checked) -> {
if(checked) {
OTPDatabase.promptLoadDatabase(requireActivity(), () -> {
@@ -150,10 +157,6 @@ public class SettingsFragment extends NamedFragment {
SettingsUtil.disableBiometricEncryption(requireContext());
}
});
- }else {
- binding.settingsBiometricLock.setChecked(false);
- binding.settingsBiometricLock.setEnabled(false);
- // TODO: inform user
}
binding.settingsScreenSecurity.setChecked(SettingsUtil.isScreenSecurity(requireContext()));
diff --git a/app/src/main/res/layout/fragment_settings.xml b/app/src/main/res/layout/fragment_settings.xml
index 80b1c5e..cdd6af0 100644
--- a/app/src/main/res/layout/fragment_settings.xml
+++ b/app/src/main/res/layout/fragment_settings.xml
@@ -59,6 +59,15 @@
android:layout_height="wrap_content"
android:text="@string/settings_biometric_lock" />
+
+
Einstellungen
- Bilder Anzeigen
+ Bilder anzeigen
Paket löschen
Möchtest du das Symbolpaket wirklich löschen?
Aktuell sind keine Symbolpakete installiert!
@@ -165,4 +165,5 @@
Lokalisierung
Ein OTP mit dem Namen des OTPs, das du hinzufügen willst, existiert bereits.\n\nWillst du das neue OTP umbenennen lassen, um sie voneinander zu unterscheiden?
Doppeltes OTP
+ Biometrische Authentifizierung ist deaktiviert, da sie auf deinem Gerät nicht eingerichtet oder nicht verfügbar ist
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index b9e7fd7..5c5c1c5 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -49,8 +49,8 @@
OTP Migration
It seems like you\'re trying to import OTP codes from another app. Do you want to import all codes into this group?
Code %d of %d scanned
- Screen Security
- Hide Codes
+ Screen security
+ Hide codes
Enable encryption
Password
Set Password
@@ -102,7 +102,7 @@
Type
Algorithm
Digits
- Show Images
+ Show images
Delete pack
Do you want to delete the icon pack?
No icon packs are currently installed
@@ -154,7 +154,7 @@
Search
Use themed background
Use minimalist theme
- Icon Packs
+ Icon packs
Import icon pack
Manage icon packs
Save
@@ -171,6 +171,7 @@
Localization
An OTP with the name of the OTP you\'re trying to add already exists.\n\nDo you want to automatically rename the new OTP to distinguish them from each other?
Duplicate OTP
+ Biometric authentication is disabled because it is not set up or not available on your device
- Image from icon pack
- Image from gallery