aboutsummaryrefslogtreecommitdiff
path: root/autofill-parser/src/main/java/com/github
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2020-09-20 21:47:22 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2020-09-20 21:47:22 +0530
commit9c91cdc34c054e3b5fe390fda7ec246fe9e43ca7 (patch)
tree505177d9d746ab8f082f322a676ba84fb287fbaa /autofill-parser/src/main/java/com/github
parent9ccefe87e8d3782bb494977ddf282781cfb302e1 (diff)
autofill-parser: drop use of core-ktx
We use an alpha version of core-ktx that might be undesirable for projects including the library Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'autofill-parser/src/main/java/com/github')
-rw-r--r--autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillFormParser.kt9
1 files changed, 5 insertions, 4 deletions
diff --git a/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillFormParser.kt b/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillFormParser.kt
index 30ff40d3..c9aa2f2e 100644
--- a/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillFormParser.kt
+++ b/autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillFormParser.kt
@@ -12,7 +12,6 @@ import android.os.Build
import android.os.Bundle
import android.view.autofill.AutofillId
import androidx.annotation.RequiresApi
-import androidx.core.os.bundleOf
import com.github.ajalt.timberkt.d
/**
@@ -49,9 +48,11 @@ sealed class FormOrigin(open val identifier: String) {
}
}
- fun toBundle() = when (this) {
- is Web -> bundleOf(BUNDLE_KEY_WEB_IDENTIFIER to identifier)
- is App -> bundleOf(BUNDLE_KEY_APP_IDENTIFIER to identifier)
+ fun toBundle() = Bundle().apply {
+ when (this@FormOrigin) {
+ is Web -> putString(BUNDLE_KEY_WEB_IDENTIFIER, identifier)
+ is App -> putString(BUNDLE_KEY_APP_IDENTIFIER, identifier)
+ }
}
}