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

Commit 4cafcf40 authored by Reema Bajwa's avatar Reema Bajwa Committed by Android (Google) Code Review
Browse files

Merge "Add auto-select bit to provider's pending intent" into udc-dev

parents b3805c73 a1d462fb
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -118,8 +118,10 @@ class CredentialSelectorViewModel(
        if (entry != null && entry.pendingIntent != null) {
            Log.d(Constants.LOG_TAG, "Launching provider activity")
            uiState = uiState.copy(providerActivityState = ProviderActivityState.PENDING)
            val entryIntent = entry.fillInIntent
            entryIntent?.putExtra(Constants.IS_AUTO_SELECTED_KEY, uiState.isAutoSelectFlow)
            val intentSenderRequest = IntentSenderRequest.Builder(entry.pendingIntent)
                .setFillInIntent(entry.fillInIntent).build()
                .setFillInIntent(entryIntent).build()
            try {
                launcher.launch(intentSenderRequest)
            } catch (e: Exception) {
+2 −1
Original line number Diff line number Diff line
@@ -21,5 +21,6 @@ class Constants {
        const val LOG_TAG = "CredentialSelector"
        const val BUNDLE_KEY_PREFER_IMMEDIATELY_AVAILABLE_CREDENTIALS =
            "androidx.credentials.BUNDLE_KEY_IS_AUTO_SELECT_ALLOWED"
        const val IS_AUTO_SELECTED_KEY = "IS_AUTO_SELECTED"
    }
}