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

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
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -219,9 +219,15 @@ class CredentialAutofillService : AutofillService() {
            val sliceBuilder = InlineSuggestionUi
                    .newContentBuilder(pendingIntent)
                    .setTitle(primaryEntry.userName)
            val icon: Icon =
                    entryIconMap[primaryEntry.entryKey + primaryEntry.entrySubkey]
            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)