Skip to content
Snippets Groups Projects
Verified Commit 95cccd1d authored by akwizgran's avatar akwizgran
Browse files

Don't show duplicate unlock screen on API 29+.

parent 0a33c773
No related branches found
No related tags found
1 merge request!1280Don't show duplicate unlock screen on API 29+
Pipeline #4752 passed
...@@ -117,14 +117,24 @@ public class UnlockActivity extends BaseActivity { ...@@ -117,14 +117,24 @@ public class UnlockActivity extends BaseActivity {
@RequiresApi(api = 28) @RequiresApi(api = 28)
private void requestFingerprintUnlock() { private void requestFingerprintUnlock() {
BiometricPrompt biometricPrompt = new Builder(this) BiometricPrompt biometricPrompt;
.setTitle(getString(R.string.lock_unlock)) if (SDK_INT >= 29) {
.setDescription( biometricPrompt = new Builder(this)
getString(R.string.lock_unlock_fingerprint_description)) .setTitle(getString(R.string.lock_unlock))
.setNegativeButton(getString(R.string.lock_unlock_password), .setDescription(getString(
getMainExecutor(), R.string.lock_unlock_fingerprint_description))
(dialog, which) -> requestKeyguardUnlock()) .setDeviceCredentialAllowed(true)
.build(); .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(); CancellationSignal signal = new CancellationSignal();
AuthenticationCallback callback = new AuthenticationCallback() { AuthenticationCallback callback = new AuthenticationCallback() {
@Override @Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment