Pass CDC text as credential-only to BiometricPrompt
Invokes the new hidden API to allow the work authentication prompt to supply specific text to BiometricPrompt for credential auth. This allows the prompt to use work-specific language when verifying work credentials, while retaining more generic language when authenticating with biometrics. Test: Work lock prompt shows "Enter your work ___" for credential Test: Work lock prompt now shows "Verify it's you" for face Bug: 149003660 Change-Id: Icab8e16702ca31d08fa8b0b00f0519c9a37f609f
This commit is contained in:
@@ -130,8 +130,12 @@ public class BiometricFragment extends InstrumentedFragment {
|
||||
.setDeviceCredentialAllowed(true)
|
||||
.setSubtitle(mBundle.getString(BiometricPrompt.KEY_SUBTITLE))
|
||||
.setDescription(mBundle.getString(BiometricPrompt.KEY_DESCRIPTION))
|
||||
.setConfirmationRequired(
|
||||
mBundle.getBoolean(BiometricPrompt.KEY_REQUIRE_CONFIRMATION, true))
|
||||
.setTextForDeviceCredential(
|
||||
mBundle.getCharSequence(BiometricPrompt.KEY_DEVICE_CREDENTIAL_TITLE),
|
||||
mBundle.getCharSequence(BiometricPrompt.KEY_DEVICE_CREDENTIAL_SUBTITLE),
|
||||
mBundle.getCharSequence(BiometricPrompt.KEY_DEVICE_CREDENTIAL_DESCRIPTION))
|
||||
.setConfirmationRequired(mBundle.getBoolean(
|
||||
BiometricPrompt.KEY_REQUIRE_CONFIRMATION, true))
|
||||
.setDisallowBiometricsIfPolicyExists(mBundle.getBoolean(
|
||||
BiometricPrompt.EXTRA_DISALLOW_BIOMETRICS_IF_POLICY_EXISTS, false));
|
||||
|
||||
|
Reference in New Issue
Block a user