mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-09-01 14:55:19 +00:00
Workaround: Prevent fill-in datasets from being shown on Android… (#666)
This commit is contained in:
@@ -213,7 +213,14 @@ class FillableForm private constructor(
|
|||||||
): Dataset {
|
): Dataset {
|
||||||
val remoteView = makePlaceholderRemoteView(context)
|
val remoteView = makePlaceholderRemoteView(context)
|
||||||
val scenario = AutofillScenario.fromBundle(clientState)
|
val scenario = AutofillScenario.fromBundle(clientState)
|
||||||
return Dataset.Builder(remoteView).run {
|
// Before Android P, Datasets used for fill-in had to come with a RemoteViews, even
|
||||||
|
// though they are never shown.
|
||||||
|
val builder = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||||
|
Dataset.Builder()
|
||||||
|
} else {
|
||||||
|
Dataset.Builder(remoteView)
|
||||||
|
}
|
||||||
|
return builder.run {
|
||||||
if (scenario != null) fillWith(scenario, action, credentials)
|
if (scenario != null) fillWith(scenario, action, credentials)
|
||||||
else e { "Failed to recover scenario from client state" }
|
else e { "Failed to recover scenario from client state" }
|
||||||
build()
|
build()
|
||||||
|
Reference in New Issue
Block a user