mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-04-27 17:26:09 +00:00
Merge pull request #478 from alexbakker/fix-bioprompt-oneplus
Let Android handle the lifecycle of BiometricPrompt
This commit is contained in:
commit
db681273e6
2 changed files with 6 additions and 17 deletions
|
@ -144,7 +144,7 @@ public abstract class AegisActivity extends AppCompatActivity implements AegisAp
|
||||||
* the vault was locked by an external trigger while the Activity was still open.
|
* the vault was locked by an external trigger while the Activity was still open.
|
||||||
*/
|
*/
|
||||||
private boolean isOrphan() {
|
private boolean isOrphan() {
|
||||||
return !(this instanceof MainActivity) && _app.isVaultLocked();
|
return !(this instanceof MainActivity) && !(this instanceof AuthActivity) && _app.isVaultLocked();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Theme getCurrentTheme() {
|
protected Theme getCurrentTheme() {
|
||||||
|
|
|
@ -145,6 +145,10 @@ public class AuthActivity extends AegisActivity {
|
||||||
biometricsButton.setOnClickListener(v -> {
|
biometricsButton.setOnClickListener(v -> {
|
||||||
showBiometricPrompt();
|
showBiometricPrompt();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (_bioKey != null) {
|
||||||
|
showBiometricPrompt();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -196,13 +200,7 @@ public class AuthActivity extends AegisActivity {
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
||||||
if (_bioKey != null) {
|
if (_bioKey == null || _prefs.isPasswordReminderNeeded()) {
|
||||||
if (_prefs.isPasswordReminderNeeded()) {
|
|
||||||
focusPasswordField();
|
|
||||||
} else {
|
|
||||||
showBiometricPrompt();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
focusPasswordField();
|
focusPasswordField();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -252,15 +250,6 @@ public class AuthActivity extends AegisActivity {
|
||||||
_bioPrompt.authenticate(info, cryptoObj);
|
_bioPrompt.authenticate(info, cryptoObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPause() {
|
|
||||||
super.onPause();
|
|
||||||
|
|
||||||
if (_bioPrompt != null) {
|
|
||||||
_bioPrompt.cancelAuthentication();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void finish(MasterKey key, boolean isSlotRepaired) {
|
private void finish(MasterKey key, boolean isSlotRepaired) {
|
||||||
VaultFileCredentials creds = new VaultFileCredentials(key, _slots);
|
VaultFileCredentials creds = new VaultFileCredentials(key, _slots);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue