fix: Autofill authentication

This commit is contained in:
J-Jamet
2023-09-11 21:13:26 +02:00
parent 5d6aac2d1b
commit b2aa1155d0
4 changed files with 21 additions and 9 deletions

View File

@@ -1,3 +1,6 @@
KeePassDX(4.0.2)
* Fix Autofill with API 33
KeePassDX(4.0.1)
* Fix back lock #1635 #1629 #1634
* Fix lock button in settings #1630

View File

@@ -283,15 +283,22 @@ class KeeAutofillService : AutofillService() {
// Build response
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
responseBuilder.setAuthentication(
autofillIds,
intentSender,
Presentations.Builder().apply {
inlinePresentation?.let {
setInlinePresentation(it)
}
}.setDialogPresentation(remoteViewsUnlock).build()
)
try {
responseBuilder.setAuthentication(
autofillIds,
intentSender,
Presentations.Builder().apply {
inlinePresentation?.let {
setInlinePresentation(it)
}
setDialogPresentation(remoteViewsUnlock)
}.build()
)
} catch (e: Exception) {
Log.e(TAG, "Unable to use the new setAuthentication method.", e)
@Suppress("DEPRECATION")
responseBuilder.setAuthentication(autofillIds, intentSender, remoteViewsUnlock, inlinePresentation)
}
} else {
@Suppress("DEPRECATION")
responseBuilder.setAuthentication(autofillIds, intentSender, remoteViewsUnlock, inlinePresentation)

View File

@@ -0,0 +1 @@
* Fix Autofill with API 33

View File

@@ -0,0 +1 @@
* Correction de l'Autofill avec l'API 33