aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/app/passwordstore/util/autofill/Api26AutofillResponseBuilder.kt13
-rw-r--r--app/src/main/java/app/passwordstore/util/autofill/Api30AutofillResponseBuilder.kt22
-rw-r--r--app/src/main/java/app/passwordstore/util/autofill/AutofillViewUtils.kt7
3 files changed, 0 insertions, 42 deletions
diff --git a/app/src/main/java/app/passwordstore/util/autofill/Api26AutofillResponseBuilder.kt b/app/src/main/java/app/passwordstore/util/autofill/Api26AutofillResponseBuilder.kt
index 08db33d9..f38011a7 100644
--- a/app/src/main/java/app/passwordstore/util/autofill/Api26AutofillResponseBuilder.kt
+++ b/app/src/main/java/app/passwordstore/util/autofill/Api26AutofillResponseBuilder.kt
@@ -12,7 +12,6 @@ import android.service.autofill.FillCallback
import android.service.autofill.FillRequest
import android.service.autofill.FillResponse
import android.service.autofill.SaveInfo
-import app.passwordstore.autofill.oreo.ui.AutofillSmsActivity
import app.passwordstore.ui.autofill.AutofillDecryptActivity
import app.passwordstore.ui.autofill.AutofillFilterView
import app.passwordstore.ui.autofill.AutofillPublisherChangedActivity
@@ -79,14 +78,6 @@ class Api26AutofillResponseBuilder private constructor(form: FillableForm) :
return makeIntentDataset(context, AutofillAction.Generate, intentSender, metadata)
}
- private fun makeFillOtpFromSmsDataset(context: Context): Dataset? {
- if (!scenario.hasFieldsToFillOn(AutofillAction.FillOtpFromSms)) return null
- if (!AutofillSmsActivity.shouldOfferFillFromSms(context)) return null
- val metadata = makeFillOtpFromSmsMetadata(context)
- val intentSender = AutofillSmsActivity.makeFillOtpFromSmsIntentSender(context)
- return makeIntentDataset(context, AutofillAction.FillOtpFromSms, intentSender, metadata)
- }
-
private fun makePublisherChangedDataset(
context: Context,
publisherChangedException: AutofillPublisherChangedException,
@@ -148,10 +139,6 @@ class Api26AutofillResponseBuilder private constructor(form: FillableForm) :
datasetCount++
addDataset(it)
}
- makeFillOtpFromSmsDataset(context)?.let {
- datasetCount++
- addDataset(it)
- }
makeSearchDataset(context)?.let {
datasetCount++
addDataset(it)
diff --git a/app/src/main/java/app/passwordstore/util/autofill/Api30AutofillResponseBuilder.kt b/app/src/main/java/app/passwordstore/util/autofill/Api30AutofillResponseBuilder.kt
index c64b789f..55679b21 100644
--- a/app/src/main/java/app/passwordstore/util/autofill/Api30AutofillResponseBuilder.kt
+++ b/app/src/main/java/app/passwordstore/util/autofill/Api30AutofillResponseBuilder.kt
@@ -17,7 +17,6 @@ import android.service.autofill.SaveInfo
import android.view.inputmethod.InlineSuggestionsRequest
import android.widget.inline.InlinePresentationSpec
import androidx.annotation.RequiresApi
-import app.passwordstore.autofill.oreo.ui.AutofillSmsActivity
import app.passwordstore.ui.autofill.AutofillDecryptActivity
import app.passwordstore.ui.autofill.AutofillFilterView
import app.passwordstore.ui.autofill.AutofillPublisherChangedActivity
@@ -146,23 +145,6 @@ class Api30AutofillResponseBuilder private constructor(form: FillableForm) :
return makeIntentDataset(context, AutofillAction.Generate, intentSender, metadata, imeSpec)
}
- private fun makeFillOtpFromSmsDataset(
- context: Context,
- imeSpec: InlinePresentationSpec?,
- ): Dataset? {
- if (!scenario.hasFieldsToFillOn(AutofillAction.FillOtpFromSms)) return null
- if (!AutofillSmsActivity.shouldOfferFillFromSms(context)) return null
- val metadata = makeFillOtpFromSmsMetadata(context)
- val intentSender = AutofillSmsActivity.makeFillOtpFromSmsIntentSender(context)
- return makeIntentDataset(
- context,
- AutofillAction.FillOtpFromSms,
- intentSender,
- metadata,
- imeSpec,
- )
- }
-
private fun makePublisherChangedDataset(
context: Context,
publisherChangedException: AutofillPublisherChangedException,
@@ -214,10 +196,6 @@ class Api30AutofillResponseBuilder private constructor(form: FillableForm) :
datasetCount++
addDataset(it)
}
- makeFillOtpFromSmsDataset(context, imeSpecs.getOrNull(datasetCount))?.let {
- datasetCount++
- addDataset(it)
- }
makeSearchDataset(context, imeSpecs.getOrNull(datasetCount))?.let {
datasetCount++
addDataset(it)
diff --git a/app/src/main/java/app/passwordstore/util/autofill/AutofillViewUtils.kt b/app/src/main/java/app/passwordstore/util/autofill/AutofillViewUtils.kt
index 6349acd8..ebe4bc7d 100644
--- a/app/src/main/java/app/passwordstore/util/autofill/AutofillViewUtils.kt
+++ b/app/src/main/java/app/passwordstore/util/autofill/AutofillViewUtils.kt
@@ -101,13 +101,6 @@ fun makeGenerateAndFillMetadata(context: Context) =
R.drawable.ic_autofill_new_password,
)
-fun makeFillOtpFromSmsMetadata(context: Context) =
- DatasetMetadata(
- context.getString(R.string.oreo_autofill_fill_otp_from_sms),
- null,
- R.drawable.ic_autofill_sms,
- )
-
fun makeEmptyMetadata() = DatasetMetadata("PLACEHOLDER", "PLACEHOLDER", R.mipmap.ic_launcher)
fun makeWarningMetadata(context: Context) =