summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorFabian Henneke <FabianHenneke@users.noreply.github.com>2020-11-03 17:40:31 +0100
committerHarsh Shandilya <me@msfjarvis.dev>2021-03-20 22:42:35 +0530
commit82dd9e2b738b336b444ba229cdedd8a93ce0bfb4 (patch)
tree6dd869e9fe6ba9ebc5291b7865e8e8eb99298c74 /app/src/main
parent0e9843ccba9fefabcb33e81ea13756bbbf74506e (diff)
Fix Autofill regression caused by empty dataset (#1184)
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/autofill/oreo/AutofillResponseBuilder.kt8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/oreo/AutofillResponseBuilder.kt b/app/src/main/java/com/zeapo/pwdstore/autofill/oreo/AutofillResponseBuilder.kt
index c186ecd8..7c2c1ca9 100644
--- a/app/src/main/java/com/zeapo/pwdstore/autofill/oreo/AutofillResponseBuilder.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/autofill/oreo/AutofillResponseBuilder.kt
@@ -53,14 +53,14 @@ class AutofillResponseBuilder(form: FillableForm) {
}
private fun makeMatchDataset(context: Context, file: File): Dataset? {
- if (scenario.hasFieldsToFillOn(AutofillAction.Match)) return null
+ if (!scenario.hasFieldsToFillOn(AutofillAction.Match)) return null
val remoteView = makeFillMatchRemoteView(context, file, formOrigin)
val intentSender = AutofillDecryptActivity.makeDecryptFileIntentSender(file, context)
return makePlaceholderDataset(remoteView, intentSender, AutofillAction.Match)
}
private fun makeSearchDataset(context: Context): Dataset? {
- if (scenario.hasFieldsToFillOn(AutofillAction.Search)) return null
+ if (!scenario.hasFieldsToFillOn(AutofillAction.Search)) return null
val remoteView = makeSearchAndFillRemoteView(context, formOrigin)
val intentSender =
AutofillFilterView.makeMatchAndDecryptFileIntentSender(context, formOrigin)
@@ -68,14 +68,14 @@ class AutofillResponseBuilder(form: FillableForm) {
}
private fun makeGenerateDataset(context: Context): Dataset? {
- if (scenario.hasFieldsToFillOn(AutofillAction.Generate)) return null
+ if (!scenario.hasFieldsToFillOn(AutofillAction.Generate)) return null
val remoteView = makeGenerateAndFillRemoteView(context, formOrigin)
val intentSender = AutofillSaveActivity.makeSaveIntentSender(context, null, formOrigin)
return makePlaceholderDataset(remoteView, intentSender, AutofillAction.Generate)
}
private fun makeFillOtpFromSmsDataset(context: Context): Dataset? {
- if (scenario.hasFieldsToFillOn(AutofillAction.FillOtpFromSms)) return null
+ if (!scenario.hasFieldsToFillOn(AutofillAction.FillOtpFromSms)) return null
if (!AutofillSmsActivity.shouldOfferFillFromSms(context)) return null
val remoteView = makeFillOtpFromSmsRemoteView(context, formOrigin)
val intentSender = AutofillSmsActivity.makeFillOtpFromSmsIntentSender(context)