Identity Check API

Update MANDATORY_BIOMETRICS constant to IDENTITY_CHECK

Flag: android.hardware.biometrics.Flags.FLAG_IDENTITY_CHECK_API
Bug: 373424727
Test: N/A

Change-Id: I6413e3695d1e07dcc225230f8fd2d373b1879e8f
This commit is contained in:
Diya Bera
2024-10-25 00:16:21 +00:00
parent a9e8225ba4
commit 1bad4e27c1
6 changed files with 21 additions and 21 deletions

View File

@@ -1516,13 +1516,13 @@ public final class Utils extends com.android.settingslib.Utils {
final UserManager userManager = context.getSystemService(
UserManager.class);
final int status = biometricManager.canAuthenticate(getEffectiveUserId(
userManager, userId), BiometricManager.Authenticators.MANDATORY_BIOMETRICS);
userManager, userId), BiometricManager.Authenticators.IDENTITY_CHECK);
switch(status) {
case BiometricManager.BIOMETRIC_SUCCESS:
return BiometricStatus.OK;
case BiometricManager.BIOMETRIC_ERROR_LOCKOUT:
return BiometricStatus.LOCKOUT;
case BiometricManager.BIOMETRIC_ERROR_MANDATORY_NOT_ACTIVE:
case BiometricManager.BIOMETRIC_ERROR_IDENTITY_CHECK_NOT_ACTIVE:
case BiometricManager.BIOMETRIC_ERROR_NOT_ENABLED_FOR_APPS:
return BiometricStatus.NOT_ACTIVE;
default:
@@ -1582,7 +1582,7 @@ public final class Utils extends com.android.settingslib.Utils {
final Intent intent = new Intent();
if (android.hardware.biometrics.Flags.mandatoryBiometrics()) {
intent.putExtra(BIOMETRIC_PROMPT_AUTHENTICATORS,
BiometricManager.Authenticators.MANDATORY_BIOMETRICS);
BiometricManager.Authenticators.IDENTITY_CHECK);
}
intent.putExtra(BIOMETRIC_PROMPT_NEGATIVE_BUTTON_TEXT,
resources.getString(R.string.cancel));