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) KeePassDX(4.0.1)
* Fix back lock #1635 #1629 #1634 * Fix back lock #1635 #1629 #1634
* Fix lock button in settings #1630 * Fix lock button in settings #1630

View File

@@ -283,15 +283,22 @@ class KeeAutofillService : AutofillService() {
// Build response // Build response
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
responseBuilder.setAuthentication( try {
autofillIds, responseBuilder.setAuthentication(
intentSender, autofillIds,
Presentations.Builder().apply { intentSender,
inlinePresentation?.let { Presentations.Builder().apply {
setInlinePresentation(it) inlinePresentation?.let {
} setInlinePresentation(it)
}.setDialogPresentation(remoteViewsUnlock).build() }
) 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 { } else {
@Suppress("DEPRECATION") @Suppress("DEPRECATION")
responseBuilder.setAuthentication(autofillIds, intentSender, remoteViewsUnlock, inlinePresentation) 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