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

Commit ed928340 authored by Alejandro Nijamkin's avatar Alejandro Nijamkin
Browse files

[flexiglass] Fixes pattern redraw bug.

This regression was introduced in ag/24758912 where
PatternBouncerViewModel was changed from clearing the input before
calling authenticate to clearing it after.

Fix: 302598834
Test: manually tested pattern with correct and incorrect patterns, no
reanimation bug anymore
Test: Manually tested PIN with correct and incorrect input, with auto
confirm on or off
Test: Manually tested password with correct and incorrect input

Change-Id: I7f0f4fc4bdb99f3690e115a669a5e18fa00a4565
parent 70457042
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -102,9 +102,12 @@ sealed class AuthMethodBouncerViewModel(
     *
     * @see BouncerInteractor.authenticate
     */
    protected fun tryAuthenticate(useAutoConfirm: Boolean = false) {
    protected fun tryAuthenticate(
        input: List<Any> = getInput(),
        useAutoConfirm: Boolean = false,
    ) {
        viewModelScope.launch {
            val authenticationResult = interactor.authenticate(getInput(), useAutoConfirm)
            val authenticationResult = interactor.authenticate(input, useAutoConfirm)
            if (authenticationResult == AuthenticationResult.SKIPPED && useAutoConfirm) {
                return@launch
            }
+2 −1
Original line number Diff line number Diff line
@@ -166,7 +166,8 @@ class PatternBouncerViewModel(
            interactor.onFalseUserInput()
        }

        tryAuthenticate()
        clearInput()
        tryAuthenticate(input = pattern)
    }

    override fun clearInput() {