Skip to content
Snippets Groups Projects
Commit cb2695f8 authored by Daniel Kim's avatar Daniel Kim Committed by Android (Google) Code Review
Browse files

Merge "Fix default icon" into main

parents 45e5f08a fd574803
No related branches found
No related tags found
No related merge requests found
......@@ -219,9 +219,15 @@ class CredentialAutofillService : AutofillService() {
val sliceBuilder = InlineSuggestionUi
.newContentBuilder(pendingIntent)
.setTitle(primaryEntry.userName)
val icon: Icon =
entryIconMap[primaryEntry.entryKey + primaryEntry.entrySubkey]
?: getDefaultIcon()
val icon: Icon
if (primaryEntry.icon == null) {
// The empty entry icon has non-null icon reference but null drawable reference.
// If the drawable reference is null, then use the default icon.
icon = getDefaultIcon()
} else {
icon = entryIconMap[primaryEntry.entryKey + primaryEntry.entrySubkey]
?: getDefaultIcon()
}
sliceBuilder.setStartIcon(icon)
val inlinePresentation = InlinePresentation(
sliceBuilder.build().slice, spec, /* pinned= */ false)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment