From 70e931681eb82fd278ae0784a3d819e97cf740c2 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 18 Mar 2021 11:33:59 +0100 Subject: [PATCH] Changed default of biometric notify --- app/src/main/java/eu/faircode/email/ApplicationEx.java | 3 +++ app/src/main/java/eu/faircode/email/Core.java | 2 +- .../java/eu/faircode/email/FragmentOptionsNotifications.java | 2 +- app/src/main/res/layout/fragment_options_notifications.xml | 1 + app/src/main/res/values/strings.xml | 2 +- 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ApplicationEx.java b/app/src/main/java/eu/faircode/email/ApplicationEx.java index 78e6b55ccd..446a9f89b4 100644 --- a/app/src/main/java/eu/faircode/email/ApplicationEx.java +++ b/app/src/main/java/eu/faircode/email/ApplicationEx.java @@ -421,6 +421,9 @@ public class ApplicationEx extends Application } else if (version < 1525) { if (!prefs.contains("download")) editor.putInt("download", 512 * 1024); + } else if (version < 1533) { + if (!prefs.contains("biometrics_notify")) + editor.putBoolean("biometrics_notify", false); } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !BuildConfig.DEBUG) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index e6a1e8053d..6c8b7d3541 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -3813,7 +3813,7 @@ class Core { boolean wearable_preview = prefs.getBoolean("wearable_preview", false); boolean biometrics = prefs.getBoolean("biometrics", false); String pin = prefs.getString("pin", null); - boolean biometric_notify = prefs.getBoolean("biometrics_notify", false); + boolean biometric_notify = prefs.getBoolean("biometrics_notify", true); boolean pro = ActivityBilling.isPro(context); boolean redacted = ((biometrics || !TextUtils.isEmpty(pin)) && !biometric_notify); diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsNotifications.java b/app/src/main/java/eu/faircode/email/FragmentOptionsNotifications.java index fbfed17bd9..6f0e1d6621 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsNotifications.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsNotifications.java @@ -560,7 +560,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared swNotifyPreviewOnly.setChecked(prefs.getBoolean("notify_preview_only", false)); swWearablePreview.setChecked(prefs.getBoolean("wearable_preview", false)); swMessagingStyle.setChecked(prefs.getBoolean("notify_messaging", false)); - swBiometricsNotify.setChecked(prefs.getBoolean("biometrics_notify", false)); + swBiometricsNotify.setChecked(prefs.getBoolean("biometrics_notify", true)); swAlertOnce.setChecked(!prefs.getBoolean("alert_once", true)); enableOptions(); diff --git a/app/src/main/res/layout/fragment_options_notifications.xml b/app/src/main/res/layout/fragment_options_notifications.xml index 23b2fff49f..16aede4d8a 100644 --- a/app/src/main/res/layout/fragment_options_notifications.xml +++ b/app/src/main/res/layout/fragment_options_notifications.xml @@ -607,6 +607,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginTop="12dp" + android:checked="true" android:text="@string/title_advanced_biometrics_notify" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e7963ba7c3..141f98c4f9 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -580,7 +580,7 @@ Disabling this option will disable receiving and sending messages on mobile internet connections Assuming no roaming within the EU Enabling this can cause connection problems on some devices - This can result in messages not being synchronized, for example when using a VPN, but also in other situations + This can result in not synchronizing messages, for example when using a VPN, but also in other situations The read/write timeout will be set to the double of the connection timeout. Higher values will result in more battery use. Enabling this will disable weak SSL protocols and ciphers, which can lead to connection problems Messages headers will always be fetched when roaming. You can use the device\'s roaming setting to disable internet while roaming.