Loading packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryHapticsInteractorTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -176,14 +176,14 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { } @Test fun nonPowerButtonFPS_coExFaceFailure_doNotVibrateError() = fun nonPowerButtonFPS_coExFaceFailure_vibrateError() = testScope.runTest { val playErrorHaptic by collectLastValue(underTest.playErrorHaptic) enrollFingerprint(FingerprintSensorType.UDFPS_ULTRASONIC) enrollFace() runCurrent() faceFailure() assertThat(playErrorHaptic).isNull() assertThat(playErrorHaptic).isNotNull() } @Test Loading packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/startable/SceneContainerStartableTest.kt +9 −7 Original line number Diff line number Diff line Loading @@ -1149,7 +1149,7 @@ class SceneContainerStartableTest : SysuiTestCase() { @Test @DisableFlags(Flags.FLAG_MSDL_FEEDBACK) fun skipsFaceErrorHaptics_nonSfps_coEx() = fun playsFaceErrorHaptics_nonSfps_coEx() = testScope.runTest { val currentSceneKey by collectLastValue(sceneInteractor.currentScene) val playErrorHaptic by collectLastValue(deviceEntryHapticsInteractor.playErrorHaptic) Loading @@ -1161,14 +1161,15 @@ class SceneContainerStartableTest : SysuiTestCase() { underTest.start() updateFaceAuthStatus(isSuccess = false) assertThat(playErrorHaptic).isNull() verify(vibratorHelper, never()).vibrateAuthError(anyString()) assertThat(playErrorHaptic).isNotNull() assertThat(currentSceneKey).isEqualTo(Scenes.Lockscreen) verify(vibratorHelper).vibrateAuthError(anyString()) verify(vibratorHelper, never()).vibrateAuthSuccess(anyString()) } @Test @EnableFlags(Flags.FLAG_MSDL_FEEDBACK) fun skipsMSDLFaceErrorHaptics_nonSfps_coEx() = fun playsMSDLFaceErrorHaptics_nonSfps_coEx() = testScope.runTest { val currentSceneKey by collectLastValue(sceneInteractor.currentScene) val playErrorHaptic by collectLastValue(deviceEntryHapticsInteractor.playErrorHaptic) Loading @@ -1180,9 +1181,10 @@ class SceneContainerStartableTest : SysuiTestCase() { underTest.start() updateFaceAuthStatus(isSuccess = false) assertThat(playErrorHaptic).isNull() assertThat(msdlPlayer.latestTokenPlayed).isNull() assertThat(msdlPlayer.latestPropertiesPlayed).isNull() assertThat(playErrorHaptic).isNotNull() assertThat(currentSceneKey).isEqualTo(Scenes.Lockscreen) assertThat(msdlPlayer.latestTokenPlayed).isEqualTo(MSDLToken.FAILURE) assertThat(msdlPlayer.latestPropertiesPlayed).isEqualTo(authInteractionProperties) } @Test Loading packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryBiometricAuthInteractor.kt +6 −0 Original line number Diff line number Diff line Loading @@ -68,4 +68,10 @@ constructor( emptyFlow() } } /** Triggered if a face failure occurs regardless of the mode. */ val faceFailure: Flow<FailedFaceAuthenticationStatus> = deviceEntryFaceAuthInteractor.authenticationStatus.filterIsInstance< FailedFaceAuthenticationStatus >() } packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryHapticsInteractor.kt +1 −1 Original line number Diff line number Diff line Loading @@ -123,7 +123,7 @@ constructor( private val playErrorHapticForBiometricFailure: Flow<Unit> = merge( deviceEntryFingerprintAuthInteractor.fingerprintFailure, deviceEntryBiometricAuthInteractor.faceOnlyFaceFailure, deviceEntryBiometricAuthInteractor.faceFailure, ) // map to Unit .map {} Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryHapticsInteractorTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -176,14 +176,14 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { } @Test fun nonPowerButtonFPS_coExFaceFailure_doNotVibrateError() = fun nonPowerButtonFPS_coExFaceFailure_vibrateError() = testScope.runTest { val playErrorHaptic by collectLastValue(underTest.playErrorHaptic) enrollFingerprint(FingerprintSensorType.UDFPS_ULTRASONIC) enrollFace() runCurrent() faceFailure() assertThat(playErrorHaptic).isNull() assertThat(playErrorHaptic).isNotNull() } @Test Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/startable/SceneContainerStartableTest.kt +9 −7 Original line number Diff line number Diff line Loading @@ -1149,7 +1149,7 @@ class SceneContainerStartableTest : SysuiTestCase() { @Test @DisableFlags(Flags.FLAG_MSDL_FEEDBACK) fun skipsFaceErrorHaptics_nonSfps_coEx() = fun playsFaceErrorHaptics_nonSfps_coEx() = testScope.runTest { val currentSceneKey by collectLastValue(sceneInteractor.currentScene) val playErrorHaptic by collectLastValue(deviceEntryHapticsInteractor.playErrorHaptic) Loading @@ -1161,14 +1161,15 @@ class SceneContainerStartableTest : SysuiTestCase() { underTest.start() updateFaceAuthStatus(isSuccess = false) assertThat(playErrorHaptic).isNull() verify(vibratorHelper, never()).vibrateAuthError(anyString()) assertThat(playErrorHaptic).isNotNull() assertThat(currentSceneKey).isEqualTo(Scenes.Lockscreen) verify(vibratorHelper).vibrateAuthError(anyString()) verify(vibratorHelper, never()).vibrateAuthSuccess(anyString()) } @Test @EnableFlags(Flags.FLAG_MSDL_FEEDBACK) fun skipsMSDLFaceErrorHaptics_nonSfps_coEx() = fun playsMSDLFaceErrorHaptics_nonSfps_coEx() = testScope.runTest { val currentSceneKey by collectLastValue(sceneInteractor.currentScene) val playErrorHaptic by collectLastValue(deviceEntryHapticsInteractor.playErrorHaptic) Loading @@ -1180,9 +1181,10 @@ class SceneContainerStartableTest : SysuiTestCase() { underTest.start() updateFaceAuthStatus(isSuccess = false) assertThat(playErrorHaptic).isNull() assertThat(msdlPlayer.latestTokenPlayed).isNull() assertThat(msdlPlayer.latestPropertiesPlayed).isNull() assertThat(playErrorHaptic).isNotNull() assertThat(currentSceneKey).isEqualTo(Scenes.Lockscreen) assertThat(msdlPlayer.latestTokenPlayed).isEqualTo(MSDLToken.FAILURE) assertThat(msdlPlayer.latestPropertiesPlayed).isEqualTo(authInteractionProperties) } @Test Loading
packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryBiometricAuthInteractor.kt +6 −0 Original line number Diff line number Diff line Loading @@ -68,4 +68,10 @@ constructor( emptyFlow() } } /** Triggered if a face failure occurs regardless of the mode. */ val faceFailure: Flow<FailedFaceAuthenticationStatus> = deviceEntryFaceAuthInteractor.authenticationStatus.filterIsInstance< FailedFaceAuthenticationStatus >() }
packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryHapticsInteractor.kt +1 −1 Original line number Diff line number Diff line Loading @@ -123,7 +123,7 @@ constructor( private val playErrorHapticForBiometricFailure: Flow<Unit> = merge( deviceEntryFingerprintAuthInteractor.fingerprintFailure, deviceEntryBiometricAuthInteractor.faceOnlyFaceFailure, deviceEntryBiometricAuthInteractor.faceFailure, ) // map to Unit .map {} Loading