Merge "Do not crash ui app upon bad provider pending intent." into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
8bf2277ff1
@@ -119,7 +119,12 @@ class CredentialSelectorViewModel(
|
|||||||
uiState = uiState.copy(providerActivityState = ProviderActivityState.PENDING)
|
uiState = uiState.copy(providerActivityState = ProviderActivityState.PENDING)
|
||||||
val intentSenderRequest = IntentSenderRequest.Builder(entry.pendingIntent)
|
val intentSenderRequest = IntentSenderRequest.Builder(entry.pendingIntent)
|
||||||
.setFillInIntent(entry.fillInIntent).build()
|
.setFillInIntent(entry.fillInIntent).build()
|
||||||
launcher.launch(intentSenderRequest)
|
try {
|
||||||
|
launcher.launch(intentSenderRequest)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Log.w(Constants.LOG_TAG, "Failed to launch provider UI: $e")
|
||||||
|
onInternalError()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Log.d(Constants.LOG_TAG, "No provider UI to launch")
|
Log.d(Constants.LOG_TAG, "No provider UI to launch")
|
||||||
onInternalError()
|
onInternalError()
|
||||||
|
|||||||
Reference in New Issue
Block a user