summaryrefslogtreecommitdiff
path: root/app/src/nonFree/java
diff options
context:
space:
mode:
authorVincent Breitmoser <look@my.amazin.horse>2020-09-16 20:17:55 +0200
committerGitHub <noreply@github.com>2020-09-16 23:47:55 +0530
commit08102734445257f9bbd4a7477c49e9e55fd88eb2 (patch)
tree2e9170d8483e7b5f1cb440d44e67d3dd42221f97 /app/src/nonFree/java
parent4ba3b75f858251099f18f07be700f9900128f8e1 (diff)
Autofill: Extract AutofillParser into separate subproject (#1101)
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev> Co-authored-by: Fabian Henneke <fabian@henneke.me>
Diffstat (limited to 'app/src/nonFree/java')
-rw-r--r--app/src/nonFree/java/com/zeapo/pwdstore/autofill/oreo/ui/AutofillSmsActivity.kt19
1 files changed, 9 insertions, 10 deletions
diff --git a/app/src/nonFree/java/com/zeapo/pwdstore/autofill/oreo/ui/AutofillSmsActivity.kt b/app/src/nonFree/java/com/zeapo/pwdstore/autofill/oreo/ui/AutofillSmsActivity.kt
index 25a5ef93..43498c66 100644
--- a/app/src/nonFree/java/com/zeapo/pwdstore/autofill/oreo/ui/AutofillSmsActivity.kt
+++ b/app/src/nonFree/java/com/zeapo/pwdstore/autofill/oreo/ui/AutofillSmsActivity.kt
@@ -19,6 +19,8 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.lifecycleScope
import com.github.ajalt.timberkt.e
import com.github.ajalt.timberkt.w
+import com.github.androidpasswordstore.autofillparser.AutofillAction
+import com.github.androidpasswordstore.autofillparser.Credentials
import com.github.michaelbull.result.onFailure
import com.github.michaelbull.result.runCatching
import com.google.android.gms.auth.api.phone.SmsCodeRetriever
@@ -27,9 +29,7 @@ import com.google.android.gms.common.ConnectionResult
import com.google.android.gms.common.GoogleApiAvailability
import com.google.android.gms.common.api.ResolvableApiException
import com.google.android.gms.tasks.Task
-import com.zeapo.pwdstore.autofill.oreo.AutofillAction
-import com.zeapo.pwdstore.autofill.oreo.Credentials
-import com.zeapo.pwdstore.autofill.oreo.FillableForm
+import com.zeapo.pwdstore.autofill.oreo.AutofillResponseBuilder
import com.zeapo.pwdstore.databinding.ActivityOreoAutofillSmsBinding
import com.zeapo.pwdstore.utils.viewBinding
import java.util.concurrent.ExecutionException
@@ -145,13 +145,12 @@ class AutofillSmsActivity : AppCompatActivity() {
private val smsCodeRetrievedReceiver = object : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
val smsCode = intent.getStringExtra(SmsCodeRetriever.EXTRA_SMS_CODE)
- val fillInDataset =
- FillableForm.makeFillInDataset(
- this@AutofillSmsActivity,
- Credentials(null, null, smsCode),
- clientState,
- AutofillAction.FillOtpFromSms
- )
+ val fillInDataset = AutofillResponseBuilder.makeFillInDataset(
+ this@AutofillSmsActivity,
+ Credentials(null, null, smsCode),
+ clientState,
+ AutofillAction.FillOtpFromSms
+ )
setResult(RESULT_OK, Intent().apply {
putExtra(AutofillManager.EXTRA_AUTHENTICATION_RESULT, fillInDataset)
})