From 5b42447d299f9c61229b5039bd5c1974e03dc3c9 Mon Sep 17 00:00:00 2001 From: Rubin Xu Date: Fri, 12 May 2023 16:35:15 +0100 Subject: [PATCH] work challenge: allow backgroud biometric auth We observed a race condition that when work challenge is launched from notification, the biometric prompt quickly dismisses itself because it detects the launcher is now the foreground app. This change attempts to workaround the issue by enabling the setAllowBackgroundAuthentication optin in BiometricPrompt so it no longer dismisses itself even if the foreground app is different. Bug: 279766640 Test: manual Change-Id: I453b7d603c6eb65f329afb38d8a190e21a7e4c01 --- src/com/android/settings/password/BiometricFragment.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/com/android/settings/password/BiometricFragment.java b/src/com/android/settings/password/BiometricFragment.java index d364c71b331..4ad04a1a903 100644 --- a/src/com/android/settings/password/BiometricFragment.java +++ b/src/com/android/settings/password/BiometricFragment.java @@ -141,6 +141,7 @@ public class BiometricFragment extends InstrumentedFragment { .setDisallowBiometricsIfPolicyExists( promptInfo.isDisallowBiometricsIfPolicyExists()) .setReceiveSystemEvents(true) + .setAllowBackgroundAuthentication(true) .build(); }