diff --git a/CHANGELOG b/CHANGELOG index cea61f7fb..ad1483790 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/app/src/main/java/com/kunzisoft/keepass/autofill/KeeAutofillService.kt b/app/src/main/java/com/kunzisoft/keepass/autofill/KeeAutofillService.kt index 6e7c3290e..e5b792aed 100644 --- a/app/src/main/java/com/kunzisoft/keepass/autofill/KeeAutofillService.kt +++ b/app/src/main/java/com/kunzisoft/keepass/autofill/KeeAutofillService.kt @@ -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) diff --git a/fastlane/metadata/android/en-US/changelogs/125.txt b/fastlane/metadata/android/en-US/changelogs/125.txt new file mode 100644 index 000000000..02b015d9c --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/125.txt @@ -0,0 +1 @@ + * Fix Autofill with API 33 \ No newline at end of file diff --git a/fastlane/metadata/android/fr-FR/changelogs/125.txt b/fastlane/metadata/android/fr-FR/changelogs/125.txt new file mode 100644 index 000000000..5dda0f3e7 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/125.txt @@ -0,0 +1 @@ + * Correction de l'Autofill avec l'API 33 \ No newline at end of file