fix(autofill): fall back to remote views when inline presentations are unavailable

Fixes #2290
This commit is contained in:
Harsh Shandilya 2022-12-12 21:40:25 +05:30
parent d409d8c2d5
commit 89b47f6ae8
No known key found for this signature in database

View file

@ -106,7 +106,11 @@ constructor(
val inlinePresentation = makeInlinePresentation(context, imeSpec, metadata) val inlinePresentation = makeInlinePresentation(context, imeSpec, metadata)
if (inlinePresentation != null) { if (inlinePresentation != null) {
presentationsBuilder.setInlinePresentation(inlinePresentation) presentationsBuilder.setInlinePresentation(inlinePresentation)
} else {
presentationsBuilder.setMenuPresentation(makeRemoteView(context, metadata))
} }
} else {
presentationsBuilder.setMenuPresentation(makeRemoteView(context, metadata))
} }
val presentations = presentationsBuilder.build() val presentations = presentationsBuilder.build()
return Dataset.Builder(presentations).run { return Dataset.Builder(presentations).run {