From ef069e49affde8009e7e5bcd5aba7c32ee7b9f04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Sch=C3=A4ttgen?= Date: Fri, 18 Aug 2023 10:29:53 +0200 Subject: [PATCH] Add dialog when password reminder is activated --- .../com/beemdevelopment/aegis/ui/AuthActivity.java | 11 ++++++++++- app/src/main/res/values/strings.xml | 4 +++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/beemdevelopment/aegis/ui/AuthActivity.java b/app/src/main/java/com/beemdevelopment/aegis/ui/AuthActivity.java index 447f939ece..b77c9eba78 100644 --- a/app/src/main/java/com/beemdevelopment/aegis/ui/AuthActivity.java +++ b/app/src/main/java/com/beemdevelopment/aegis/ui/AuthActivity.java @@ -162,7 +162,16 @@ protected void onCreate(Bundle savedInstanceState) { }); biometricsButton.setOnClickListener(v -> { - showBiometricPrompt(); + if (_prefs.isPasswordReminderNeeded()) { + Dialogs.showSecureDialog(new AlertDialog.Builder(this) + .setTitle(getString(R.string.password_reminder_dialog_title)) + .setMessage(getString(R.string.password_reminder_dialog_message)) + .setCancelable(false) + .setPositiveButton(android.R.string.ok, (dialog1, which) -> { + showBiometricPrompt(); + }) + .create()); + } }); } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 83490e41e2..e9d65adbe1 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -138,7 +138,9 @@ Please confirm the password The password is incorrect A change in your device\'s security settings has been detected. Please go to \"Aegis -> Settings -> Security -> Biometric unlock\" to disable and re-enable biometric unlock. - Please enter your password. We occasionally ask you to do this so that don\'t forget it. + Please enter your password. We occasionally ask you to do this so that you don\'t forget it. + Biometric unlock by default + We occasionally prompt you to enter your password instead to ensure you haven\'t forgotten it and won\'t get locked out of your vault. After entering your password once, Aegis will default back to biometric unlock until it\'s time for another password reminder. Never Weekly Biweekly