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

@@ -149,8 +149,8 @@ public class MainClearTest {
doReturn(mMockActivity).when(mMainClear).getActivity();
when(mMockActivity.getSystemService(BiometricManager.class)).thenReturn(mBiometricManager);
when(mBiometricManager.canAuthenticate(anyInt(),
eq(BiometricManager.Authenticators.MANDATORY_BIOMETRICS)))
.thenReturn(BiometricManager.BIOMETRIC_ERROR_MANDATORY_NOT_ACTIVE);
eq(BiometricManager.Authenticators.IDENTITY_CHECK)))
.thenReturn(BiometricManager.BIOMETRIC_ERROR_IDENTITY_CHECK_NOT_ACTIVE);
}
@After
@@ -379,7 +379,7 @@ public class MainClearTest {
when(mMockActivity.getSystemService(BiometricManager.class)).thenReturn(mBiometricManager);
when(mResources.getString(anyInt())).thenReturn(TEST_ACCOUNT_NAME);
when(mBiometricManager.canAuthenticate(anyInt(),
eq(BiometricManager.Authenticators.MANDATORY_BIOMETRICS)))
eq(BiometricManager.Authenticators.IDENTITY_CHECK)))
.thenReturn(BiometricManager.BIOMETRIC_SUCCESS);
doReturn(true).when(mMainClear).isValidRequestCode(eq(MainClear.KEYGUARD_REQUEST));
doNothing().when(mMainClear).startActivityForResult(any(), anyInt());
@@ -406,7 +406,7 @@ public class MainClearTest {
when(mMockActivity.getSystemService(BiometricManager.class)).thenReturn(mBiometricManager);
when(mResources.getString(anyInt())).thenReturn(TEST_ACCOUNT_NAME);
when(mBiometricManager.canAuthenticate(anyInt(),
eq(BiometricManager.Authenticators.MANDATORY_BIOMETRICS)))
eq(BiometricManager.Authenticators.IDENTITY_CHECK)))
.thenReturn(BiometricManager.BIOMETRIC_ERROR_LOCKOUT);
doReturn(true).when(mMainClear).isValidRequestCode(eq(MainClear.KEYGUARD_REQUEST));
doNothing().when(mMainClear).startActivityForResult(any(), anyInt());