Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 82dd9e2

Browse files
FabianHennekemsfjarvis
authored andcommitted
Fix Autofill regression caused by empty dataset (#1184)
1 parent 0e9843c commit 82dd9e2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/src/main/java/com/zeapo/pwdstore/autofill/oreo/AutofillResponseBuilder.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,29 +53,29 @@ class AutofillResponseBuilder(form: FillableForm) {
5353
}
5454

5555
private fun makeMatchDataset(context: Context, file: File): Dataset? {
56-
if (scenario.hasFieldsToFillOn(AutofillAction.Match)) return null
56+
if (!scenario.hasFieldsToFillOn(AutofillAction.Match)) return null
5757
val remoteView = makeFillMatchRemoteView(context, file, formOrigin)
5858
val intentSender = AutofillDecryptActivity.makeDecryptFileIntentSender(file, context)
5959
return makePlaceholderDataset(remoteView, intentSender, AutofillAction.Match)
6060
}
6161

6262
private fun makeSearchDataset(context: Context): Dataset? {
63-
if (scenario.hasFieldsToFillOn(AutofillAction.Search)) return null
63+
if (!scenario.hasFieldsToFillOn(AutofillAction.Search)) return null
6464
val remoteView = makeSearchAndFillRemoteView(context, formOrigin)
6565
val intentSender =
6666
AutofillFilterView.makeMatchAndDecryptFileIntentSender(context, formOrigin)
6767
return makePlaceholderDataset(remoteView, intentSender, AutofillAction.Search)
6868
}
6969

7070
private fun makeGenerateDataset(context: Context): Dataset? {
71-
if (scenario.hasFieldsToFillOn(AutofillAction.Generate)) return null
71+
if (!scenario.hasFieldsToFillOn(AutofillAction.Generate)) return null
7272
val remoteView = makeGenerateAndFillRemoteView(context, formOrigin)
7373
val intentSender = AutofillSaveActivity.makeSaveIntentSender(context, null, formOrigin)
7474
return makePlaceholderDataset(remoteView, intentSender, AutofillAction.Generate)
7575
}
7676

7777
private fun makeFillOtpFromSmsDataset(context: Context): Dataset? {
78-
if (scenario.hasFieldsToFillOn(AutofillAction.FillOtpFromSms)) return null
78+
if (!scenario.hasFieldsToFillOn(AutofillAction.FillOtpFromSms)) return null
7979
if (!AutofillSmsActivity.shouldOfferFillFromSms(context)) return null
8080
val remoteView = makeFillOtpFromSmsRemoteView(context, formOrigin)
8181
val intentSender = AutofillSmsActivity.makeFillOtpFromSmsIntentSender(context)

0 commit comments

Comments
 (0)