Skip to content

Commit

Permalink
Merge pull request #1163 from michaelschattgen/feature/password-remin…
Browse files Browse the repository at this point in the history
…der-dialog

Add dialog when password reminder is active
  • Loading branch information
alexbakker committed Aug 20, 2023
2 parents d3c4884 + ef069e4 commit 84abffb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 10 additions & 1 deletion app/src/main/java/com/beemdevelopment/aegis/ui/AuthActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
});
}

Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@
<string name="set_password_confirm">Please confirm the password</string>
<string name="invalid_password">The password is incorrect</string>
<string name="invalidated_biometrics">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.</string>
<string name="password_reminder">Please enter your password. We occasionally ask you to do this so that don\'t forget it.</string>
<string name="password_reminder">Please enter your password. We occasionally ask you to do this so that you don\'t forget it.</string>
<string name="password_reminder_dialog_title">Biometric unlock by default</string>
<string name="password_reminder_dialog_message">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.</string>
<string name="password_reminder_freq_never">Never</string>
<string name="password_reminder_freq_weekly">Weekly</string>
<string name="password_reminder_freq_biweekly">Biweekly</string>
Expand Down

0 comments on commit 84abffb

Please sign in to comment.