Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf1df1e2 authored by Diya Bera's avatar Diya Bera Committed by Android (Google) Code Review
Browse files

Merge "Fix PreAuthInfoTest for identity_check_test_api flag" into main

parents 11c0ca48 de54bfb4
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -207,10 +207,10 @@ public class PreAuthInfoTest {
    }

    @Test
    @RequiresFlagsEnabled(Flags.FLAG_MANDATORY_BIOMETRICS)
    @RequiresFlagsEnabled({Flags.FLAG_MANDATORY_BIOMETRICS, Flags.FLAG_IDENTITY_CHECK_TEST_API})
    public void testMandatoryBiometricsStatus_whenAllRequirementsSatisfiedAndSensorAvailable()
            throws Exception {
        when(mTrustManager.isInSignificantPlace()).thenReturn(false);
        when(mSettingObserver.isIdentityCheckActive(anyInt())).thenReturn(true);

        final BiometricSensor sensor = getFaceSensor();
        final PromptInfo promptInfo = new PromptInfo();
@@ -224,10 +224,10 @@ public class PreAuthInfoTest {
    }

    @Test
    @RequiresFlagsEnabled(Flags.FLAG_MANDATORY_BIOMETRICS)
    @RequiresFlagsEnabled({Flags.FLAG_MANDATORY_BIOMETRICS, Flags.FLAG_IDENTITY_CHECK_TEST_API})
    public void testMandatoryBiometricsStatus_whenAllRequirementsSatisfiedAndSensorUnavailable()
            throws Exception {
        when(mTrustManager.isInSignificantPlace()).thenReturn(false);
        when(mSettingObserver.isIdentityCheckActive(anyInt())).thenReturn(true);

        final PromptInfo promptInfo = new PromptInfo();
        promptInfo.setAuthenticators(BiometricManager.Authenticators.IDENTITY_CHECK);
@@ -240,10 +240,10 @@ public class PreAuthInfoTest {
    }

    @Test
    @RequiresFlagsEnabled(Flags.FLAG_MANDATORY_BIOMETRICS)
    @RequiresFlagsEnabled({Flags.FLAG_MANDATORY_BIOMETRICS, Flags.FLAG_IDENTITY_CHECK_TEST_API})
    public void testMandatoryBiometricsAndStrongBiometricsStatus_whenRequirementsNotSatisfied()
            throws Exception {
        when(mTrustManager.isInSignificantPlace()).thenReturn(true);
        when(mSettingObserver.isIdentityCheckActive(anyInt())).thenReturn(false);

        final BiometricSensor sensor = getFaceSensor();
        final PromptInfo promptInfo = new PromptInfo();
@@ -258,10 +258,10 @@ public class PreAuthInfoTest {
    }

    @Test
    @RequiresFlagsEnabled(Flags.FLAG_MANDATORY_BIOMETRICS)
    @RequiresFlagsEnabled({Flags.FLAG_MANDATORY_BIOMETRICS, Flags.FLAG_IDENTITY_CHECK_TEST_API})
    public void testMandatoryBiometricsStatus_whenRequirementsNotSatisfiedAndSensorAvailable()
            throws Exception {
        when(mTrustManager.isInSignificantPlace()).thenReturn(true);
        when(mSettingObserver.isIdentityCheckActive(anyInt())).thenReturn(false);

        final BiometricSensor sensor = getFaceSensor();
        final PromptInfo promptInfo = new PromptInfo();
@@ -300,10 +300,10 @@ public class PreAuthInfoTest {
    }

    @Test
    @RequiresFlagsEnabled(Flags.FLAG_MANDATORY_BIOMETRICS)
    @RequiresFlagsEnabled({Flags.FLAG_MANDATORY_BIOMETRICS, Flags.FLAG_IDENTITY_CHECK_TEST_API})
    public void testMandatoryBiometricsNegativeButtonText_whenSet()
            throws Exception {
        when(mTrustManager.isInSignificantPlace()).thenReturn(false);
        when(mSettingObserver.isIdentityCheckActive(anyInt())).thenReturn(true);

        final BiometricSensor sensor = getFaceSensor();
        final PromptInfo promptInfo = new PromptInfo();