Commit 3e5b7f45 authored by akwizgran's avatar akwizgran

Merge branch '1716-duplicate-unlock-screen' into 'master'

Don't show duplicate unlock screen on API 29+

Closes #1716

See merge request !1280
parents 0a33c773 95cccd1d
Pipeline #4753 passed with stage
in 9 minutes and 10 seconds
......@@ -117,14 +117,24 @@ public class UnlockActivity extends BaseActivity {
@RequiresApi(api = 28)
private void requestFingerprintUnlock() {
BiometricPrompt biometricPrompt = new Builder(this)
.setTitle(getString(R.string.lock_unlock))
.setDescription(
getString(R.string.lock_unlock_fingerprint_description))
.setNegativeButton(getString(R.string.lock_unlock_password),
getMainExecutor(),
(dialog, which) -> requestKeyguardUnlock())
.build();
BiometricPrompt biometricPrompt;
if (SDK_INT >= 29) {
biometricPrompt = new Builder(this)
.setTitle(getString(R.string.lock_unlock))
.setDescription(getString(
R.string.lock_unlock_fingerprint_description))
.setDeviceCredentialAllowed(true)
.build();
} else {
biometricPrompt = new Builder(this)
.setTitle(getString(R.string.lock_unlock))
.setDescription(getString(
R.string.lock_unlock_fingerprint_description))
.setNegativeButton(getString(R.string.lock_unlock_password),
getMainExecutor(),
(dialog, which) -> requestKeyguardUnlock())
.build();
}
CancellationSignal signal = new CancellationSignal();
AuthenticationCallback callback = new AuthenticationCallback() {
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment