Merge "Add auto-select bit to provider's pending intent" into udc-dev am: 4cafcf40b1 am: eae29d6ed8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23519709 Change-Id: Ibf02cf38b34601482c5d93997fcba1259167e5e4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user