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

Commit 9c91cdc

Browse files
committed
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 <[email protected]>
1 parent 9ccefe8 commit 9c91cdc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

autofill-parser/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ afterEvaluate {
4949
}
5050

5151
dependencies {
52-
implementation(Dependencies.AndroidX.core_ktx)
5352
implementation(Dependencies.AndroidX.autofill)
5453
implementation(Dependencies.Kotlin.Coroutines.android)
5554
implementation(Dependencies.Kotlin.Coroutines.core)

autofill-parser/src/main/java/com/github/androidpasswordstore/autofillparser/AutofillFormParser.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import android.os.Build
1212
import android.os.Bundle
1313
import android.view.autofill.AutofillId
1414
import androidx.annotation.RequiresApi
15-
import androidx.core.os.bundleOf
1615
import com.github.ajalt.timberkt.d
1716

1817
/**
@@ -49,9 +48,11 @@ sealed class FormOrigin(open val identifier: String) {
4948
}
5049
}
5150

52-
fun toBundle() = when (this) {
53-
is Web -> bundleOf(BUNDLE_KEY_WEB_IDENTIFIER to identifier)
54-
is App -> bundleOf(BUNDLE_KEY_APP_IDENTIFIER to identifier)
51+
fun toBundle() = Bundle().apply {
52+
when (this@FormOrigin) {
53+
is Web -> putString(BUNDLE_KEY_WEB_IDENTIFIER, identifier)
54+
is App -> putString(BUNDLE_KEY_APP_IDENTIFIER, identifier)
55+
}
5556
}
5657
}
5758

0 commit comments

Comments
 (0)