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

Commit 550349ab authored by Arpan Kaphle's avatar Arpan Kaphle Committed by Android (Google) Code Review
Browse files

Merge "Provider Activity Interruption Fix" into main

parents e1f2ecd3 d44799fc
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -175,10 +175,7 @@ class CredentialSelectorViewModel(
            } else {
                Log.d(Constants.LOG_TAG, "The provider activity was cancelled," +
                            " re-displaying our UI.")
                uiState = uiState.copy(
                    selectedEntry = null,
                    providerActivityState = ProviderActivityState.NOT_APPLICABLE,
                )
                resetUiStateForReLaunch()
            }
        } else {
            if (entry != null) {
@@ -202,6 +199,15 @@ class CredentialSelectorViewModel(
        }
    }

    // Resets UI states for any situation that re-launches the UI
    private fun resetUiStateForReLaunch() {
        onBiometricPromptStateChange(BiometricPromptState.INACTIVE)
        uiState = uiState.copy(
            selectedEntry = null,
            providerActivityState = ProviderActivityState.NOT_APPLICABLE,
        )
    }

    fun onLastLockedAuthEntryNotFoundError() {
        Log.d(Constants.LOG_TAG, "Unable to find the last unlocked entry")
        onInternalError()