Merge pull request #1163 from michaelschattgen/feature/password-reminder-dialog

Add dialog when password reminder is active
This commit is contained in:
Alexander Bakker 2023-08-20 10:43:36 +02:00 committed by GitHub
commit 84abffb2ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View File

@ -162,7 +162,16 @@ public class AuthActivity extends AegisActivity {
});
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());
}
});
}

View File

@ -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>