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

Commit 9425a7d3 authored by Helen Qin's avatar Helen Qin Committed by Automerger Merge Worker
Browse files

Merge "Bug fixes for the create flow auto select." into udc-dev am: c58528f3

parents b6854dce c58528f3
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -480,7 +480,10 @@ class CreateFlowUtils {
                    createCredentialRequestJetpack.preferImmediatelyAvailableCredentials,
                    appPreferredDefaultProviderId = appPreferredDefaultProviderId,
                    userSetDefaultProviderIds = requestInfo.defaultProviderIds.toSet(),
                    isAutoSelectRequest = createCredentialRequestJetpack.isAutoSelectAllowed,
                    // The jetpack library requires a fix to parse this value correctly for
                    // the password type. For now, directly parse it ourselves.
                    isAutoSelectRequest = createCredentialRequest.credentialData.getBoolean(
                        Constants.BUNDLE_KEY_PREFER_IMMEDIATELY_AVAILABLE_CREDENTIALS, false),
                )
                is CreatePublicKeyCredentialRequest -> {
                    newRequestDisplayInfoFromPasskeyJson(
@@ -491,7 +494,10 @@ class CreateFlowUtils {
                        createCredentialRequestJetpack.preferImmediatelyAvailableCredentials,
                        appPreferredDefaultProviderId = appPreferredDefaultProviderId,
                        userSetDefaultProviderIds = requestInfo.defaultProviderIds.toSet(),
                        isAutoSelectRequest = createCredentialRequestJetpack.isAutoSelectAllowed,
                        // The jetpack library requires a fix to parse this value correctly for
                        // the passkey type. For now, directly parse it ourselves.
                        isAutoSelectRequest = createCredentialRequest.credentialData.getBoolean(
                            Constants.BUNDLE_KEY_PREFER_IMMEDIATELY_AVAILABLE_CREDENTIALS, false),
                    )
                }
                is CreateCustomCredentialRequest -> {
+2 −0
Original line number Diff line number Diff line
@@ -19,5 +19,7 @@ package com.android.credentialmanager.common
class Constants {
    companion object Constants {
        const val LOG_TAG = "CredentialSelector"
        const val BUNDLE_KEY_PREFER_IMMEDIATELY_AVAILABLE_CREDENTIALS =
            "androidx.credentials.BUNDLE_KEY_IS_AUTO_SELECT_ALLOWED"
    }
}
 No newline at end of file
+0 −1
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@ internal fun isFlowAutoSelectable(
      // applicable.
      uiState.currentScreenState != CreateScreenState.PASSKEY_INTRO &&
      uiState.currentScreenState != CreateScreenState.MORE_ABOUT_PASSKEYS_INTRO &&
      uiState.remoteEntry == null &&
      uiState.sortedCreateOptionsPairs.size == 1 &&
      uiState.activeEntry?.activeEntryInfo?.let {
        it is CreateOptionInfo && it.allowAutoSelect