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>
This commit is contained in:
parent
9ccefe87e8
commit
9c91cdc34c
2 changed files with 5 additions and 5 deletions
|
@ -49,7 +49,6 @@ afterEvaluate {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation(Dependencies.AndroidX.core_ktx)
|
||||
implementation(Dependencies.AndroidX.autofill)
|
||||
implementation(Dependencies.Kotlin.Coroutines.android)
|
||||
implementation(Dependencies.Kotlin.Coroutines.core)
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue