Show less obvious Autofill actions first (#1268)

Show Generate and Fill SMS OTP Autofill actions before the more
uninteresting (and expected) Search action.
This commit is contained in:
Fabian Meumertzheim
2021-01-03 16:30:30 +01:00
committed by GitHub
parent fa2279791f
commit 0943015416
2 changed files with 8 additions and 8 deletions

View File

@@ -134,10 +134,6 @@ class Api30AutofillResponseBuilder(form: FillableForm) {
addDataset(it)
}
}
makeSearchDataset(context, imeSpecs.getOrNull(datasetCount))?.let {
datasetCount++
addDataset(it)
}
makeGenerateDataset(context, imeSpecs.getOrNull(datasetCount))?.let {
datasetCount++
addDataset(it)
@@ -146,6 +142,10 @@ class Api30AutofillResponseBuilder(form: FillableForm) {
datasetCount++
addDataset(it)
}
makeSearchDataset(context, imeSpecs.getOrNull(datasetCount))?.let {
datasetCount++
addDataset(it)
}
if (datasetCount == 0) return null
setHeader(makeRemoteView(context, makeHeaderMetadata(formOrigin.getPrettyIdentifier(context, untrusted = true))))
makeSaveInfo()?.let { setSaveInfo(it) }

View File

@@ -137,10 +137,6 @@ class AutofillResponseBuilder(form: FillableForm) {
addDataset(it)
}
}
makeSearchDataset(context)?.let {
datasetCount++
addDataset(it)
}
makeGenerateDataset(context)?.let {
datasetCount++
addDataset(it)
@@ -149,6 +145,10 @@ class AutofillResponseBuilder(form: FillableForm) {
datasetCount++
addDataset(it)
}
makeSearchDataset(context)?.let {
datasetCount++
addDataset(it)
}
if (datasetCount == 0) return null
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
setHeader(makeRemoteView(context, makeHeaderMetadata(formOrigin.getPrettyIdentifier(context, untrusted = true))))